Quaternion Function Reference

spherical_mean

Spherical (geodesic or intrinsic) mean

Syntax

y = spherical_mean(q, t)

Description

spherical_mean(q, t) computes a quaternion (full or pure according as to whether q is full or pure) which is the geodesic mean of the quaternions in vector q. t is a tolerance (0 ≤ t ≤ 1) and may be omitted (in which case a default is used).

The slerp function may be regarded as a special case of the spherical mean: given two arbitrary quaternions, the following calls will return the same result, mid-way along the 'arc' between the two quaternions: slerp(p, q, 0.5) and spherical_mean([p,q])

The third parameter, t, gives the angular tolerance between the quaternions in q.

q is not restricted to be a real quaternion, but interpretation of the result in the biquaternion case is unknown, and a warning is currently generated.

Examples

To interpolate between qi, qj and qk we can supply a vector containing the three values. The result is at the centre of the spherical triangle given by the three unit quaternions.
spherical_mean([qi, qj, qk])
 
ans = 0.5774 * I + 0.5774 * J + 0.5774 * K

See Also

QTFM function: slerp

References

  1. Samuel R. Buss and Jay P. Fillmore, 'Spherical averages and applications to spherical splines and interpolation', ACM Transactions on Graphics, 20 (2), 95-126, April 2001. DOI: 10.1145/502122.502124.

(c) 2008-2016 Stephen J. Sangwine and Nicolas Le Bihan

License terms.