Similar presentations

2
Rotations about an Arbitrary Axis Consider a rotation through an angle  about a line through the origin. We must assign a positive direction to the line. We do this by using a vector rather than a line.

3
Rotations about an Arbitrary Axis The function call glRotatef(angle, v x, v y, v z ) will create a single matrix that represents a rotation about the vector v = (v x, v y, v z ). There are some clever ways of obtaining this matrix. We will learn an elementary (non- clever) method.

4
Rotations about an Arbitrary Axis To find the matrix of an rotation through an angle  about a vector v emanating from the origin Rotate about the y-axis so that v is in the xy-plane. Let this angle be  and call the new vector v’. Rotate about the z-axis so that v’ is aligned with the positive x-axis. Let this angle be – .

5
Rotations about an Arbitrary Axis Rotate about the x-axis through angle . Rotate about the z-axis through angle . Rotate about the y-axis through angle – .

18
Example: Rotation The product of these five matrices is the matrix of the original rotation. 1/9-4/98/90 4/91/90 -4/97/94/ R(  ) =

19
Example: Rotation How can we verify that this is correct? If P is a point on the axis of rotation, then the transformed P should be the same as P. If v is orthogonal to the axis, then the transformed v should be orthogonal to v. If we apply the transformation 4 times, we should get the identity.

20
Example: Rotation A point on the axis is of the form (t, 2t, 2t, 1). The matrix maps this point to (t, 2t, 2t, 1).

22
Special Properties of Rotation Matrices Every rotation matrix has the following properties. Each row or column dotted with itself is 1. Each row (column) dotted with a different row (column) is 0. A matrix with this property is called orthonormal. Its inverse equals its transpose.

23
Special Properties of Rotation Matrices Verify that R(  ) is orthonormal. Consider each row of the matrix to be a point. Where does the matrix map each row? These are the points that map to the points (1, 0, 0), (0, 1, 0), and (0, 0, 1). What about the columns? What do they represent?