Graphics Reference
In-Depth Information
Fig. 3.6 Vector v is derived
from a part of v 1 and b part
of v 2
Furthermore,
m = a cos
n = b cos ( 1
t) θ
where
m
+
n
=
1 .
(3.9)
From ( 3.8 )
a sin
sin ( 1
b
=
t) θ
and from ( 3.9 ) we get
a sin cos ( 1
t) θ
a cos +
=
1 .
sin ( 1
t) θ
Solving for a we find that
sin ( 1
t) θ
a
=
sin θ
sin
sin θ
b
=
.
Therefore, the final spherical interpolant is
sin ( 1
t ) θ
sin
sin θ
v
=
v 1 +
v 2 .
(3.10)
sin θ
To see how this operates, let's consider a simpl e exercise of interpolating be-
tween two unit vectors
1 / 21 / 2
T . The angle θ between the
vectors is 135°. Equation ( 3.10 ) is used to interpolate individually the x - and the
y -components individually:
T
[
10
]
and
[−
]
sin ( 1
t) 135°
sin 135°
sin t 135°
sin 135°
1
2
v x =
×
( 1 )
+
×
.
sin ( 1
t) 135°
sin 135°
sin t 135°
sin 135° ×
1
2
v y =
× ( 0 ) +
Search WWH ::




Custom Search