40 CHAPTER 2: All That Math Jazz^
matrix to express this, here is what we get (notice the new notation, where R(z,a) is used
to make it clear which axis is being addressed). Notice that z remains a constant
because it is multiplied by 1:
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡ −
=
0 0 0 1
0 0 1 0
sin( ) cos( ) 0 0
cos( ) sin( ) 0 0
( , )
a a
a a
R za
Figure 2-5. Rotation around the z-axis
This looks almost exactly like its 2D counterpart but with z ′ =z. But now we can also
rotate around x or y as well. For x we get the following:
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
=
0 0 0 1
0 sin( ) cos( ) 0
0 cos( ) sin( ) 0
1 0 0 0
( , )
a a
a a
R xa
And, of course, for y we get the following: