transform_vectors_numpy

compas.geometry.transform_vectors_numpy(vectors, T)[source]

Transform multiple vectors with one Transformation using numpy.

Parameters:
vectorssequence[[float, float, float] | compas.geometry.Vector]

A list of vectors to be transformed.

Tcompas.geometry.Transformation

The transformation to apply.

Returns:
(N, 3) ndarray

The transformed vectors.

Examples

>>> from compas.geometry import matrix_from_axis_and_angle
>>> vectors = [[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])
>>> vectors_transformed = transform_vectors_numpy(vectors, T)