Short and long slerp

Home > Technology
By Bryan in Technology
Updated 3 years ago

Computes the slerp interpolated path between two quaternions p0 and p1. Because any rotation can be represented by a quaternion p or its opposite -p, the rotation path between two quaternions may be the 'long way' or the 'short way'. This function allows to compute one or the other. If not specified, the short way is computed. Slerp interpolation guarantees a constant angular velocity rotation from the start quaternion to the end. If quaternions are too close to each other (almost parallel), linear interpolation is used instead.

short-and-long-slerp