[pstricks] \psplotDiffEqn (pstricks-add)

Alexander Grahn A.Grahn at fzd.de
Tue Jun 2 16:31:24 CEST 2009


Hi,

I want to translate the set of differential equations of the 'spiral of
cornu' example from the pstricks-add manual, Section 36.2 from algebraic
into Postscript syntax.

>From the Postscript reference I know that the sin and cos operators
want angles in degrees as their argument. Hence, I have to multiply the
arguments of sin and cos, as given in Eqs. (4) and (5) on Page 170 of
pstricks-add-doc.pdf, by 180/Pi which led me to the following formulation:

\documentclass{article}
\usepackage{pstricks-add}

\begin{document}
\psset{unit=8}
 \begin{pspicture}(1,1)\psgrid[subgriddiv=5]
 \psplotDiffEqn[
   whichabs=0,whichord=1,linecolor=red,method=rk4,
%   algebraic=true,
   plotpoints=500,showpoints=true
 ]{0}{10}{0 0}{
%   %algebraic
%   cos(Pi*x^2/2)|sin(Pi*x^2/2)
   %Postscript
   x dup mul 2 div 180 mul cos %% dx/dt
   x dup mul 2 div 180 mul sin %% dy/dt
 }
 \end{pspicture}
\end{document}

However, the chart remains empty, no spiral to be seen. What is wrong
with the above code?

Thanks for your suggestions,
Alexander


More information about the PSTricks mailing list