warp.quat_twist#

warp.quat_twist(axis: vec3f, q: quatf) quatf#
  • Kernel

  • Differentiable

Extract the twist quaternion of q around axis.

This performs a swing-twist decomposition and returns the component of rotation in q whose rotation axis is parallel to axis.

Parameters:
  • axis – Twist axis (expected to be normalized).

  • q – Input quaternion in (x, y, z, w) layout.

Returns:

Unit twist quaternion.

Return type:

wp.quat