dehomogenize_numpy

compas.geometry.dehomogenize_numpy(data)[source]

Dehomogenizes points or vectors.

Parameters:
dataarray_like[[float, float, float, float]]

The data to dehomogenize.

Returns:
(N, 3) ndarray

Examples

>>> points = [[1, 1, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0]]
>>> res = dehomogenize_numpy(points)
>>> np.allclose(res, [[1.0, 1.0, 1.0], [0.0, 1.0, 0.0], [1.0, -0.0, 0.0]])
True