Graphics Reference
In-Depth Information
Linearly interpolated intermediate points
Projection of intermediate points onto circle
Equal intervals
Unequal intervals
FIGURE 3.23
Equally spaced linear interpolations of straight-line path between two points on a circle generate unequal spacing
of points after projecting onto a circle. Interpolating quaternion four-tuples exhibit the same problem.
quaternion vectors. This can be determined by using the four-dimensional dot product of the quater-
nions to compute the cosine of the angle between q 1 and q 2 ( Eq. 3.28 ) . If the cosine is positive, then the
path from q 1 to q 2 is shorter; otherwise the path from q 1 to
q 2 is shorter ( Figure 3.24 ) .
cos
ðyÞ¼q 1 q 2 ¼ s 1 s 2 þ v 1 v 2
(3.28)
The formula for spherical linear interpolation ( slerp ) between unit quaternions q 1 and q 2 with
parameter u varying from 0 to 1 is given in Equation 3.29 , where q 1 q 2 ¼
cos( y ). Notice that this does
q 2
θ
q 1
Center of
sphere
180 θ
q 2
FIGURE 3.24
The closer of the two representations of orientation, q 2 , is the better choice to use in interpolation. In this case
q 2
is closer to
q 2 , as measured from the center of the sphere, is computed by
taking the dot product of q 1 and q 2 . The same is done for q 2 .
q 1 than
q 2 . The angle between
q 1 and
 
Search WWH ::




Custom Search