Rotation.from_frame
- classmethod Rotation.from_frame(frame)
Construct a rotation transformationn from world XY to frame.
- Parameters
frame ([point, vector, vector] |
Frame
) – A frame describing the targeted Cartesian coordinate system.- Returns
Notes
Creating a rotation from a frame means that we omit all translational components. If that is unwanted, use
Transformation.from_frame(frame)
.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