- qspec. rotation_matrix ( alpha , dr )[source]
-
The matrix of a rotation by the angle $\alpha$ about the axis $\hat{n}$ (Rodrigues' rotation formula)
$$ R = \cos(\alpha)\mathbb{1} + \sin(\alpha)[\hat{n}]_\times + (1 - \cos(\alpha))\hat{n}\hat{n}^T, $$where $[\hat{n}]_\times$ is the cross-product matrix of $\hat{n}$.
- Parameters:
-
- alphaarray_like
The angle $\alpha$ of the rotation (rad).
- drscalar_nd
The vector to rotate about. Does not have to be normalized.
- Returns:
-
- Rndarray
The rotation matrix $R$.