world_to_local_coordinates_numpy
- compas.geometry.world_to_local_coordinates_numpy(frame, xyz)[source]
Convert global coordinates to local coordinates.
- Parameters
- Returns
(N, 3) ndarray – The coordinates of the given points in the local coordinate system.
Examples
>>> from compas.geometry import Point, Frame >>> frame = Frame([0, 1, 0], [3, 4, 1], [1, 5, 9]) >>> xyz = [Point(2, 3, 5)] >>> rst = world_to_local_coordinates_numpy(frame, xyz) >>> np.allclose(rst, [[3.726, 4.088, 1.550]], rtol=1e-3) True