to_rodrigues#

Quaternion.to_rodrigues(frank: bool = False) Rodrigues | ndarray[source]#
Return the unit quaternions as Rodrigues or Rodrigues-Frank

vectors [Rowenhorst et al., 2015].

Parameters:
frank

Whether to return Rodrigues vectors scaled by \(\tan(\theta/2)\), where \(\theta\) is the angle of rotation, or Rodrigues-Frank vectors scaled by \(\omega = 2\arctan(|\rho|)\) in an array.

Returns:
ro

Vectors \(\hat{\mathbf{n}}\) parallel to the axis of rotation if frank=False or an array of four-component vectors if frank=True.

Notes

Rodrigues vectors, originally proposed by O. Rodrigues, are often used for plotting orientations as they create isomorphic (though not volume-preserving) plots and form fundamental zones with rectilinear boundaries. These features are well-demonstrated in [Frank, 1988]. See [Rowenhorst et al., 2015] for examples of usage of Rodrigues-Frank vectors.

Examples

A 3-fold rotation around the [111] axis

>>> from orix.quaternion import Quaternion
>>> Q = Quaternion.from_axes_angles([1, 1, 1], 120, degrees=True)
>>> ro1 = Q.to_rodrigues()
>>> ro1
Rodrigues (1,)
[[1. 1. 1.]]
>>> ro1.norm
array([1.73205081])
>>> ro2 = Q.to_rodrigues(frank=True)
>>> ro2
array([[0.57735027, 0.57735027, 0.57735027, 1.73205081]])
>>> np.linalg.norm(ro2[:, :3])
1.0

A 45:math:degree rotation around the [111] axis

>>> Q2 = Quaternion.from_axes_angles([1, 1, 1], 45, degrees=True)
>>> ro3 = Q2.to_rodrigues()
>>> ro3
Rodrigues (1,)
[[0.2391 0.2391 0.2391]]