matrix_from_translation
- compas.geometry.matrix_from_translation(translation)[source]
Returns a 4x4 translation matrix in row-major order.
- Parameters
translation ([float, float, float]) – The x, y and z components of the translation.
- Returns
list[list[float]] – The 4x4 transformation matrix representing a translation.
Notes
[ . . . 0 ] [ . . . 1 ] [ . . . 2 ] [ . . . . ]
Examples
>>> T = matrix_from_translation([1, 2, 3])