Graphics Reference
In-Depth Information
Y
Y'
X'
90
−
b
b
b
X
Fig. 7.17.
If the
X
-and
Y
-axes are assumed to be unit vectors their direction cosines
form the elements of the rotation matrix.
Before exploring changes of axes in 3D let's evaluate a simple example in
2D where a set of axes is rotated 45
◦
as shown in Figure 7.18. The appropriate
transform is
⎡
⎤
⎡
⎤
⎡
⎤
x
y
1
cos(45
◦
)
sin(45
◦
)0
x
y
1
⎣
⎦
=
⎣
⎦
·
⎣
⎦
sin(45
◦
)
cos(45
◦
)0
−
0
0
1
⎡
⎤
⎡
⎤
0
.
707
0
.
707
0
x
y
1
⎣
⎦
·
⎣
⎦
=
−
0
.
707
0
.
707
0
0
0
1
The four vertices on a unit square become
(0
,
0)
→
(0
,
0)
(1
,
0)
→
(0
.
707
,
−
0
.
707)
(1
,
1)
→
(1
.
414
,
0)
(0
,
1)
→
(0
.
707
,
0
.
707)
which inspection of Figure 7.18 shows to be correct.
Y
(0,1)
Y'
X'
(0.707, 0.707)'
(1,1)
(1.414, 0)'
(1,0)
(0.707,
−
0.707)'
X
Fig. 7.18.
The vertices of a unit square relative to the two axial systems.