An affine transformation is a function from a vector space to another such that it preserves affine combinations.
Let and be vector spaces over the reals. Let . is called affine if it holds that
When and are finite dimensional, say of dimensions and respectively, we can identify them with and by choosing a basis in each. A linear transformation between and can be described with an matrix. Similarly, an affine transformation can be described with functions of the form , where is an matrix, and is a vector in .
Pastel implements the AffineTransformation
class to model
affine transformations in as well as functions for
forming common affine transformations from various inputs, and
inverting a transformation.