

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to homework #2 for cs 418. It includes questions on quaternions, transformation matrices, computer graphics, and animation. Students are expected to write clearly and legibly, and to label their answers with the corresponding question.
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Please be organized when writing your answers to these questions. Make sure that all solutions are clearly indicated and labelled with the question they are answering. Remember to write clearly and legibly. Unreadable answers will receive 0 credit.
√ 2 2 +^
√ 2 2 k^ and^ q^2 =^ i^ +^ j^ +^ k. (a) What is the norm of q 1? (b) What is the inverse of q 1? (c) Compute q 1 q 2 and q 2 q 1. Are they equal? (d) q 1 represents a rotation. What are the rotation axis and angle?
cos θ 0 0 0 0 cos θ 0 0 0 0 cos θ 0 0 0 0 cos θ
For a given value of θ, describe the geometric effect of applying this transformation to a torus. (You may assume that cos θ 6 = 0.)
His drawing code places vertices along the upper and lower rims of the cylinder, connecting them together with triangles which stretch the entire length of the cylinder. He draws the cylinder using a shiny material. Given the position of the light, he expects to see a specular highlight in the middle of the cylinder. (a) When Harvey executes his OpenGL code (using Gouraud shading) no highlight appears in the middle of the cylinder. However, when he renders it with RenderMan (using Phong shading) the highlight appears. Explain why this is.
(b) How could the OpenGL code be altered (still using Gouraud shading) so that the highlight would appear?
w
h c
θ
You have decided to provide two “control knobs” to the animator using this model: the center of the propellor (c) and the angle by which the blades are rotated about this center (θ). Each of the four blades is an ellipse, as shown on the right. (a) Construct a transformation hierarchy for the object pictured above. The only geometric primitive you may use is a circle of radius 1 centered about the origin. Your hierarchy may only contain transformation nodes and geometry nodes that draw unit circles. For all transformation nodes, clearly indicate what transformation is being performed. [Hint: All your geometry nodes must be at the leaves of the tree.] (b) Suppose we define two key frames for this propellor, one at time t with rotation angle θt and the other at time t + 1 with rotation angle θt+1 (θt+1 − θt < 2 π). We would like to generate two intermediate frames (at time t + 13 and time t + 23 , respectively) between these two key frames using linear interpolation of the angle. Please write down the rotation angles for these two intermediate frames. (c) Suppose the propellor linearly accelerates from 0 to N rotations/second in one second. We draw the propellor at n frames/second. That means we need to draw n frames during the acceleration. Please describe how to obtain the rotation angle for the i-th frame, 1 ≤ i ≤ n. You can assume the first frame is drawn at time (^) n^1.
Page 2