[pstricks] define new linestyle

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Jan 30 12:16:08 CET 2010


Am 29.01.2010 23:04, schrieb Marco Daniel:

> today I am interested in the defining of new line styles. I want to
> create a wave which can be used by ncline and so on.

with pst-coil.tex|pro from http://voss.homedns.org/packages/pst-coil/
you can use \ncsin and \pcsin. It draws by default one sinus period
with an amplitude of 1 \psyunit. These values can be modified with
two new optional arguments.

Herbert

\documentclass{article}
\usepackage{pst-coil,pstricks-add}
\begin{document}
\begin{pspicture}(3,3)
   \cnode*(0,0){4pt}{A}\cnode*(3,3){4pt}{B}
   \ncsin{A}{B}
\end{pspicture}

\bigskip
\begin{pspicture}(3,3)
   \cnode*(0,0){4pt}{A}\cnode*(3,3){4pt}{B}
   \ncsin[amplitude=1.4,frequency=5]{A}{B}
\end{pspicture}

\bigskip
\begin{pspicture}(3,5)
   \cnode*(1.5,0){4pt}{A}\cnode*(1.5,5){4pt}{B}
   \pcsin[amplitude=0.75,frequency=15](A)(B)
\end{pspicture}

\end{document}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: x.png
Type: image/png
Size: 4110 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100130/a8b1103c/attachment.png>


More information about the PSTricks mailing list