Graphics Reference
In-Depth Information
Y
cos
b
b
q
a
cos
q
cos
a
Z
X
Fig. 7.19.
The components of a unit vector are equal to the cosines of the angles
between the vector and the axes.
Y
Y'
X'
Z'
Z
X
Fig. 7.20.
Two axial systems mutually aligned.
which is the identity matrix and implies that (
x
,y
,z
)=(
x, y, z
).
Figure 7.21 shows another situation, and the associated transform is
⎡
⎣
⎤
⎦
⎡
⎣
⎤
⎦
·
⎡
⎣
⎤
⎦
x
y
z
1
0100
x
y
z
1
−
1000
0010
0001
=
1
,
0) for (
x
,y
,z
)
in the new frame of reference, which by inspection is correct.
If the virtual camera is offset by (
t
x
,t
y
,t
z
) the transform relating points
in world space to camera space can be expressed as a compound operation
Substituting the (1, 1, 0) for (
x
,
y
,
z
) produces values of (1
,
−