local_to_world_coordinates_numpy
- compas.geometry.local_to_world_coordinates_numpy(frame, rst)[source]
Convert local coordinates to global (world) coordinates.
- Parameters
frame ([point, vector, vector] |
compas.geometry.Frame
) – The local coordinate system.rst (array-like[[float, float, float] |
compas.geometry.Point
]) – The coordinates of the points wrt the local coordinate system.
- Returns
(N, 3) ndarray – The world coordinates of the given points.
Notes
origin and uvw together form the frame of local coordinates.
Examples
>>> from compas.geometry import Point, Frame >>> frame = Frame([0, 1, 0], [3, 4, 1], [1, 5, 9]) >>> rst = [Point(3.726, 4.088, 1.550)] >>> xyz = local_to_world_coordinates_numpy(frame, rst) >>> np.allclose(xyz, [[2.000, 3.000, 5.000]], rtol=1e-3) True