TRANSFORMATIONS AND PROJECTIONS 37
2.5 Transformations in Three-Dimensions
Matrices developed for transformations in two-dimensions can be modified as per the schema in
Figure 2.13 Translation of a donut along an
arbitrary vector
Rz =
cos – sin 0 0
sin cos 0 0
0010
0001
θθ
θθ
⎡
⎣
⎢
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎥
(2.25)
Further, using the cyclic rule for the right-handed coordinate axes, rotation matrices about the x-
andy-axis for angles ψandφ can be written, respectively, by inspection as
RRxy =
10 0 0
0 cos –sin 0
0 sin cos 0
00 0 1
and =
cos 0 sin 0
0100
–sin 0 cos 0
0001
ψψ
ψψ
φφ
φφ
⎡
⎣
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎡
⎣
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
(2.26)
Rotation of a point by angles θ,φ and ψ (in that order) about the z-,y- and x-axis, respectively, is
a useful transformation used often for rigid body rotation. The combined rotation is given as
R = Rx(ψ)Ry(φ)Rz(θ) =
10 0 0
0 cos –sin 0
0 sin cos 0
00 0 1
cos 0 sin 0
0100
- sin 0 cos 0
0001
cos –sin 0 0
sin cos 0 0
0010
0001
ψψ
ψψ
φφ
φφ
θθ
θθ
⎡
⎣
⎢
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎥
⎡
⎣
⎢
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎥
⎡
⎣
⎢
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎥
(2.27)
We may as well multiply the three matrices to derive the composite matrix though it is easier to
express the transformation in the above form for the purpose of depicting the order of transformations.
Also, it is easier to remember the individual transformation matrices than the composite matrix. We
may need to rotate an object about a given line. For instance, to rotate an object in Figure 2.14 (a) by
45 ° about the line L≡y = x. One way is to rotate the object about the z-axis such that L coincides with
thex-axis, perform rotation about the x-axis and then rotate L about the z-axis to its original location.
The combined transformation would then be
Eq. (2.23) for use in three-dimensions. For
instance, the translation matrix to move a point
and thus an object, e.g. in Figure 2.13, by a vector
(p,q,r) may be written as
T =
100
010
001
0001
p
q
r
⎡
⎣
⎢
⎢
⎢
⎢
⎤
⎦
⎥
⎥
⎥
⎥
(2.24)
2.5.1 Rotation in Three-Dimensions
The rotation matrix in Eq. (2.4) can be modified to
accommodate the three-dimensional homogenous
coordinates. For rotation by angle θabout the z-
axis (the zcoordinate does not change), we get