AffineTransform

AffineTransform[m]

gives a TransformationFunction that represents an affine transform that maps r to m.r.

AffineTransform[{m,v}]

gives an affine transform that maps r to m.r+v.

Details

Examples

open allclose all

Basic Examples  (2)

A general affine transformation:

Transform points:

A pure rotation:

A pure translation:

Scope  (3)

Affine transform in four dimensions:

The inverse transform:

Transformation applied to a 2D shape:

Transformation applied to a 3D shape:

Applications  (5)

Iterated Function Systems  (3)

Define an iterated function system (IFS) and iterate it on point sets, by computing in each iteration:

Sierpiński gasket:

Sierpiński carpet:

Heighway's Dragon:

Compute an iterated function system's (IFS) fixed points efficiently by randomly picking subparts of point sets:

Sierpiński gasket:

Sierpiński carpet:

Heighway's Dragon:

Hedgehog:

Compute an iterated function system applied to graphics primitives:

Sierpiński gasket:

Sierpiński carpet:

Hedgehog:

Image Transformations  (2)

Use an AffineTransform to rotate an image:

Affine transform of a 3D image with no translation:

Properties & Relations  (3)

Many other geometric transformations are a special case of affine transform:

In turn, an affine transformation is a special case of a linear-fractional transformation:

The composition of affine transforms is an affine transform:

Neat Examples  (1)

Nested transformations of a circle:

Introduced in 2007
 (6.0)