Parallel movement(Translation) of entire Graphics

Can we construct parallel movement function which act on Graphics primitive or Graphics?

Example of Graphics primitive : Circle[{0,0},1]

Example of Graphics : Graphics[Circle[{0,0},1]]

For example, can you construct function F or G ? (I want both)

The unit of parallel movement must be user unit.
I mean the radius length of Circle[{0,0},1] is 1 user unit.

Hope the function (F or G) do not rely on Inset.
It's too difficult to handle Inset accurately with my skills, so I want to avoid Inset as much as possible (for a while).

Also I hope the function should act correctly on complicated case, like nested structure of Graphics/Show/Inset.

If there is no direct method, then we should be able to do followings :

1. extract every graphic primitives from nested structure of Graphics/Show/Inset
2. apply parallel movement for all those graphic primitives
3. combine processed graphic primitives

The code would be lengthy and difficult to make but it would be useful. Anyone who doesn't have that code or have no time but think there is no direct method, please leave it as comment. Thank you!

• Have you explored TranslationTransform?
– Syed
Jun 7 at 12:58
• No, it is new to me. Jun 7 at 13:03
• Thank you! I think the problem was solved for graphics primitive. CanTranslationTransform be applied easily for graphics of complicated structures? Jun 7 at 13:18
• Perhaps GraphicsComplex could handle the nested structure you have but I am not conversant with its use.
– Syed
Jun 7 at 13:23

F[t_] := Translate[#, t] &;
G[t_] := MapAt[F[t], {1}];

Graphics[{Circle[], Line[{{.5, 0}, {.5, 1}}],
F[{1, 0}]@{Circle[], Red, Line[{{.5, 0}, {.5, 1}}]}}]


Show[Graphics[{Circle[], Line[{{.5, 0}, {.5, 1}}]}],
G[{1, 0}] @ Graphics[{Circle[{1, 0}, 1], Red, Line[{{.5, 0}, {.5, 1}}]}]]


• Thank you, so far everything works perfectly with this. For example it works OK with Imagesize->1->50. This is the orthodox method for combining graphics. Jun 12 at 22:46

Try

circle = Circle[{0, 0}, 1]
Graphics[{circle, TranslationTransform[{1, 0}][circle]}]

• Thank you, you've succeeded to make such F. Can you also make such G ? Jun 9 at 9:14
• What is the difference between F and G? Jun 9 at 11:50
• Imagine a very complicated nested structure of Graphics/Show/Inset/... Anyway it is Graphics (the head is Graphics). Name it G. Can you do translation transformation by {1,0}, to G easily? Jun 9 at 11:57
• No I don't think it is possible because TranslationTransform and similar transformations are applied to graphics-primitives only. Jun 9 at 12:04
• But probably you may agree this can be done in other way. There may be built-in commands that act on the entire Graphics, or.. It may a bit difficult, but first analyzing the given graphic, then translating each graphic primitives. Jun 9 at 12:08

My answer is not complete, for example it does not work well with Graphics containing Inset. To be specific, the text used in Inset does not move along other Graphics primitives.

Anyway my trial is

trs[G_, {x_, y_}] :=
Graphics@GeometricTransformation[#, {x, y}] &@
GraphicsGroup@Delete[#, 0] &@G


where G is a Graphics and {x,y} is a coordinate of translation.

Hope other users improve this code, and post it. Other codes are

{Graphics[Circle[]],
trs[Graphics[{Red, Disk[], Green, Rectangle[{0, 0}, {2, 2}], Blue,
Disk[{2, 2}]}], {2, -2}],
trs[Graphics[Polygon[{{0, 0}, {1, 1}, {0, 1}, {1, 0}}]], {0, -4}],
trs[Graphics[{Pink, Disk[], {Blue, Disk[{1, 0}]},
Disk[{2, 0}]}], {0, -6}]}

Show[Graphics[Circle[]],
trs[Graphics[{Red, Disk[], Green, Rectangle[{0, 0}, {2, 2}], Blue,
Disk[{2, 2}]}], {2, -2}],
trs[Graphics[Polygon[{{0, 0}, {1, 1}, {0, 1}, {1, 0}}]], {0, -4}],
trs[Graphics[{Pink, Disk[], {Blue, Disk[{1, 0}]},
Disk[{2, 0}]}], {0, -6}]]