Graphics Reference
In-Depth Information
Y
X'
Y'
Z'
X'
Z
X
Fig. 7.21. The X Y Z axial system after a roll of 90 .
consisting of a translation back to the origin, followed by a change of axial
systems. This can be expressed as
·
·
x
y
z
1
r 11 r 12 r 13 0
r 21 r 22 r 23 0
r 31 r 32 r 33 0
0001
100
t x
x
y
z
1
010
t y
=
(7.77)
001
t z
000
1
As an example, consider the situation shown in Figure 7.22. The values of
( t x ,t y ,t z ) are (10, 1, 1), and the direction cosines are as shown in the following
matrix operation:
·
·
x
y
z
1
10 00
01 00
00
100
10
x
y
z
1
010
1
=
10
00 01
001
1
000
1
which concatenates to
x
y
z
1
10 0
0
x
y
z
1
·
01 0
1
=
00
1
1
00 0
1
Substituting (0, 0, 0) for ( x , y , z ) in the above transform produces (10 ,
1 , 1)
for ( x ,y ,z ), which can be confirmed from Figure 7.22. Similarly, substituting
(0, 1, 1) for ( x , y , z ) produces (10,0,0) for ( x ,y ,z ), which is also correct.
7.6.3 Euler Angles
Another approach for locating the virtual camera involves Euler angles, but
we must remember that they suffer from gimbal lock (see page 70). However, if
Search WWH ::




Custom Search