e3x.so3.rotations.rotation_euler

e3x.so3.rotations.rotation_euler(a, b, c)[source]

\(3\times3\) rotation matrix specified by Euler angles.

Calculates the \(3\times3\) rotation matrix associated with the counterclockwise rotation about the \(x\)-axis by a, followed by counterclockwise rotation about the \(y\)-axis by b, followed by counterclockwise rotation about the \(z\)-axis by c. Note that the order of rotations matters for the result.

Example

>>> import jax.numpy as jnp
>>> import e3x
>>> r = jnp.asarray([1., 0., 0.])  # Unit vector in x-direction.
>>> # Rotate by 180° about y-axis.
>>> jnp.round(r @ e3x.so3.rotation_euler(0.0, jnp.pi, 0.0), decimals=3)
Array([-1.,  0.,  0.], dtype=float32)
Parameters:
Return type:

<class 'Float[Array, '... 3 3']'>

Returns:

The \(3\times3\) rotation matrix.