Graphics Reference
In-Depth Information
P ( x , y )
Y
x
P' ( x' , y' )
Y'
y'
X'
x'
y
b
X
Fig. 7.16. The secondary set of axes are rotated by β .
When a coordinate system is rotated and translated relative to the refer-
ence system, a point P ( x , y ) has coordinates ( x ,y ) relative to the new axes
given by
x
y
1
cos( β ) in β )0
10
t x
x
y
1
=
·
·
sin( β ) β )0
0
01
t y
00 1
0
1
which simplifies to
x
y
1
cos( β ) in β )
t x cos( β )
t y sin( β )
x
y
1
=
·
sin( β ) β )
t x sin( β )
t y cos( β )
(7.74)
0
0
1
7.6 Direction Cosines
Direction cosines are the cosines of the angles between a vector and the axes,
and for unit vectors they are the vector's components. Figure 7.17 shows two
unit vectors X and Y , and by inspection the direction cosines for X are
cos( β ) and cos(90
β ), which can be rewritten as cos( β ) and sin( β ), and the
direction cosines for Y cos(90 + β ) and cos( β ), which can be rewritten as
sin( β ) and cos( β ). But these direction cosines cos( β ) , sin( β ) ,
sin( β )and
cos( β ) are the four elements of the rotation matrix used above:
cos( β ) in β )
(7.75)
sin( β ) β )
The top row contains the direction cosines for the X -axis and the bottom
row contains the direction cosines for the Y -axis. This relationship also holds
in 3D.
Search WWH ::




Custom Search