Graphics Reference
In-Depth Information
The linear interpolation of the angle is controlled by the parameter , where
=
and
=
1
so that
ˆ
=
ˆ
+
ˆ
w
a
u
b
v
From Fig. 2.38 we get
=
and
sin
=
sin
Therefore, using the sine rule:
OW
sin =
1
sin =
a
sin =
b
sin
sin
sin =
sin1
sin
a
=
and
sin
sin =
sin
sin
b
=
Finally,
sin1
sin
sin
sin ˆ
w
ˆ
=
u
ˆ
+
v
(2.28)
Equation (2.28) is called a slerp , because in its 3D application the unit vectors are spherically
interpolated across a unit-radius sphere. This interpolant can also be used for unit quaternions.
Let's test Eq. (2.28) with a simple example.
Given
90 .
Now let's find the interpolated vector when
u
ˆ
=
i and
v
ˆ
=
j , then
=
=
05.
Y
v
w
45 °
45 °
u
X
Figure 2.39.
 
Search WWH ::




Custom Search