Graphics Reference
In-Depth Information
Y
P
( x
, y
, z
)
P ( x , y, z )
b
X
Z
Fig. 7.8. Rotating P about the z -axis.
which basically rotates a point about the z -axis.
When rotating about the x -axis, the x -coordinate remains constant while
the y -and z -coordinates are changed. Algebraically, this is
x = x
y = y cos( β )
z sin( β )
z = y sin( β )+ z cos( β )
(7.57)
or, in matrix form,
x
y
z
1
1
0
0
0
x
y
z
1
·
0 β )
sin( β )0
=
(7.58)
0
sin( β )
cos( β )0
0
0
0
1
When rotating about the y -axis, the y -coordinate remains constant while the
x -and z -coordinates are changed. Algebraically, this is
x = z sin( β )+ x cos( β )
y = y
z = z cos( β )
x sin( β )
(7.59)
or, in matrix form,
·
x
y
z
1
cos( β )0 in β )0
0
x
y
z
1
1
0
0
=
(7.60)
sin( β )0 β )0
0
0
0
1
Note that the matrix terms do not appear to share the symmetry seen in the
previous two matrices. Nothing has really gone wrong, it is just the way the
axes are paired together to rotate the coordinates.
Search WWH ::




Custom Search