[pstricks] Re :Bessel function $J_2$ in pstricks

MLuque5130 at aol.com MLuque5130 at aol.com
Fri Jan 9 20:16:58 CET 2004


Here is an example which allows to draw J_n (But without guarantee).

\documentclass[a4paper]{article}
\usepackage{pstcol}
\usepackage{pst-plot}
% Bessel Jn 4 août 2002
% Manuel LUQUE 
\def\Bessel#1{%
%#1 = n
\parametricplot[plotpoints=1000]{-20}{20}{%
    /J1 0 def
    /xBessel t 180 mul 3.14159 div def
    0 0.1 180 {
        /tB exch 180 mul 3.14159 div def
        /J1 J1 0.1 xBessel
            tB sin mul tB #1 mul sub cos mul add def
         } for
    t J1 180 div}
}
\begin{document}
$$J_n(x)=\frac{1}{\pi}\int_0^\pi\cos(x\sin t-nt)\mathrm{d}t$$
\psset{xunit=0.4,yunit=10}
\begin{pspicture}(-10,-0.8)(10,0.8)
%\psgrid[gridlabels=0pt](0,0)(-20,-1)(20,1)
\psset{linecolor=red}
\Bessel{0}
\psset{linecolor=blue}
\Bessel{1}
\psset{linecolor=green}
\Bessel{2}
\psset{linecolor=magenta}
\Bessel{3}
\psaxes[Dy=0.1](0,0)(-20,-1)(20,1)
\end{pspicture}
\end{document}

Manuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20040109/872f2a99/attachment.html 


More information about the PSTricks mailing list