Graphics Reference
In-Depth Information
now state the other two matrices for rotating about an axis parallel with the
x -axis and parallel with the y -axis:
rotating about an axis parallel with the x -axis:
·
x
y
z
1
1
0
0
0
x
y
z
1
0 β )
sin( β )
p y (1
cos( β )) + p z sin( β )
=
0
sin( β )
cos( β )
p z (1
cos( β ))
p y sin( β )
0
0
0
1
(7.68)
rotating about an axis parallel with the y -axis:
x
y
z
1
cos( β )
0
sin( β )
p x (1
cos( β ))
p z sin( β )
x
y
z
1
·
0
1
0
0
=
sin( β )0 β )
p z (1
cos( β )) + p x sin( β )
0
0
0
1
(7.69)
7.4.6 3D Reflections
Reflections in 3D occur with respect to a plane, rather than an axis. The
matrix giving the reflection relative to the yz -plane is
·
x
y
z
1
1000
0100
0010
0001
x
y
z
1
=
(7.70)
and the reflection relative to a plane parallel to, and a x units from, the yz -
plane is
·
x
y
z
1
100 a x
010 0
001 0
000 1
x
y
z
1
=
(7.71)
It is left to the reader to develop similar matrices for the other major axial
planes.
7.5 Change of Axes
Points in one coordinate system often have to be referenced in another one.
For example, to view a 3D scene from an arbitrary position, a virtual camera
is positioned in the world space using a series of transformations. An object's
Search WWH ::




Custom Search