world_to_local_coordinates
- compas.geometry.world_to_local_coordinates(frame, xyz)[source]
Convert global coordinates to local coordinates.
- Parameters
frame (
Frame
or [point, xaxis, yaxis]) – The local coordinate system.xyz (array-like) – The global coordinates of the points to convert.
- Returns
list of list of float – The coordinates of the given points in the local coordinate system.
Examples
>>> from compas.geometry import Point, Frame >>> f = Frame([0, 1, 0], [3, 4, 1], [1, 5, 9]) >>> xyz = [Point(2, 3, 5)] >>> Point(*world_to_local_coordinates(f, xyz)[0]) Point(3.726, 4.088, 1.550)