Wolfram: Apply Transform to Graphics
Apply Geometric Transform to Graphics
GeometricTransformation[graPrims, f]
-
Apply f to graPrims.
graPrims is a Graphics Primitive or a list of. It cannot be
Graphics
orGraphics3D
.- f is a transformation function.
- It is typically
TransformationFunction[data]
. 〔see Geometric Transformation Functions〕 - It can be a Transformation Matrix.
- It can have the form
{matrix, vector}
, where the vector is used for translation.
GeometricTransformation[angs]
return itself unchanged. It display effect when it is insideGraphics
orGraphics3D
. GeometricTransformation[graPrims, listOfTransforms]
-
do copy of multiple transformations.
Example: Basic

(* GeometricTransformation first arg should be graphics primitive or list of *) GeometricTransformation[ {Circle[], Rectangle[{0, 0}]} , RotationTransform[ 10 Degree ] ] (* result is itself, unchanged. *) (* has effect when it in inside Graphics or Graph3D *) Graphics[ GeometricTransformation[ {Circle[], Rectangle[{0, 0}]} , RotationTransform[ 10 Degree ] ], Axes -> True]
Example: Using a Matrix

(* rotate a rectangle *) Graphics[ GeometricTransformation[ {Rectangle[{0, 0}]} , RotationMatrix[ 10 Degree ] ], Axes -> True ]
Example: Using a Matrix and a Vector
(* transform by a matrix, and translate by a vector *) Graphics[ GeometricTransformation[ {Rectangle[{0, 0}]} , {RotationMatrix[ 10 Degree ], {1,1}} ], Axes -> True ]

Example: Error on Graphics or Graphics3D
(* if GeometricTransformation's args is Graphics[...], no transform is done. *) result = GeometricTransformation[ Graphics[{Rectangle[{0, 0}]}], RotationTransform[ 10 Degree ] ] (* if you show result inside Graphics[...], it's an error. *) Show[ result ]

Wolfram. Graphics Programing
- Wolfram: Graphics Programing Index
- Wolfram: Graphics Primitive
- Wolfram: Graphics, Graphics3D
- Wolfram: Graphics Directive
- Wolfram: Geometric Transformation Functions
- Wolfram: Apply Transform to Graphics
- Wolfram: Compose Transformations
- Wolfram: Translate Copy Graphics
- Wolfram: Transformation Matrix
- Wolfram: GraphicsComplex
- Wolfram: Mesh Region
- Wolfram: Mesh Region Examples
- Wolfram: Extract Graphics from Plot Functions
- Wolfram: Graphics Misc
- Wolfram: Animation