Prev: Q10, Next: Q5



# Practice Exam Questions 4

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit the "Enter" key) 

📗 Please report any bugs or mistakes on Piazza.

📗 Question 1


 Question 2


📗 Question 3


 Question 4


📗 Question 5



📗 [1 points] This picture is made of triangles with a single color. A "good" mesh would make this figure 4 triangles (not 3). Create the new triangles so that there are no T-Junctions and vertex splitting.

Vertices:
Left indices
Right indices
Use to draw the new triangles on the left.
Note: the picture on the right uses some vertices that are split (multiple vertices at the same position).
📗 [1 points] Given a program written using THREE. There is an camera set up such that the center of the coordinate system is at the center of the screen, the X-axis is to the right, the Y-axis is up, so Z points towards the viewer (right handed coordinate system). The "cube" function is defined to create a cube at the origin with a basic material. Define the rotation angles so that the blue cube is the green cube:
let c1 = cube("green");
scene.add(c1);
let c2 = cube("yellow");
scene.add(c2);
c2.translateX(0.25);
let c3 = cube("red");
scene.add(c3);
c3.rotateZ(Math.PI / 2);
c3.translateX(0.25);
let c4 = cube("blue");
scene.add(c4);
c4.rotateZ(rz);
c4.rotateY(ry);
c4.rotateX(rx);
c4.translateZ(-0.125);

Use to move the blue cube. In the diagram, x axis is red, y axis is green, z axis is blue.
Note: the red cube is "above" the green cube, the yellow cube is "to the right" of the green cube, and initially the blue cube is "behind" the green cube.
📗 [1 points] Define the rotation angle so that the picture on the left is the same as the one on the right.
let c1 = cube("green");
scene.add(c1);
let g = new THREE.Group();
g.translateX(-0.125);
g.translateY(-0.125);
scene.add(g);
let c2 = cube("blue");
g.add(c2);
c2.translateX(0.125);
c2.translateY(-0.125);
g.rotateZ(r);

Use to rotate the blue cube on the left. In the diagram, x axis is red, y axis is green, z axis is blue.
📗 [1 points] Reset the camera so that scene on the left looks like the one on the right (orbit controls are turned off).
➩ lookFrom =
➩ lookAt =
➩ vUp =
Assume all the camera parameters for the scene on the right are integers between \(-2\) and \(2\). The center of scene is \(\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}\) and the four boxes are at \(\begin{bmatrix} \pm 1 \\ 0 \\ \pm 1 \end{bmatrix}\).

Use to move the camera for the scene on the left.
You can view the scene with orbit control:

📗 [1 points] Given two rotations \(R_{1} = \left(x_{1}, y_{1}, z_{1}\right)\) and \(R_{2} = \left(x_{2}, y_{2}, z_{2}\right)\), each is represented by XYZ Euler Angles. Consider a third rotation \(R_{3} = \left(x_{3}, y_{3}, z_{3}\right)\) that is \(R_{1}\) followed by \(R_{2}\) (the composition of the transformations). Under which circumstances is \(R_{3} = R_{1} + R_{2}\) (that is \(x_{3} = x_{1} + x_{2}, y_{3} = y_{1} + y_{2}, z_{3} = z_{1} + z_{2}\))?
\(R_{3} = R_{1} + R_{2}\) - \(R_{3} \neq R_{1} + R_{2}\)

Click to check: Incorrect.





Last Updated: May 28, 2025 at 11:51 PM