transform_points_numpy

compas.geometry.transform_points_numpy(points, T)[source]

Transform multiple points with one Transformation using numpy.

Parameters:
pointssequence[[float, float, float] | compas.geometry.Point]

A list of points to be transformed.

Tcompas.geometry.Transformation | list[list[float]]

The transformation to apply.

Returns:
(N, 3) ndarray

The transformed points.

Examples

>>> from compas.geometry import matrix_from_axis_and_angle
>>> points = [[1, 0, 0], [1, 2, 4], [4, 7, 1]]
>>> T = matrix_from_axis_and_angle([0, 2, 0], math.radians(45), point=[4, 5, 6])
>>> points_transformed = transform_points_numpy(points, T)