Translation.from_list

classmethod Translation.from_list(numbers)

Creates a transformation from a list of 16 numbers.

Parameters

numbers (list[float]) – A list of 16 numbers

Returns

compas.geometry.Transformation – The transformation.

Notes

Since the transformation matrix follows the row-major order, the translational components must be at the list’s indices 3, 7, 11.

Examples

>>> numbers = [1, 0, 0, 3, 0, 1, 0, 4, 0, 0, 1, 5, 0, 0, 0, 1]
>>> T = Transformation.from_list(numbers)