Rotation.from_frame

classmethod Rotation.from_frame(frame)

Computes the rotational transformation from world XY to frame.

Notes

Creating a rotation from a frame means that we omit all translational components. If that is unwanted, use Transformation.from_frame(frame).

Parameters

frame (Frame) – A frame describing the targeted Cartesian coordinate system.

Examples

>>> from compas.geometry import Frame
>>> f1 = Frame([1, 1, 1], [0.68, 0.68, 0.27], [-0.67, 0.73, -0.15])
>>> T = Transformation.from_frame(f1)
>>> f2 = Frame.from_transformation(T)
>>> f1 == f2
True