Graphics Reference
In-Depth Information
Fig. 9.3 A unit cube with
vertices coded as shown in
Table 9.1
Ta b l e 9 . 1 Vertex coordinates
for the cube in Fig. 9.3
vertex
0
1
2
3
4
5
6
7
x
0
0
0
0
1
1
1
1
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
followed by a rotation γ about the z -axis. As mentioned above, these rotations are
called Euler rotations.
One of the problems with Euler rotations is visualising exactly what is happening
at each step, and predicting the orientation of an object after a composite rotation. To
simplify the problem we will employ a unit cube whose vertices are numbered 0 to
7 as shown in Fig. 9.3 . We will also employ the following binary coded expression
that uses the Cartesian coordinates of the vertex in the vertex number:
vertex
=
4 x
+
2 y
+
z.
For example, vertex 0 has coordinates ( 0 , 0 , 0 ) , and vertex 7 has coordinates
( 1 , 1 , 1 ) . All the codes are shown in Table 9.1 .
Let's repeat the three rotation transforms for rotating points about the x -, y - and
z -axes respectively, in their non-homogeneous form and substitute c for cos and s
for sin to save space:
10
0
rotate α about the x -axis
R α,x =
0
c α
s α
0
s α
c α
c β 0 s β
01 0
s β
R β,y =
rotate β about the y -axis
0
c β
c γ
s γ
0
.
R γ,z =
s γ
c γ
0
rotate γ about the z -axis
0
0
1
 
Search WWH ::




Custom Search