warp.quat_twist#

warp.quat_twist(axis: vec3f, q: quatf) → quatf[source]#
  • Kernel: true
  • Python: true
  • Differentiable: true

Return the twist component of q about axis.

A swing-twist decomposition splits a rotation into a twist about axis and a swing about an axis perpendicular to axis.

Parameters:
  • axis – Twist axis, with unit length.

  • q – Rotation quaternion.

Returns:

Unit twist quaternion. It is unspecified when q is a rotation of 180 degrees about an axis perpendicular to axis.

Return type:

warp.quat