Graphics Reference
In-Depth Information
1. A 4
4matrix M , which we apply to the standard basis vectors at the origin
to get the three vectors, and to the origin itself to get the basepoint P .The
×
last row of the matrix must be 0001 , and the upper-left 3
×
3
submatrix S must be a rotation matrix.
2. A 3
×
3 rotation matrix S and a translation vector t = P
origin.
3. Three Euler angles and a translation vector.
4. A unit quaternion and a translation vector.
Each has its advantages.
Option 1 is nice because it's easy to consider it as a transformation, which
can be combined with other transformations by matrix multiplication. It makes
sense to use this in a geometric modeling system. Converting between options 1
and 2 is straightforward, but option 2 has the advantage that it's easy to check
that the matrix S is orthogonal by checking S T S = I . If several such matrices
have been multiplied, accumulating round-off errors, you can apply the Gram-
Schmidt orthogonalization process to the result to adjust it back into orthogo-
nal form, although this involves many multiplications and divisions, and several
square roots.
Option 3 is useful, especially in a body-centered form, for representing things
like aircraft or other first-person-control situations. Converting to and from matrix
form is somewhat messy, however.
Option 4 is much favored in rigid-body animation. Converting to matrix form
is easy; converting from matrix form is slightly messier because of the two-to-
one nature of the quaternion-to-rotation map. Interpolation is particularly easy in
quaternion form, and the equivalent of “reorthogonalization” in the matrix form
is vector normalization for the quaternion, which is very fast. This is discussed
further in Section 35.5.2.
11.4 Rotations versus Rotation Specifications
We've defined a rotation as a transformation having certain properties; in partic-
ular, it's a linear function from R 3 to R 3 represented by multiplication by some
matrix. Thus, for instance, the transformation represented by multiplication by
0
10
100
001
(11.45)
can be called rotation about the z -axis (or in the xy -plane) by 90 . But it's impor-
tant to understand that multiplying a vector v by this matrix doesn't rotate v about
the z -axis in the sense that this phrase is commonly used. The vector v is at no
point rotated by 10 ,or20 ,or30 . The function simply takes the coordinates of
v and returns the coordinates of the rotated-by-90 version of v . Indeed, looking
at the coordinates returned by the rotation, there's no way to tell whether they
arose as the result of rotation by 90 ,
270 , or 450 . This might seem irrelevant
in the sense that we got the rotation we wanted, but when we consider the prob-
lem of interpolating rotations it's really quite significant. If we attempt to build
an interpolation procedure interp(M1, M2, t) that takes as input two matrices
 
 
Search WWH ::




Custom Search