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

Subsections

Squad

Syntax

Quaternion Squad(const Quaternion & p, const Quaternion & a, 
                 const Quaternion & b, const Quaternion & r, 
                 const Real t);

Description

Squad stands for Spherical Cubic Interpolation. Squad is not a member function of the class Quaternion. The quaternions $p$, $a$, $b$ and $r$ needs to be unit quaternions. It returns a unit quaternion.

Squad uses an iterative of three slerps. Suppose four quaternions, $p$, $a$, $b$ and $r$ as the ordered vertices of quadrilateral. Interpolate $c$ along $p$ to $q$ using slerp and $d$ along $a$ to $b$ also using slerp. Now interpolate $q$ along $c$ to $d$ [2]. Squad is defined as

$\displaystyle q = Slerp(Slerp(p,r,t),Slerp(a,b,t),2t(1-t));$     (2.27)

Return Value

Quaternion



Richard Gourdeau 2004-07-06