TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to draw a path that was defined by relationships between pairs centered around a specific point?

I basically want to create a path that I can translate anywhere I want in my image.

Thank you!

share|improve this question
path mypath; mypath=<instructions>; draw mypath shifted (3,5); – egreg May 9 '14 at 14:13
That works provided you know the coordinates that the path is drawn So is there a way to define a starting point for your path? – user2822693 May 9 '14 at 14:48
Doesn't my example below help? With <instructions> I mean any path creation commands. – egreg May 9 '14 at 14:52
And if it did help, don't forget to mark his answer as "accepted" :-) – Franck Pastor May 12 '14 at 9:34

You can save the path in a variable and transform it. Example:

path mypath;

x1=-x4; y1=y4;
x2=x1; y2=-y1;

mypath = z1--z3--z2--z4--cycle;

draw mypath;

draw mypath shifted z2;


enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.