\( \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. When two defined vertices have the same position, what properties make them different from each other?

    They could differ by surface normal and/or texture coordinates. There's an example in the Threejs reading about custom geometry

    (It's also possible for them to differ by color, but we haven't talked about that.)

  2. What are typed arrays? I read the MDN page and still don't understand.

    Sure. Some arrays are generic containers: the elements are pointers to objects, and those objects can be of different datatypes (string, int, float, dictionary and user-defined objects like dates or employees.)

    Typed arrays only contain a particular datatype, say INT or BYTE. The framebuffer is such a thing: it only contains 3-byte RGB quantities. Or the data texture arrays that we discussed last time, which were 4-byte RGBA quantities.

    This is important for efficiency. The code that pulls bits out of the array can assume a certain representation and doesn't have to worry about different cases for difference kinds of data.

  3. Could you please go over the code in the .addGroup() part of the reading?

    Sure. The addGroup method is a Threejs setter method for adding a group to the list of groups for a buffergeometry. Each group is a dictionary with keys for start, count and materialIndex.

  4. I am not sure what questions to ask, but I know I probably will have some in class.

    Please do!

  5. None today! Thank you for the reading

    Glad to hear it!