Quaternion.from_rotation
-
classmethod
Quaternion.
from_rotation
(R)[source] Create a
Quaternion
from acompas.geometry.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)