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 (list of list of float) – Homogenized points and vectors.

Returns

numpy.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