# [pstricks] Finite-state Diagrams

Denis Girou Denis.Girou at idris.fr
Sat Oct 5 11:29:03 CEST 2002

>>>>> "Francisco.Grossi" == Francisco A S Grossi <fgrossi at brfree.com.br> writes:

Francisco.Grossi> Thank you, Denis.
Francisco.Grossi> Yes, I know how to use different radii but they are circles or arcs of
Francisco.Grossi> circle. I was thinking of something nicer, (a longer oval going from 70
Francisco.Grossi> degrees to 100 degrees, for example), such as the ones on pictures 3-3-6 or
Francisco.Grossi> 5-5-5 on The Latex Graphics Companion book (Metapost an Xy-Pic).

Thanks for clarification. You will probably not have exactly the same
visual effect, but you can got rather closed one playing with the various
parameters (take care that some are sensible and minor variations can give
strange results...). Look for instance at the third example, using \ncdiag,
which is rather closed to the 3-3-6 MetaPost example in LGC.

\documentclass[a4paper]{article}

\usepackage{pst-node}

\pagestyle{empty}

\begin{document}

\begin{psmatrix}
A & B & C & D
\end{psmatrix}

\psset{arrows=->,nodesep=0.05}

\ncangles[armA=0.8,armB=0,angleA=70,angleB=110,linearc=0.22]{1,1}{1,1}
\ncdiag[arm=0.9,angleA=70,angleB=110,linearc=0.3]{1,2}{1,2}
\ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.25]{1,3}{1,3}
\ncdiag[arm=0.8,angleA=50,angleB=130,linearc=0.28]{1,4}{1,4}

\end{document}

D.G.