Graphics, Figures & TablesPSTricks: Distance between 2 nodes

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
stretch65
Posts: 4
Joined: Thu Mar 18, 2010 6:49 am

PSTricks: Distance between 2 nodes

Post by stretch65 »

Hi,

I've been looking for a PSTricks macro that will return the distance between 2 nodes. I was also wondering if there's a macro that returns the coordinates of a node. Do either of these macros exist?
Last edited by stretch65 on Sat Nov 13, 2010 5:23 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks: Distance between 2 nodes

Post by CrazyHorse »

stretch65 wrote: I've been looking for a PSTricks macro that will return the distance between 2 nodes. I was also wondering if there's a macro that returns the coordinates of a node. Do either of these macros exist?
yes and no ...
The node coordinates are known on PostScript side, but not on TeX.
It belongs to your problem, if all can be done on PostScript level.

For example:

\rput(! \psGetNodeCenter{A} A.x A.y 3 add){foo}

Herbert
Post Reply