Background: I am working on a program that produces design patterns ( using wallpaper- and frieze-group theory ). This is for example a 'generating region' for a frieze or a wallpaper.
Graphics[Polygon[{{.1, .1}, {.3, .8}, {1, .1}, {.5, .5}}]]
In reality this piece of Mathematica Graphics code is the result of many ( matrix- ) calculations.
Usually I want this in a larger size, for example 1 by 2:
Graphics[{Polygon[{{.1, .1}, {.3, .8}, {1, .1}, {.5, .5}}],
Polygon[{{1.1, .1}, {1.3, .8}, {2, .1}, {1.5, .5}}]}]
Currently I work as follows: ===pseudocode=== follows:
Map[ CalculateBaseMotif[#1,#2] &,
Flatten[Map[# &, Table[{ii, jj}, {ii, 1, lenX}, {jj, 1, lenY}]], 1]
So CalculateBaseMotif
is calculated over and over. While all I want is to transtlate the result of
G=Graphics[Polygon[{{.1, .1}, {.3, .8}, {1, .1}, {.5, .5}}]].
Summarizing: I make a ( complicated ) graphic G requiring many calculations of width W and height H. Then I want to produce a ( final ) graphic like so:
GGGG
GGGG
thus having width 4 x W and height 2 x H in the most efficient manner.
Question: How to define and work with temporary graphics data ?