If one has nodes (vector0) and (vector1), one method to get the first and second coordinate of
($(vector1)-(vector0)$)
is to write
\path ($(vector1)-(vector0)$);
\pgfgetlastxy{\XCoord}{\YCoord};
This method appears, for example, in this thread
where one finds
\path (A); \pgfgetlastxy{\xA}{\yA}; % Extract the coordinates of A
Or, more precisely, the method I descibed above consists of replacing "A" with $(vector0)-(vector1)$.
Another thread in which this method appears is this thread
where one finds
\path (z) node[below] {$z$}; \pgfgetlastxy{\XCoord}{\YCoord};
Question.
Briefly: how should one do this?
In more detail:
- what noteworthy methods are there to, if one at some point of a TikZ program has nodes (vector0) and (vector1), get the first and second coordinate of ($(vector1)-(vector0)$) ?
- Which of these methods should one use and when? In particular, should one avoid this one-node-path-trick?
In particular, how to do this more quickly, in more or less one line, e.g. by writing something like
\node (tempnode) at ($(vector1)-(vector0)$)[]{}; \pgfgetlastxy { code involving (tempnode) } { another code involving (tempnode) };
?