jaxtransform3d.rotations.compact_axis_angle_from_quaternion#
- jaxtransform3d.rotations.compact_axis_angle_from_quaternion(q: Array | ndarray | bool_ | number | bool | int | float | complex) Array [source]#
Compute axis-angle from quaternion.
This operation is called logarithmic map.
- Parameters:
- qarray-like, shape (…, 4)
Unit quaternion to represent rotation: (w, x, y, z)
- Returns:
- aarray, shape (…, 3)
Axis of rotation and rotation angle: angle * (x, y, z). The angle is constrained to [0, pi) so that the mapping is unique.
See also
quaternion_from_compact_axis_angle
Exponential map.
compact_axis_angle_from_matrix
Logarithmic map for rotation matrix.
Examples
>>> import jax.numpy as jnp >>> from jaxtransform3d.rotations import compact_axis_angle_from_quaternion >>> compact_axis_angle_from_quaternion(jnp.array([1., 0., 0., 0.])) Array([0., 0., 0.], dtype=...)