differt.geometry.rotation_matrix_along_y_axis

differt.geometry.rotation_matrix_along_y_axis#

rotation_matrix_along_y_axis(angle)[source]#

Return a rotation matrix to rotate coordinates along y axis.

Parameters:

angle (Float[ArrayLike, '']) – The rotation angle, in radians.

Return type:

Float[Array, '3 3']

Returns:

The rotation matrix.

Examples

The following example shows how to rotate xyz coordinates along the y axis.

>>> from differt.geometry import (
...     rotation_matrix_along_y_axis,
... )
>>>
>>> xyz = jnp.array([1.0, 1.0, 0.0])
>>> rotation_matrix_along_y_axis(jnp.pi / 2) @ xyz
Array([-0.,  1., -1.], dtype=float32)