Quaternion.from_rotation
- classmethod Quaternion.from_rotation(R)
Create a Quaternion from a Rotatation.
- Parameters
- Returns
compas.geometry.Quaternion
– The new quaternion.
Example
>>> from compas.geometry import Frame, Rotation >>> R = Rotation.from_frame(Frame.worldYZ()) >>> Quaternion.from_rotation(R) Quaternion(0.500, 0.500, 0.500, 0.500)