[pstricks] node calculations
Herbert Voss
Herbert.Voss at alumni.TU-Berlin.DE
Mon Jun 7 07:18:50 CEST 2004
Herbert Voss wrote:
> \documentclass{article}
> \usepackage{pstricks,pst-node}
> \SpecialCoor
> \makeatletter
> \def\setPoint(#1)(#2)#3#4{%
> \pst at getcoor{#1}\pst at tempa%
> \pst at getcoor{#2}\pst at tempb%
> \pnode(!%
> \pst at tempa /YA exch \pst at number\psyunit div def
> /XA exch \pst at number\psxunit div def
> \pst at tempb /YB exch \pst at number\psyunit div def
> /XB exch \pst at number\psxunit div def
> /dx XB XA sub def
> /dy YB YA sub def
> dx #3\space mul dy #3\space mul){#4}
sorry, the last line should be
XA dx #3\space mul add YA dy #3\space mul add){#4}
otherwise it works only when the first point is (0,0)
Herbert
--
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes
More information about the PSTricks
mailing list