Graphics Reference
In-Depth Information
Fig. 3.7
Curves of the interpolated angles
Fig. 3.8
A trace of the
interpolated vectors between
[
T
1
√
2
1
√
2
]
T
10
]
and
[−
Figure
3.7
shows the interpolating curves and Fig.
3.8
shows the positions of the
interpolated vectors, and a trace of the interpolated vectors.
Two observations to note about (
3.10
):
•
First, the angle
θ
is the angle between the two vectors, which, if not known, can
be computed using the dot product.
•
0°
,
180° the
denominator collapses to zero. To illustrate this we will repeat (
3.10
)for
θ
=
179°.
The result is shown in Fig.
3.9
, which reveals clearly that the interpolant works
normally over this range. One more degree, however, and it fails! Nevertheless, one
could still leave the range equal to 180° and test for the conditions
t
Second, the range of
θ
is given by 0
<θ<
180°, for when
θ
=
=
0 then
v
=
v
1
and when
t
v
2
.
So far, we have only considered unit vectors. Now let's see how the interpolant
responds to vectors of different magnitudes. As a test, we can input the following
vectors to (
3.10
):
=
180° then
v
=
2
0
0
1
.
v
1
=
and
v
2
=
The separating angle
θ
=
90°, and the result is shown in Fig.
3.10
.Notehowthe
initial length of
v
1
reduces from 2 to 1 over 90°. It is left to the reader to examine
other combinations of vectors.