CG Class 9, Wed 2018-09-26

1   Today's iclicker questions

  1. What does this line do:

    gl.bindBuffer( gl.ARRAY_BUFFER, vBuffer );
    
    1. Create this buffer.
    2. Enable this buffer so that the shaders will use it.
    3. Get the address of variable vBuffer.
    4. Prevent this buffer from being modified.
    5. Specify that this buffer will be the object of future buffer operations.
  2. What does this line do:

    var vBuffer = gl.createBuffer();
    
    1. Create this buffer.
    2. Enable this buffer so that the shaders will use it.
    3. Get the address of variable vBuffer.
    4. Prevent this buffer from being modified.
    5. Specify that this buffer will be the object of future buffer operations.
  3. How does gl.drawArrays know when the vertices it's drawing in 3D?

    1. It's specified as one of the arguments in gl.drawArrays.
    2. It's specified as one of the arguments in gl.bufferData.
    3. It's specified as one of the arguments in gl.vertexAttribPointer.
    4. It's specified as one of the arguments in gl.getAttribLocation.
    5. It's specified as one of the arguments in gl.enableVertexAttribArray.
  4. How does gl.drawArrays know when the color values are floats instead of ints?

    1. It's specified as one of the arguments in gl.drawArrays.
    2. It's specified as one of the arguments in gl.bufferData.
    3. It's specified as one of the arguments in gl.vertexAttribPointer.
    4. It's specified as one of the arguments in gl.getAttribLocation.
    5. It's specified as one of the arguments in gl.enableVertexAttribArray.
  5. How does gl.drawArrays know how many triangles are in a triangle strip?

    1. It's specified as one of the arguments in gl.drawArrays.
    2. It's specified as one of the arguments in gl.bufferData.
    3. It's specified as one of the arguments in gl.vertexAttribPointer.
    4. It's specified as one of the arguments in gl.getAttribLocation.
    5. It's specified as one of the arguments in gl.enableVertexAttribArray.
  6. Normalize this vector: (8,-6,0).

    1. (3, 4, 5).
    2. (3/5, -4/5, 0).
    3. (4/5, -3/5, 0).
    4. (4/5, 3/5, 0).
    5. (8, -6, 10).
  7. Find a normal vector to the plane through the points (1,0,0), (1,1,0), (1,0,1).

    1. (0, -1, 0)
    2. (0, 1, 0)
    3. (1, 0, 0)
    4. (1, 1, 0)
    5. (3, 2, 2)
  8. Which of these curved surface equation types makes it easy to generate points on the surface?

    1. explicit
    2. explicit and implicit
    3. explicit and parametric
    4. implicit
    5. parametric
  9. Which of these curved surface equation types makes it easy to test whether a point is on the surface?

    1. explicit
    2. explicit and implicit
    3. explicit and parametric
    4. implicit
    5. parametric
  10. What type of equation is this: \(x^2+y^2+z^2=1\)

    1. explicit
    2. explicit and implicit
    3. explicit and parametric
    4. implicit
    5. parametric
  11. About the next few questions:

    1. The next few questions will work with 3D points like \(p=\begin{pmatrix}1\\2\\3\end{pmatrix}\).
    2. I'll also use matrices like \(M=\begin{pmatrix}2&0&0\\0&2&0\\0&0&2\end{pmatrix}\).
    3. We can transform points thus: \(q=Mp\). This gives \(q=\begin{pmatrix}2\\4\\6\end{pmatrix}\).
    4. Common types of transformations are rotation, translation, scaling, and perspective or projection.
    5. I haven't yet discussed the following topics. This is to see what you already know. I'll let you correct your answers.

    The above matrix is what type of transformation:

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation
  12. \(M=\begin{pmatrix}1&0&0\\0&1&0\\0&0&1\end{pmatrix}\) is what type of transformation?

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation
  13. \(M=\begin{pmatrix}.6&.8&0\\-.8&.6&0\\0&0&1\end{pmatrix}\) is what type of transformation?

    1. identity
    2. perspective
    3. rotation
    4. scaling
    5. translation