WLJS LogoWLJS Notebook

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.

Examples

Create a scaling transformation:

AffineTransform[{{2, 0}, {0, 2}}]

Create a transformation with translation:

t = AffineTransform[{{{1, 0}, {0, 1}}, {1, 2}}];
t[{0, 0}]
(* {1, 2} *)

Please visit the official Wolfram Language Reference for more details.

On this page