\( \newcommand{\vecIII}[3]{\left[\begin{array}{c} #1\\#2\\#3 \end{array}\right]} \newcommand{\vecIV}[4]{\left[\begin{array}{c} #1\\#2\\#3\\#4 \end{array}\right]} \newcommand{\Choose}[2]{ { { #1 }\choose{ #2 } } } \newcommand{\vecII}[2]{\left[\begin{array}{c} #1\\#2 \end{array}\right]} \newcommand{\vecIII}[3]{\left[\begin{array}{c} #1\\#2\\#3 \end{array}\right]} \newcommand{\vecIV}[4]{\left[\begin{array}{c} #1\\#2\\#3\\#4 \end{array}\right]} \newcommand{\matIIxII}[4]{\left[ \begin{array}{cc} #1 & #2 \\ #3 & #4 \end{array}\right]} \newcommand{\matIIIxIII}[9]{\left[ \begin{array}{ccc} #1 & #2 & #3 \\ #4 & #5 & #6 \\ #7 & #8 & #9 \end{array}\right]} \)

Quiz

  1. Are the Sakai quizzes open book?

    Sort of. I won't and can't prevent you from looking things up during the quiz, and I don't intend for you to feel you need to memorize the material. But try to do the reading first and then take the quiz.

  2. What exactly does rendering mean?

    Converting a scene graph (data structure of objects w/ geometry and material, and also light sources), and camera to pixels.

  3. Why is it called dat.GUI?

    GUI is a standard acronym for Graphical User Interface. I assume the "dat" part is for data or some such.

  4. What happens in the code if we haven't rendered the back face and we make a box with negative parameters?

    Interesting question! Try it! I'll warn you, though, that (for performance reasons) Three.js doesn't check parameters for correctness, so all bets are off.

  5. What does it mean that onChange() is an event handler?

    It means that when the value changes, to invoke (call) the handler function.

  6. Can you explain how the computer is able to render the entire image with the new dimensions without having to reload/have a buffering period?

    Awesome performance by the graphics card? All the scene stuff is in memory, but it does have to be re-transferred to the graphics card, which then has to render.

  7. How do you adjust the bounding box of a scene?

    The bounding box is a dictionary parameter to the camera setup. (It's only purpose is to help set up the camera.) Adjust those six numbers.

  8. Aside from the examples given in the reading, are there other commonly helpful keyboard controls we can create?

    It's up to you. You could have a keyboard control to toggle between day/night, to have objects appear and disappear, truly anything you want. For the next week or so, we'll be focussing on color and geometry, so those will be the things you'll want to affect for now.

  9. For the JavaScript code for the adjustable box with a GUI, do global variables have to be in dictionary type?

    Yes. That's how the dat.GUI code is defined.

  10. How can we rotate an object?

    We'll get to that in about two weeks. See instance transform. See also Object3D.rotation() which is a method taking three arguments (rotation in radians around X-axis, Y-axis and Z-axis). See also rotateX() and friends.

  11. Why use dat.GUI instead of other libraries that create a GUI to adjust parameters? Will we explore any alternative libraries in this course?

    We'll stick with dat.GUI, but if you find something you like better, you're welcome to do so. Share your discoveries!

  12. I think it would be better if there is more detailed low-level explanation about the dat.GUI, Three.js, or TW, not just the application level one which is also useful.

    I'm glad you're interested in how things work! I'm happy to talk with you about that in office hours, but our readings and class time will mostly focus on the application level.

  13. This is related to the syntax of JavaScript, but in the demo code, I saw that the functions expandBox(), shrinkBox(), and redrawBox() do not list any parameters in their function definitions. When they are passed onto methods as arguments (in the setKeyboardCallback() and onChange()), the parentheses at the end (expandBox"()") were omitted. Is this okay as long as the functions do not have any parameters?

    This is a fantastic question and one I want to spend a little time on, because we'll see it again. It has to do with functions as arguments.