Rotation About Arbitrary Axis PDF
Rotation About Arbitrary Axis PDF
Rotation About an
Arbitrary Axis
0 0 0 1
117
118 CHAPTER 9. ROTATION ABOUT AN ARBITRARY AXIS
Rx 1 = RxT
Ry 1 = RyT
Rz 1 = RzT
This means in particular that these matrices are orthogonal. It can also be
proven that the product of two orthogonal matrices is itself an orthogonal matrix
(see problems at the end of the chapter). So, if we combine several rotations
about the coordinate axis, the matrix of the resulting transformation is itself an
orthogonal matrix.
One way of implementing a rotation about an arbitrary axis through the
origin is to combine rotations about the z, y, and x axes. The matrix of the
resulting transformation, Rxyz , is
2 3
Cy Cz Cy Sz Sy
Rxyz = Rx Ry Rz = 4 Sx Sy Cz + Cx Sz Sx Sy Sz + Cx Cz Sx Cy 5 (9.1)
Cx Sy Cz + Sx Sz Cx Sy Sz + Sx Cz Cx Cy
where
Ci = cos i and Si = sin i for i = x; y; z
From what we noticed above, Rxyz is an orthogonal matrix. This means that
its inverse is its transpose.
vk = comprbv
v rb
= 2rb
kb
rk
= (v rb) rb since rb is a unit vector
Similarly,
v? = orthrbv
= v (v rb) rb
9.2. ROTATION ABOUT AN ARBITRARY AXIS THROUGH THE ORIGIN119
And we have
v = v k + v?
Figure 9.1: Rotation about a general axis through the origin, showing the axis
of rotation and the plane of rotation (see [VB1])
T (v) = T vk + v?
= T vk + T (v? )
T vk = vk
120 CHAPTER 9. ROTATION ABOUT AN ARBITRARY AXIS
Figure 9.2: Rotation about a general axis through the origin, showing vectors
on the plane of rotation (see [VB1])
9.2. ROTATION ABOUT AN ARBITRARY AXIS THROUGH THE ORIGIN121
since vk has the same direction as rb and we are rotating around an axis with
direction vector rb(see …gure 9.1). Therefore,
T (v) = vk + T (v? )
So, T (v? ) is the only quantity we need to compute. For this, we create a two
dimensional basis in the plane of rotation (see …gure 9.1 and 9.2). We will use
v? as our …rst basis vector. For our second, we can use
w = rb v? (9.2)
= rb v
and therefore
T (v) = vk + T (v? )
= (v rb) rb + cos v? + sin (b
r v)
= (v rb) rb + cos [v (v rb) rb] + sin (b
r v)
= (v rb) rb + cos v cos (v rb) rb + sin (b
r v)
= (1 cos ) (v rb) rb + cos v + sin (b
r v)
(u v) u = (ux vx + uy vy + uz vz ) u
32
ux
= (ux vx + uy vy + uz vz ) 4 uy 5
uz
2 2
3
ux ux uy ux uz
= 4 ux uy u2y uy uz 5 v
ux uz uy uz u2z
rb = (ux ; uy ; uz )
C = cos
S = sin
t = 1 cos
9.3 Assignment
1. Prove that the product of two orthogonal matrices is also an orthogonal
matrix.
9.3. ASSIGNMENT 123
[BF1] Burden, Richard L., and Faires, Douglas J., Numerical Analy-
sis,Brooks/Cole, sixth edition, 1997.
[DD1] Deitel, H.M., and Deitel, P. J., Java, How to Program, Prentice Hall,
1999.
[DP1] Dunn, Fletcher and Parberry, Ian, 3D Math Primer for Graphics and
Game Development, Wordware Publishing, Inc., 2002.
[FD1] Foley, J.D., Van Dam, A., Feiner, S.K., and Hughes, J.F., Computer
Graphics, Principles and Practices, Addison-Wesley, 1995.
[FD2] Foley, J.D., Van Dam, A., Feiner, S.K., Hughes, J.F., and Philipps, R.L.,
Introduction to Computer Graphics, Addison-Wesley, 1997.
[H1] Hill, F.S. JR., Computer Graphics Using Open GL, Prentice Hall, 2001.
[SE1] Schneider, Philip J., and Eberly, David H., Geometric Tools for Computer
Graphics, Morgan Kaufman Publishers, 2003.
[VB1] Van Verth, James M. and Bishop Lars M., Essential Mathematics For
Games and Interactive Applications, A Programmer’s Guide, Morgan
Kaufmann Publishers, 2004.
133
134 BIBLIOGRAPHY
[WG1] Wall, David, and Gri¢ th, Arthur, Graphics Programming with JFC,
Wiley, 1999.
[AW1] Watt, Alan, 3D Computer Graphics, Addison-Wesley, 2000.
[AW2] Watt, Alan, The Computer Image, Addison-Wesley, 1999.