warp.quat_from_axis_angle#

warp.quat_from_axis_angle(
axis: Vector[Float, Literal[3]],
angle: Float,
) → Quaternion[Float]#
  • Kernel: true
  • Python: true
  • Differentiable: true

Return the quaternion for a rotation of angle radians about axis.

Positive angles follow the right-hand rule: a rotation of pi / 2 about the z axis maps the x axis onto the y axis.

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

  • angle – Rotation angle in radians.

Returns:

The quaternion (axis * sin(angle / 2), cos(angle / 2)) in (x, y, z, w) order.