%% $Id: pst-chladni-bessel.pro 1299 2026-06-12 18:37:47Z herbert $ %% Jürgen Gilg %% Manuel Luque %% Herbert Voss %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. %% %% version 0.01 / 2026-06-12 %% /PI 3.14159265359 def /Div { dup 0 eq { pop } { div } ifelse } def /RadtoDeg {180 mul PI div} bind def /tx@BesselDict 50 dict def tx@BesselDict begin %% Handbook of mathematical functions %% ED. M.ABRAMOWITZ & I.A. STEGUN %% Chap. 9 : Bessel Functions of Integer Order %% Adapté en ps d'après le code de D.Martin %% http://perso.univ-rennes1.fr/daniel.martin/melina/www/code_html/specfct/bejy01.html % % les coefficients pour le calcul des fonctions de Bessel /COSO {0.79788456 1 Xval div sqrt mul Xval 0.78539816 sub RadtoDeg cos mul} def /SINO {.79788456 1 Xval div sqrt mul Xval 0.78539816 sub RadtoDeg sin mul} def % /PO { 0.209388721e-6 8 Xval div dup mul mul 0.207337064e-5 sub 8 Xval div dup mul mul 0.273451041e-4 add 8 Xval div dup mul mul 0.109862863e-2 sub 8 Xval div dup mul mul 1 add } def /QO {-0.934945152e-7 8 Xval div dup mul mul 0.762109516e-6 add 8 Xval div dup mul mul 0.691114765e-5 sub 8 Xval div dup mul mul 0.143048876e-3 add 8 Xval div dup mul mul 0.15624499998e-1 sub 8 Xval div mul } def /P1 { -0.240337019e-6 8 Xval div dup mul mul 0.2457520174e-5 add 8 Xval div dup mul mul 0.351639649e-4 sub 8 Xval div dup mul mul 0.183105e-2 add 8 Xval div dup mul mul 1 add } def /Q1 { 0.105787412e-6 8 Xval div dup mul mul 0.88228987e-6 sub 8 Xval div dup mul mul 0.8449199096e-5 add 8 Xval div dup mul mul 0.2002690873e-3 sub 8 Xval div dup mul mul 0.4687499995e-1 add 8 Xval div mul } def % les fonctions de Bessel /J0 { /Xval exch def /XXval {Xval dup mul} bind def Xval 0 lt { /Xval Xval neg def } if Xval 8 le { Xval 0 eq { 1 }{ 0.338483314e-10 XXval mul 0.2895532e-7 sub XXval mul 0.113825372e-4 add XXval mul 0.258008068e-2 sub XXval mul 0.351527847 add XXval mul .277849812e+2 sub XXval mul 0.114749848e4 add XXval mul 0.198342667e5 sub XXval mul 0.813241206e5 add Xval dup mul 0.49676332e3 add XXval mul 0.813241206e5 add div} ifelse }{ PO COSO mul QO SINO mul sub } ifelse } def % /J1 { /Xval exch def /XXval {Xval dup mul} bind def Xval 0 lt {/Xval Xval neg def /Signe {neg} def}{/Signe {} def} ifelse Xval 8 le { Xval 0 eq {0}{ -0.47427072618e-9 XXval mul 0.35236457401e-6 add XXval mul -0.11764050281e-3 add XXval mul 0.21979683808e-1 add XXval mul -0.23652383961e+1 add XXval mul 0.13812534164e+3 add XXval mul -0.373650260707e+4 add XXval mul 0.31625993793e+5 add Xval dup mul 0.433493017e+3 add XXval mul 0.6325198765e+5 add div Xval mul Signe } ifelse }{ P1 SINO mul Q1 COSO mul add Signe } ifelse } def % J1 cardinal au carré : (J1(x)/x)^2 /J1Card { dup 0 eq {1}{J1 Xval div dup mul 4 mul} ifelse } def /BesselJ {/Xval exch def /no exch def Xval 0 eq {no 0 eq {1}{0}ifelse}{ /BesselJ0 Xval J0 def /BesselJ1 Xval J1 def no 0 eq {BesselJ0}{no 1 eq {BesselJ1}{% 2 1 no {/i exch def /Ji 2 i 1 sub mul Xval div BesselJ1 mul BesselJ0 sub def /BesselJ0 BesselJ1 def /BesselJ1 Ji def } for Ji }ifelse }ifelse } ifelse } def % les zéros % /BesselJZeros [ % n 1 2 3 4 5 6 7 8 9 [2.404825558 5.520078110 8.653727913 11.79153444 14.93091771 18.07106397 21.21163663 24.35247153 27.49347913] %J0 [3.831705970 7.015586670 10.17346814 13.32369194 16.47063005 19.61585851 22.76008438 25.90367209 29.04682854] %J1 [5.135622302 8.417244140 11.61984117 14.79595178 17.95981949 21.11699705 24.27011231 27.42057355 30.56920450] %J2 [6.380161896 9.761023130 13.01520072 16.22346616 19.40941523 22.58272959 25.74816670 28.90835078 32.06485241] %J3 [7.588342435 11.06470949 14.37253667 17.61596605 20.82693296 24.01901952 27.19908777 30.37100767 33.53713771] %J4 [8.771483816 12.33860420 15.70017408 18.98013388 22.21779990 25.43034115 28.62661831 31.81171672 34.98878129] %J5 [9.936109524 13.58929017 17.00381967 20.32078921 23.58608444 26.82015198 30.03372239 33.23304176 36.42201967] %J6 [11.08637002 14.82126873 18.28758283 21.64154102 24.93492789 28.19118846 31.42279419 34.63708935 37.83871738] %J7 [2.22509226 16.03777419 19.55453643 22.94517313 26.26681464 29.54565967 32.79580004 36.02561506 39.24044800] %J8 [13.35430048 17.24122038 20.80704779 24.23388526 27.58374896 30.88537897 34.15437792 37.40009998 40.62855372] %J9 [14.47550069 18.43346367 22.04698536 25.50945055 28.88737506 32.21185620 35.49990921 38.76180702 42.00419024] %J10 ] def end % BesselDict