# Module Scientific.Geometry.Transformation

## Class Transformation: Linear coordinate transformation.

Transformation objects represent linear coordinate transformations in a 3D space. They can be applied to vectors, returning another vector. If `t` is a transformation and `v` is a vector, `t(v)` returns the transformed vector.

Transformations support composition: if `t1` and `t2` are transformation objects, `t1*t2` is another transformation object which corresponds to applying t1 after t2.

This class is an abstract base class. Instances can only be created of concrete subclasses, i.e. translations or rotations.

Methods:

- rotation()

  Returns the rotational component.

- translation()

  Returns the translational component. In the case of a mixed rotation/translation, this translation is executed after the rotation.

- inverse()

  Returns the inverse transformation.

- screwMotion()

  Returns the four parameters `(reference, direction, angle, distance)` of a screw-like motion that is equivalent to the transformation. The screw motion consists of a displacement of `distance` (a float) along `direction` (a normalized vector) plus a rotation of `angle` radians around an axis pointing along `direction` and passing through the point `reference` (a vector).

## Class Translation: Translational transformation.

This is a subclass of Transformation.

Constructor: Translation(vector), where vector is the displacement vector.

Methods:

- displacement()

  Returns the displacement vector.

## Class Rotation: Rotational transformation.

This is a subclass of Transformation.

Constructor:

- Rotation(tensor), where tensor is a tensor object containing the rotation matrix.

- Rotation(axis, angle), where axis is a vector and angle a number (the angle in radians).

Methods:

- axisAndAngle()

  Returns the axis (a normalized vector) and angle (a float, in radians).

## Class RotationTranslation: Combined translational and rotational transformation.

This is a subclass of Transformation.

Objects of this class are not created directly, but can be the result of a composition of rotations and translations.