Quaternion.slerp

Quaternion.slerp(other, t)[source]

Slerp: spherical interpolation of two quaternions.

Parameters:
othercompas.geometry.Quaternion

The other quaternion to interpolate between.

tfloat

A parameter in the range [0-1].

Returns:
compas.geometry.Quaternion

Examples

>>> q1 = Quaternion(1, 0, 0, 0)
>>> q2 = Quaternion(0, 1, 0, 0)
>>> t = 0.5
>>> interpolated_quaternion = Quaternion.slerp(q1, q2, t)