1

alt text

Points enclosed by black ovals are the intersection points between the frame boundary of \rput and the line segment of \ncline.

How to find these points?


The screenshot above is copied from PSTricks Tutorial series on page 4.

2
\documentclass{article} 
\usepackage{pst-node}\SpecialCoor
\makeatletter
\def\psGetEdgeA#1#2{tx@NodeDict begin 0.0 0.0 neg 0.0 0.0 0 0 
  /N@#1 /N@#2 InitNC { NCCoor } if pop pop \tx@UserCoor end}
\def\psGetEdgeB#1#2{tx@NodeDict begin 0.0 0.0 neg 0.0 0.0 0 0 
  /N@#1 /N@#2 InitNC { NCCoor } if 4 2 roll pop pop \tx@UserCoor end}
\makeatother

\begin{document}
\Huge
\hspace*{4cm}\rnode{B}{Node B}

\vspace{2cm}
\rnode{A}{Node A}
\ncline{A}{B}
\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeA{A}{B}){10pt}
\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeB{A}{B}){10pt}

\end{document}
  • the pst-node version from http://texnik.dante.de/tex/generic/pst-node/ knows the above two macros. Will be available from CTAN this year :-) – user2478 Dec 28 '10 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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