world_to_local_coordinates
- compas.geometry.world_to_local_coordinates(frame, xyz)[source]
Convert global coordinates to local coordinates.
- Parameters:
- frame[point, vector, vector]
The local coordinate system.
- xyzarray-like[[float, float, float] |
compas.geometry.Point
] The global coordinates of the points to convert.
- Returns:
- list[[float, float, 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)] >>> print(Point(*world_to_local_coordinates(f, xyz)[0])) Point(x=3.726, y=4.088, z=1.550)