pymead.core.transformation.Transformation2D#

class Transformation2D(tx: list | None = None, ty: list | None = None, r: list | None = None, sx: list | None = None, sy: list | None = None, rotation_units: str = 'rad', order='r,s,t')[source]#

Bases: object

__init__(tx: list | None = None, ty: list | None = None, r: list | None = None, sx: list | None = None, sy: list | None = None, rotation_units: str = 'rad', order='r,s,t')[source]#

Allows for arbitrary 2D transformations on a set of coordinates of size 2 x N

Methods

generate_rotation_matrix()

generate_scale_matrix()

generate_transformation_matrix()

generate_translation_matrix()

transform(coordinates)

Computes the transformation of the coordinates.

transform(coordinates: ndarray)[source]#

Computes the transformation of the coordinates.

Parameters:

coordinates (np.ndarray) – Size N x 2, where N is the number of coordinates. The columns represent \(x\) and \(y\).