[Numpy-discussion] Quaternion dtype for NumPy - initial implementation available

Martin Ling martin-numpy at earth.li
Sun Jul 17 16:03:17 EDT 2011


On Sat, Jul 16, 2011 at 08:16:44PM -0400, Anne Archibald wrote:
> The next interesting question is, how well does scipy.interpolate deal
> with them? For really good rotational paths I seem to recall you want
> specialized splines, but simply interpolating in the quaternion domain
> is not a bad quick and dirty approach.

Hi Anne,

Actually that's next on my list.

The most commonly used quaternion interpolation algorithm is Ken
Shoemake's SLERP. There is an improved one called SQUAD which is
C^1-continuous, i.e defines continuous angular velocities as well as
just rotations.

For the inertial sensing simulator I mentioned we needed C^2
continuitiy, so we implemented the quaternion B-spline algorithm from:

M-J Kim, M-S Kim and S Y Shin, "A General Construction Scheme for Unit
Quaternion Curves with Simple High Order Derivatives, in "Proceedings
of the 22nd Annual Conference on Computer Graphics and Interactive
Techniques (SIG-GRAPH’95)", pp. 369-376, ACM, 1995.

At the moment this uses our Cython-based quaternion library, but my plan
once the quaternion dtype is nailed down would be to rewrite these
interpolators to use the dtype, and submit the result to
scipy.interpolate.


Martin



More information about the NumPy-Discussion mailing list