next up previous contents
Next: Slerp_prime Up: The Quaternion class Previous: Omega,   Contents

Subsections

Slerp

Syntax

Quaternion Slerp(const Quaternion & q0, const Quaternion & q1, 
                 const Real t);

Description

Slerp stands for Spherical Linear Interpolation. Slerp is not a member function of the class Quaternion. The quaternions $q_0$ and $q_1$ needs to be unit quaternions. It returns a unit quaternion. As the parameter $t$ uniformly varies between 0 and 1, the values $q(t)$ are required to uniformly vary along the circular arc from $q_0$ to $q_1$.

It is customary to choose the sign $G$ on $q_1$ so that $q_0 \cdot
Gq_1 \geq 0$ (the angle between $q_0$ and $Gq_1$ is acute). This choice avoids extra spinning caused by the interpolated rotations [2]. For unit quaternions Slerp is defined as

$\displaystyle q = \Bigg\{
\begin{array}{cc}
q_0(q_0^{-1}q_1)^t & \textrm{if $q_0 \cdot q_1 \geq 0$} \\
q_0(q_0^{-1}(-q_1))^t & \textrm{otherwise}
\end{array}$     (2.25)

Return Value

Quaternion



Richard Gourdeau 2004-07-06