#8 Relative directions

Next Release
closed-accepted
nobody
None
5
2013-09-30
2006-06-12
fstengel
No

Idea by cuomo in ``relative polar coordinates''. I paraphrase cumo's
original post

``Would it be possible to specify relative polar coordinates in tikz? By
relative I mean that the specified angle should be relative to the angle
which is created by the two previous points. For example:

\draw (0,0) -- (0,1) -- +(90:1cm);

should give a corner, not a long line.''

I added by proposing a tentative syntax for this :

\draw (0,0) -- (0,1) -- +*(90:1cm);

to replace

\draw (0,0) -- (0,1) -- +(-1,0);

or

\draw (0,0) .. controls +*(10:1cm) and +*(-10:-1cm) .. (2,2);

to replace

\draw (0,0) .. controls +(55:1cm) and +(35:-1cm) .. (2,2);

One would also have a ++*. The * notation could also be used with
standard vectors: +*(1,1) meaning something like +*(45:1.414cm) with
the default unit...

PS would it be possible to attribute this request to cuomo?

Discussion

  • Till Tantau
    Till Tantau
    2013-08-29

    • status: open --> closed-accepted
    • Group: --> Next Release (example)
     
  • Till Tantau
    Till Tantau
    2013-08-29

    The key "turn" has been added to the CVS, which achieves the desired effect. See the manual section on "Rotational Relative Coordinates".