Graphics Reference
In-Depth Information
WC
plane node
xform
M p
OC
V s
y
R p
(Rotation by: )
V u
Plane
OC
z
V f
x
PlanePos in WC
P wc
PlanePos
in OC
oc
P p
Figure 16.9.
The plane OC and WC points.
the plane continuously aims its front toward the tiger. This aiming functionality
can be implemented by defining and maintaining an appropriate rotation matrix
for the purple plane. In this case, as illustrated in Figure 16.9, by observing the
orthonormal basis defined in the plane's OC space:
V s =(
x s ,
y s ,
z s ) ,
V u =(
Plane orthonormal basis:
x u ,
y u ,
z u ) ,
V f =(
x f ,
y f ,
z f ) ,
where the corresponding rotation matrix R p for the plane is
x s
y s
z s
.
R p =
x u
y u
z u
(16.5)
x f
y f
z f
In this case, the z -axis ( V f ) is the front direction, the y -axis ( V u ) is the up direc-
tion, and with the right-handed coordinate system, the x -axis,
=
×
V s
V u
V f
(16.6)
and normalizing V s to get V s , is the side direction. Now, to aim the plane toward
the tiger, we must compute V f to be the direction toward the tiger. Assuming P wc
p
is the plane position in WC and P wc
t
is the position of the tiger, then
P wc
P wc
V f = (
) .
t
p
Search WWH ::




Custom Search