to_matrix#

Rotation.to_matrix() ndarray[source]#

Return the rotations as orientation matrices [Rowenhorst et al., 2015].

Returns:
om

Array of orientation matrices.

Examples

>>> from orix.quaternion import Rotation
>>> r = Rotation([[1, 0, 0, 0], [2, 0, 0, 0]])
>>> np.allclose(r.to_matrix(), np.eye(3))
True
>>> r = Rotation([[0, 1, 0, 0], [0, 2, 0, 0]])
>>> np.allclose(r.to_matrix(), np.diag([1, -1, -1]))
True