v3d.math.euler_to_rot#

visu3d.math.euler_to_rot(x: etils.enp.array_types.typing.FloatArray | None = None, y: etils.enp.array_types.typing.FloatArray | None = None, z: etils.enp.array_types.typing.FloatArray | None = None, *, order: str = 'zyx', xnp: Any = Ellipsis) etils.enp.array_types.typing.FloatArray[source]#

Creates a 3x3 matrix from the euler radian angles.

By default, rotations are applied following the Tait-Bryan chained rotations (z, y, x):

R = Rz @ Ry @ Rx

See: https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Euler_angles_(z-y%E2%80%B2-x%E2%80%B3_intrinsic)_%E2%86%92_rotation_matrix

Parameters:
  • x – Rotation around x (in radians): roll == ϕ == phi == x

  • y – Rotation around y (in radians): pitch == θ == theta == y

  • z – Rotation around z (in radians): yaw == ψ == psi == z

  • order – Axis order convention used (e.g. ‘xyz’, ‘zyx’,…)

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

Returns:

The transformation.

Return type:

tr