main-p2-3-key

Question 1

The x-axis points towards (-1, 0, 0).
The rotation matrix is:
-1 0 0 0
0 -sqrt(2)/2 sqrt(2)/2 0
0 sqrt(2)/2 sqrt(2)/2 0
0 0 0 1

Question 2

This question is a little confusing. Remember that it says “Rotate around ITS x axis” - this isn’t the “global” (or original X axis), its the X axis of the local coordinate system. Doing the rotation in the local or the global coordinates are both legitimate, but they give different results. So you need to pay close attention to this minor detail.

Where do the three axes (in the objects coordinate system) go in the result?
x-axis: (-1, 0, 0)
y-axis: (0, -sqrt(2)/2, -sqrt(2)/2)
z-axis: (0, -sqrt(2)/2, sqrt(2)/2)
If you had used the global X axis for the 2nd rotation, you would have gotten:x-axis: (-1, 0, 0)
y-axis: (0, -sqrt(2)/2, sqrt(2)/2)
z-axis: (0, sqrt(2)/2, sqrt(2)/2)

What is the matrix form of this transformation?

-1000
0-sqrt(2)/2-sqrt(2)/20
0-sqrt(2)/2sqrt(2)/20
0001

If you did the global coordinates, you would have gotten:Where do the three axes (in the objects coordinate system) go in the result?
x-axis: (-1, 0, 0)
y-axis: (0, -sqrt(2)/2, -sqrt(2)/2)
z-axis: (0, -sqrt(2)/2, sqrt(2)/2)
If you had used the global X axis for the 2nd rotation, you would have gotten:x-axis: (-1, 0, 0)
y-axis: (0, -sqrt(2)/2, sqrt(2)/2)
z-axis: (0, sqrt(2)/2, sqrt(2)/2)

What is the matrix form of this transformation?

-1000
0-sqrt(2)/2-sqrt(2)/20
0-sqrt(2)/2sqrt(2)/20
0001

If you did the global coordinates, you would have gotten:

-1000
0-sqrt(2)/2sqrt(2)/20
0sqrt(2)/2sqrt(2)/20
0001

What is the inverse of this matrix?
The inverse of a rotation matrix is its transpose. Notice that this matrix is symmetric, so its its own inverse!

If this seems counterintuitive, don’t worry - many things about rotations often are!

Question 3

C: viewing matrix
M: transformation matrix
P: projective transform matrix

answer = h ( P C M ) [0 0 0 1]
M [ 0 0 0 1] = [ 3 4 5 1]
C (above) = [ -5/2 3/2 8 1 ]
P (above) = [ -5/2 3/2 1 -8]
answer = h (above) = (5/16, -3/16)

Question 4

Question 5

Question 6

Basis matrix of Catmull-Rom:

0100
-1/201/20
1-5/22-1/2
-1/23/2-3/21/2

a0 = (0, 2)
a1 = (2, 1)
a2 = (6, -3/2)
a3 = (-4, 1/2)

Where is the point at t=1/2?
f(1/2) = (2, 35/16)
(there’s no real shortcut here, compute u B p with u = [1 1/2 1/4 1/8])**What direction is it facing? **
f’(1/2) = (5, -1/8) - if you normalized this vector, that’s an even better answer, but messier
(the easiest way to do this is to notice that only the u vector depends on the parameter, so u’ = [ 0 1 2u 3u^2 ] = [ 0 1 1 3/4], and compute u’ B p)What is the magnitude of its velocity?
sqrt(5*5 + (-1/8)*(-1/8)) = sqrt(1601)/8

Question 7

f’(0) = 4(P1 - P0) = (0, 8)
f’(1) = 4(P4 - P3) = (0, -8)

(4, 0), (4, -8/3), (0, -8/3), (0, 0)

Question 8

DeCastlejau algorithm:
(0,0), (0,2), (2,4), (4,2), (4,0)
-> (0, 1), (1, 3), (3, 3), (4, 1)
-> (1/2, 2), (2, 3), (7/2, 2)
-> (5/4, 5/2), (11/4, 5/2)
->(2, 5/2)

Segment 1: (0, 0), (0, 1), (1/2, 2), (5/4, 5/2), (2, 5/2)
Segment 2: (2, 5/2), (11/4, 5/2), (7/2, 2), (4, 1), (4, 0)

Page last modified on October 25, 2007, at 05:45 PM