dehomogenize_and_unflatten_frames_numpy

compas.geometry.dehomogenize_and_unflatten_frames_numpy(points_and_vectors)[source]

Dehomogenize a list of vectors and unflatten the 2D list into a 3D list.

Parameters

points_and_vectors (array_like[[float, float, float, float]]) – Homogenized points and vectors.

Returns

(N / 3, 3, 3) ndarray – The frames.

Examples

>>> points_and_vectors = [(1., 1., 1., 1.), (0., 1., 0., 0.), (1., 0., 0., 0.)]
>>> res = dehomogenize_and_unflatten_frames_numpy(points_and_vectors)
>>> np.allclose(res, [[1.0, 1.0, 1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]])
True