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 byb, followed by counterclockwise rotation about the \(z\)-axis byc. 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:
a (
<class 'Float[Array, '...']'>) – Rotation angle about \(x\)-axis in radians.b (
<class 'Float[Array, '...']'>) – Rotation angle about \(y\)-axis in radians.c (
<class 'Float[Array, '...']'>) – Rotation angle about \(z\)-axis in radians.
- Return type:
- Returns:
The \(3\times3\) rotation matrix.