Jean-Luc Dery (dery++at++atlantis.discreet.qc.ca)
Wed, 25 Sep 1996 11:08:42 -0400
I've experienced the same problem in one of the projects I worked on. The
problem came from using pfMatrix which uses the hpr angles. h and r values step
by 180 degrees when the p value equals +90 or -90 degrees. When doing
smoothing, the problem becomes significant. The fix we made was a quick one,
but I'm happy to know that the problem can be solved with pfQuat.
Here's some inputs I gathered from Jim Helman previous replies on this topic:
"Interpolation of quaternions (as presented by Ken Shoemake) is an effective
technique for rotation interpolation. Spherical linear interpolation is
performed with pfQuat::slerp, which produces a pfQuat that is t of the way
between q1 and q2."
"Because both q and -q represent the same rotation (quaternions have a rotation
range of [-360,360] degrees) conversions such as pfMatrix::getOrthoQuat make an
arbitrary choice of the sign of the returned quaternion. To prevent the
arbitrary sign from introducing large, unintended rotations, pfQuat::slerp
checks the angle theta between q1 and q2. If theta exceeds 180 degrees, q2 is
negated changing the interpolations range from [0,theta] to [0, theta-360
degrees]."
"For more information on quaternions, see the article by by Sir William Rowan
Hamilton "On quaternions; or on a new system of imaginaries in algebra," in the
Philosophical Magazine, xxv pp. 10-13 (July 1844). More recent references
include "Animating Rotation with Quaternion Curves," SIGGRAPH Proceedings Vol
19, Number 3, 1985, and "Quaternion Calculus For Animation," in "Math for
SIGGRAPH", Course Notes, #23, SIGGRAPH 1989, both by Ken Shoemake. Note that
for consistency with Performer's transformation order, pfQuats are the
conjugates of the quaternions described in these references."
"There's a *very* nice little tutorial paper available on.
ftp://ftp.cis.upenn.edu/pub/graphics/shoemake"
If you want to refer to Jim Helman's mail on this, look in Performer archives
on
Wed Sep 27 1995.
Hope this helps,
-- _____________________________________________________________________________Jean-Luc Dery Discreet Logic System Engineer 5505 boul. St-Laurent, bureau 5200 3-D Graphics Technology Montreal (Quebec), Canada, H2T 1S6 Tel: (514) 272-0525 #394 Email: dery++at++discreet.com Fax: (514) 272-0585 _____________________________________________________________________________
======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:38 PDT