v3d.math.rot_to_euler#

visu3d.math.rot_to_euler(rot: etils.enp.array_types.typing.FloatArray, *, eps: float = 1e-06, xnp: Any = Ellipsis) Tuple[etils.enp.array_types.typing.FloatArray, etils.enp.array_types.typing.FloatArray, etils.enp.array_types.typing.FloatArray][source]#

Extract euler angles from a 3x3 rotation matrix.

Like euler_to_rot, it follow the z, y, x convension, BUT returns x, y, z.

From: https://www.geometrictools.com/Documentation/EulerAngles.pdf

Parameters:
  • rot – Rotation matrix

  • eps – Precision threshold to detect 90 degree angles.

  • xnp – Np module used (jnp, tnp, np,…)

Returns:

The x, y, z euler angle (in radian)