transform_vectors
- compas.geometry.transform_vectors(vectors, T)[source]
Transform multiple vectors with one transformation matrix.
- Parameters
vectors (sequence[[float, float, float] |
compas.geometry.Vector
]) – A list of vectors to be transformed.T (list[list[float]] |
compas.geometry.Transformation
) – The transformation to apply.
- Returns
list[[float, float, float]] – Transformed vectors.
Examples
>>> 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(vectors, T)