amulet.utils.matrix
module¶
- amulet.utils.matrix.scale_matrix(sx, sy, sz)[source]¶
Create a scale matrix from the inputs specified
- amulet.utils.matrix.displacement_matrix(x, y, z)[source]¶
Create a displacement matrix from the inputs specified
- amulet.utils.matrix.rotation_matrix_xy(rx, ry)[source]¶
Create a rotation matrix from the inputs specified
- amulet.utils.matrix.rotation_matrix_yx(ry, rx)[source]¶
Create a rotation matrix from the inputs specified
- amulet.utils.matrix.rotation_matrix_xyz(x, y, z)[source]¶
Create a rotation matrix from the inputs specified
- amulet.utils.matrix.transform_matrix(scale, rotation, displacement, order='xyz')[source]¶
Create a 4x4 transformation matrix from the scale, rotation and displacement specified.
- Parameters
scale (
Tuple
[float
,float
,float
]) – The scale in the x, y and z axisrotation (
Tuple
[float
,float
,float
]) – The rotation in the x, y and z axis in radians. (axis can be changed using order)displacement (
Tuple
[float
,float
,float
]) – The displacement in the x, y and z axisorder – The order to apply the rotations in.
- Returns
The 4x4 transformation matrix of combined scale, rotation and displacement
- amulet.utils.matrix.inverse_transform_matrix(scale, rotation, displacement, order='xyz')[source]¶
Create the inverse of the 4x4 transformation matrix from the scale, rotation and displacement specified. This should be the inverse of transform_matrix
- Parameters
scale (
Tuple
[float
,float
,float
]) – The scale in the x, y and z axisrotation (
Tuple
[float
,float
,float
]) – The rotation in the x, y and z axis (axis can be changed using order)displacement (
Tuple
[float
,float
,float
]) – The displacement in the x, y and z axisorder – The order to apply the rotations in.
- Returns
The 4x4 transformation matrix of combined scale, rotation and displacement