Compute a 3x3 rotation matrix from a given quaternion (4-vector).
Parameters: | q : np.ndarray, size=(..., 4)
|
---|---|
Returns: | Rq : np.ndarray, size=(..., 3, 3)
|
See also
References
[R18] | http://en.wikipedia.org/wiki/Rotation_matrix#Quaternion |
Examples
>>> q = np.array([0.1, 0.2, 0.3, -0.4])
>>> Rq = rotation_matrix_from_quaternion(q)