Graphics Reference
In-Depth Information
and
y
v
cos
j
=
v
If
v
is a unit vector,
cos
i
=
v
x
and
cos
j
=
v
y
and are called the direction cosines of
v
.
Y
v
α
j
y
v
α
k
α
i
X
z
v
x
v
Z
Figure 2.42.
In the 3D scenario shown in Fig. 2.42, it may not be immediately obvious what cos
i
cos
j
,
and cos
k
are, but the dot product reveals the answer.
To find cos
i
,
v
·
i
=
v
i
cos
i
=
x
v
Therefore,
x
v
cos
i
=
v
Similarly,
y
v
cos
j
=
v
and
z
v
cos
k
=
v
Once more, if
v
is a unit vector, the direction cosines are the vector's components.