arrlp.transform_matrix module
- arrlp.transform_matrix(shape=None, *, shiftx=0.0, shifty=0.0, shearx=0.0, sheary=0.0, angle=0.0, scalex=1.0, scaley=1.0, stacks=False)[source]
Defines the 3x3 transformation matrix for affine transformation in 2D.
- Parameters:
shape (int or tuple or np.ndarray) – Describes the shape of the coordinates. If int, all dimensions will have this value. If tuple, corresponds to the shape.
shiftx (float) – Shift value in x
shifty (float) – Shift value in y
shearx (float) – Shear value in x
sheary (float) – Shear value in y
angle (float) – Rotation angle [°]
scalex (float) – Scale value in x
scaley (float) – Scale value in y
Examples
>>> from arrlp import transform_matrix ... >>> matrix = transform_matrix(shape, shiftx=2, shifty=3.4)