[pstricks] define new linestyle
Marco Daniel
marco.daniel at mada-nada.de
Sat Jan 30 11:25:17 CET 2010
Hello,
I construct a macro psSinusLine
%%%%%%%%%%%%
\documentclass{article}
\usepackage{pst-coil}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\makeatletter
\newcommand{\psSinusLine}{}
\def\psSinusLine{\@ifnextchar[%]
{\psSinusLine at i}{\psSinusLine at i[]}
}
\def\psSinusLine at i[#1](#2)(#3){%
\psset{#1}
\pst at getcoor{#2}\pst at tempA
\pst at getcoor{#3}\pst at tempB
\rput{!%
\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
YB YA add XB XA add atan
}(#2){\psplot{XA}{XB XB mul YB YB mul add sqrt}{10 x mul
RadtoDeg sin 0.15 mul}}%
\ignorespaces
}
\makeatother
\begin{document}
\begin{pspicture}(3,3)
\psSinusLine[arrows=*-*,](0,0)(3,3)
\end{pspicture}
\end{document}
%%%%%%%%%%%%%%%%%
It is very difficult to include the side conditions.
regards
Marco
<http://dict.leo.org/ende?lp=ende&p=5tY9AA&search=condition>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100130/3cb7b115/attachment.html>
More information about the PSTricks
mailing list