An instance of the data type Aff_transformation_d<Kernel> is an affine transformation of $$ddimensional space. It is specified by a square matrix $$M of dimension $$d + 1. All entries in the last row of M except the diagonal entry must be zero; the diagonal entry must be nonzero. A point $$p with homogeneous coordinates $$(p[0], ..., p[d]) can be transformed into the point p.transform(A) = $$Mp, where A is an affine transformation created from M by the constructors below.
 
the ring type.
 
 
the field type.
 
 
the linear algebra layer.
 
 
the matrix type.

 
introduces some
transformation.
 
 
introduces the identity transformation in
$$ddimensional space.
 
 
introduces the
transformation of $$dspace specified by matrix $$M. Precondition: M is a square matrix of dimension $$d + 1 where entries in the last row of M except the diagonal entry must be zero; the diagonal entry must be nonzero.
 
 
 
introduces the transformation of $$dspace
specified by a diagonal matrix with entries set [start,end) on
the diagonal (a scaling of the space). Precondition: set [start,end) is a vector of dimension $$d+1.
 
 
introduces the translation by vector $$v.
 
 
returns a scaling by a scale factor num/den. Precondition: den !=0 .
 
 
returns a planar rotation
with sine and cosine values sin_num/den and cos_num/den
in the plane spanned by the base vectors $$b_{e1} and $$b_{e2} in
$$dspace. Thus the default use delivers a planar rotation in the
$$x$$y plane. Precondition: $$sin_num^{2} + cos_num^{2} = den^{2} and $$0 e_{1} < e_{2} < d. Precondition: den != 0
 
 
returns a planar
rotation within a twodimensional linear subspace. The subspace is
spanned by the base vectors $$b_{e1} and $$b_{e2} in $$dspace. The
rotation parameters are given by the $$2dimensional direction
dir, such that the difference between the sines and cosines of
the rotation given by dir and the approximated rotation are at
most num/den each. Precondition: dir.dimension()==2, !dir.is_degenerate() and num < den is positive, den != 0, $$0 e_{1} < e_{2} < d.


 the dimension of the underlying space 

 returns the transformation matrix 
 

returns the inverse
transformation. Precondition: t.matrix() is invertible.  
 
 composition of transformations. Note that transformations are not necessarily commutative. t*s is the transformation which transforms first by t and then by s. 
Affine Transformations are implemented by matrices of number type RT as a handle type. All operations like creation, initialization, input and output on a transformation $$t take time $$O(t.dimension()^{2}). dimension() takes constant time. The operations for inversion and composition have the cubic costs of the used matrix operations. The space requirement is $$O(t.dimension()^{2}).