[pst-node] Xnodesep parameter and ([...]{Y}Z) special coordinates

Denis Girou Denis.Girou at idris.fr
Wed Jun 3 23:29:52 CEST 1998


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

  Working on the problem of "vector coordinates", I must study with real care
some parts of the code of `pst-node'.

  And outside the useful and undocumented way to define a position relatively
to a node (ever in cartesian or polar coordinates) that I shown some time ago
(http://www.tug.org/ListsArchives/pstricks/msg00130.html), I also see another
interesting undocumented and never described feature.

  With \SpecialCoor, Xnodesep, as the opposite of nodesep, doesn't take into
account the size of the node but only it center (compare the red and green
lines). This can be useful.

  But, more, the (X)([...]{Y}Z) node syntax allow to draw a line from X to
a point on the line joining Y to Z. The Xnodesep and Ynodesep allow to give
the vertical (this can be confusing...) and horizontal relative move from Z.

  I think the better thing to understand it is to study the following example.

D.G.

\documentclass{article}

\usepackage{pst-node}

\pagestyle{empty}

\begin{document}

\psset{subgriddiv=0}

\begin{pspicture}(10,7)\psgrid
  \psset{linewidth=1mm,radius=0.5}
  \Cnode(4,3){A}
  \Cnode(6,2){B}
  \Cnode(4,6){C}
  \Cnode(3,0){D}
  \SpecialCoor
  \psline(A)(B)
  \psline[linecolor=red](C)([Xnodesep=4]A)
  \psline[linecolor=green](C)([nodesep=4]A)
  \psline[linecolor=cyan](C)([Xnodesep=3]{A}B)
  \psline[linecolor=blue](C)([Ynodesep=3]{A}B)
  \psline[linecolor=magenta](C)([Ynodesep=3]{B}A)
  \psline[linecolor=yellow](C)([Xnodesep=3]{B}A)
  \psline{->}([Ynodesep=4]{A}B)([Xnodesep=5]{D}C)
\end{pspicture}

\end{document}

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list