WolframLang: Translate Copy Graphics
Translate (Efficient for Tiling the Plane or Space)
Translate[graPrims, vector]
-
move graPrims by vector
(* return itself *) Translate[Circle[], {1, 0}] (* only show effect when inside Graphics *) Graphics[Translate[Circle[], {1, 0}], Axes -> True]
Translate[graPrims, vectorList]
-
make many copies of graPrims by vectorList
this is a very efficient way to represent multiple, identical copies of an arbitrarily complex shape.
use Translate to tile a plane:
(* octogon *) graPrims = Line@Table[{Cos[x], Sin[x]}, {x, 0, 2 Pi, 2 Pi/8.}]; grids = CoordinateBoundsArray[{{0, 10}, {0, 10}}]; (* use Translate to copy to grid, much more efficient than using Map *) xpattern = Translate[graPrims, Flatten[grids, 1]]; Graphics[ xpattern , Frame -> True ]
arg to Translate should not be a Graphics object:
(* arg to Translate should not be a Graphics object *) graObj = Circle[]; (* does not translate *) Translate[ Graphics[ graObj, Axes -> True], {1, 0} ] (* error *) Graphics @ Translate[ Graphics[ graObj, Axes -> True], {1, 0} ]
WolframLang, Graphics Programing
- WolframLang: Plot and Visualization
- WolframLang: Graphics Primitives
- WolframLang: Graphics Directives
- WolframLang: Extract Graphics from Plot
- WolframLang: Geometric Transformation Functions
- WolframLang: Compose Transformations
- WolframLang: Apply Transform to Graphics
- WolframLang: Translate Copy Graphics
- WolframLang: Transformation Matrix
- WolframLang: GraphicsComplex
- WolframLang: Mesh Region
- WolframLang: Graphics Misc
- WolframLang: Animation