Define smoothness in squad quaternion interpolation

Started by
1 comment, last by Pokemonster 19 years, 6 months ago
Hi there, is there a way to define the smoothness in a cubic slerp (squad) interpolation of quaternions. As a concrete example, I'm using squad to interpolate camera orientations. The animation is smoother than using a standard slerp approach, but not as smooth as I would have expected. So I like to tweak the creation of the in-between quaternions, but I'm not exactly sure how...
Advertisement
A couple of things you could try:

Calcuate the second derivative of the quaternion over time and see how it varies. In smooth motion even if the first derivative is large (i.e. speed/velocity is high) the second derivative should be small or bounded. Conversely, sudden accelations and changes of speed/direction are associated with large second derivatives. For discrete data, e.g. the orientation at t, 2t, 3t, etc., work out the second differences.

Another sort of smoothness, or lack of it, is measured by curvature. E.g. when a spline loops back on itself in a tight loop it has a high curvature. See e.g.
http://mathworld.wolfram.com/Curvature.html
for a definition and how to calculate it. It's not as straightforward as the second derivative/difference but may be more more appropriate.


John BlackburneProgrammer, The Pitbull Syndicate

Thanks alot, I figured out what was wrong. I made an error when calculating the logarithm of a quaternion, which resulted in slightly bad in-between quats.

This topic is closed to new replies.

Advertisement