CG Homework 4, due Thu 20160929 9am

(2 pts) (Reverse engineering rotations) In 2D, if the point (3,2) rotates about the origin to (2,3), what's the angle?

(2 pts) Give the matrix M that has this property: for all vectors p, \(Mp = \begin{pmatrix}3\\4\\5\end{pmatrix} \times p\).

corrected (2 pts) Give the matrix M that has this property: for all vectors p, \(Mp = \left( \begin{pmatrix}3\\4\\5\end{pmatrix} \cdot p \right) \begin{pmatrix}3\\4\\5\end{pmatrix}\).

(2 pts) Why can the following not possibly be a 3D Cartesian rotation matrix?
\(\begin{pmatrix} 2& 0 &0\\1 & 0 &0\\0& 0 &1\end{pmatrix}\)

(2 pts) Use any method (not involving soliciting answers on the internet) to rotate the point (4,4,6) by 60 degrees about the axis (2,2,3). Explain your method. (E.g., if you saw the answer in a vision, are your visions generally accurate?)

(2 pts) Can the volume of a small cube change when its vertices are rotated? (yes or no). Why (not)?

(2 pts) What is the ''event loop''?

(2 pts) Why does putting all your vertices into an array and telling OpenGL about it make a big graphics program faster?

(2 pts) Since the Z (aka depth) buffer looks so useful, why is it not enabled by default?

(2 pts) What's the quaternion representing a rotation of 180 degrees about the axis (0,0,1)?

(2 pts) Use the quaternion formulation to rotate the point (0,1,0) by 180 degrees about the axis (0,0,1).

(2 pts) Use the vector formulation to rotate the point (0,1,0) by 180 degrees about the axis (0,0,1).

(26) Extend your program from last week that displays the Starship Enterprise as follows:
 Do the rotation in the vertex shader instead of in the javascript program.
 Make the color of each pixel depend on its zvalue.
(Total: 50 points.)