Page 126 - Computer Graphics Handout
P. 126
3.10.4 Rotation About an Arbitrary Axis
Our final rotation example illustrates not only how we can achieve a rotation about an arbitrary point and line in space but also how
we can use direction angles to specify orientations. Consider rotating a cube, as shown in Figure 3.52.We need three entities to
specify this rotation. There is a fixed point p0 that we assume is the center of the cube, a vector about which we rotate, and an angle
of rotation.Note that none of these entities relies on a frame and that we have just specified a rotation in a coordinatefree manner.
Nonetheless, to find an affine matrix to represent this transformation, we have to assume that we are in some frame.
The vector about which we wish to rotate the cube can be specified in various ways. One way is to use two points, p1 and p2, defining
the vector
u = p2− p1.
Note that the order of the points determines the positive direction of rotation for θ and that even though we draw u as passing
through p0, only the orientation of u matters. Replacing u with a unit-length vector
in the same direction simplifies the subsequent steps. We say that v is the result of normalizing u. We have already seen that moving
the fixed point to the origin is a helpful technique. Thus, our first transformation is the translation T(−p0), and the final one is T(p0).
After the initial translation, the required rotation problem is as shown in Figure 3.53. Our previous example (see Section 3.10.2)
showed that we could get an arbitrary rotation from three rotations about the individual axes. This problem is more difficult because
we do not know what angles to use for the
126

