[pstricks] nesc wiring diagram

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sat Mar 5 22:47:57 CET 2005


Dowding George A wrote:

> I am trying to create a wiring diagram figure.  It should look similar
> to figure 6 in this paper http://www.tinyos.net/papers/nesc.pdf.

PSTricks has a lot of optional parameters to adjust the
arrows in a proper way.

Herbert


\documentclass{article}
\usepackage{pstricks-add}
\usepackage{pst-node}
\def\ncdiagIII#1#2#3{%
   \psset{nodesep=4pt,angleA=-90,angleB=90,%
     angleB=90,arrowsize=10pt,arrowlength=1,arrowinset=0}
   \ncdiag{#1}{#2}{#3}%
   \ncdiag[offset=0.5]{#1}{#2}{#3}%
   \ncdiag[offset=-0.5]{#1}{#2}{#3}%
}

\begin{document}
\psset{arrowsize=10pt,arrowlength=1,arrowinset=0}
\begin{pspicture}(0,0)(10,10)
   %\psgrid
   \rput(5,10){
     \begin{tabular}{|c|}\hline
       Main\\\hline
       \rnode{Main:StdControl}{StdControl}\\\hline
     \end{tabular}}
%
     \rput(0,5){
       \begin{tabular}{|c|}\hline
         \rnode{Send:StdControl}{StdControl}\\\hline
         Send\\\hline
       \end{tabular}
     }
%
\ncdiagIII{>->}{Main:StdControl}{Send:StdControl}
\nccurve[ArrowFill=false,angleA=0,angleB=-90,%
   nodesepB=18pt,nodesepA=6pt]{->}{Main:StdControl}{Send:StdControl}
\end{pspicture}

\end{document}


-- 
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