I can't seem to figure out the difference between + and ++ relative coordinates in TikZ.
I understand ++. ++ specifies delta coordinates that are added to the last current point, the current point is then set to the new absolute current point (correct?):
\draw (0,0) -- ++(1,0) -- ++(0,1) means:
set Current Point to (0,0)
add (1,0) to Current Point = (1,0)
set Current Point to (1,0)
add Current Point (1,0) to (0,1) = (1,1)
set Current Point to (1,1)
I can't seem to figure out that + does, when I try it out it looks like the coordinates in the +(x,y) are absolute coordinates rather than delta coordinates, but the manual says otherwise
++
) or don’t update (+
) the “current point for subsequent usages of relative coordinates.” The lines (or whatever is used) will always start from the last actual point. The set of lines radiating from a single point will always need a move-to operation. E.g.\draw (12,34) -- +(1,0) +(0,0) -- +(0,1) + (0,0) -- + (left:1) + (0,0) -- + (270:1) + (0,0) circle (2pt);
vs.\draw (12,34) -- ++(1,0) ++(-1,0) -- ++(0,1) ++ (0,-1) -- ++ (left:1) ++ (right:1) -- ++ (270:1) ++(90:1) circle (2pt);
\draw (a,b) + (c,d) -- (e,f) + (g,h);
draws a line from(a+c,b+d)
to(e,f)
and then moves the current point to(e+g,f+h)
(here the pluses do not matter as the following coordinate is an absolute one).