From 70fe7f94e8281b0691a51754da3e2d40b1dd7732 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 7 Apr 2021 03:01:59 +0000 Subject: CTAN sync 202104070301 --- graphics/pstricks/contrib/pst-func/Changes | 3 +- .../pstricks/contrib/pst-func/doc/pst-func-doc.pdf | Bin 3889616 -> 4036896 bytes .../pstricks/contrib/pst-func/dvips/pst-func.pro | 16 +- .../pstricks/contrib/pst-func/tex/pst-func.tex | 284 ++++++++++++++++++++- 4 files changed, 293 insertions(+), 10 deletions(-) (limited to 'graphics/pstricks') diff --git a/graphics/pstricks/contrib/pst-func/Changes b/graphics/pstricks/contrib/pst-func/Changes index 32534e1f7f..1aadfbe9be 100644 --- a/graphics/pstricks/contrib/pst-func/Changes +++ b/graphics/pstricks/contrib/pst-func/Changes @@ -1,5 +1,6 @@ ..... pst-func.tex -0.95 2020-06-06 - another two more polynomial functions +0.96 2021-04-06 - added start/endAngle for \psLame +0.95 2020-06-07 - another two more polynomial functions 0.94 2020-01-01 - small fixes 0.93 2019-05-17 - fix for missing end in a local dictionary (\psBinomialX) 0.92 2018-12-13 - allow algebraic mode for \pscumIntegral diff --git a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf index 740e2568d6..12ee728910 100644 Binary files a/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf and b/graphics/pstricks/contrib/pst-func/doc/pst-func-doc.pdf differ diff --git a/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro b/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro index 1eca86df51..09252c19a3 100644 --- a/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro +++ b/graphics/pstricks/contrib/pst-func/dvips/pst-func.pro @@ -366,10 +366,11 @@ tx@FuncDict begin } def %end{vasicek density} % - +end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % subroutines for complex numbers, given as an array [a b] % which is a+bi = Real+i Imag +%% Global defined % /cxadd { % [a1 b1] [a2 b2] = [a1+a2 b1+b2] dup 0 get % [a1 b1] [a2 b2] a2 @@ -504,4 +505,15 @@ tx@FuncDict begin RadtoDeg dup sin exch cos cxmake2 } def % -end +% cxexp z^k with k as a natural number +/cxexp { % z k + 3 dict begin + dup 0 eq { pop pop [1 0] }{ + /k ED + /z ED + /sol [1 0] def + k { sol z cxmul /sol ED } repeat + sol } ifelse + end +} def +% diff --git a/graphics/pstricks/contrib/pst-func/tex/pst-func.tex b/graphics/pstricks/contrib/pst-func/tex/pst-func.tex index c581b1e49f..abd00a74c1 100644 --- a/graphics/pstricks/contrib/pst-func/tex/pst-func.tex +++ b/graphics/pstricks/contrib/pst-func/tex/pst-func.tex @@ -31,8 +31,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.95} -\def\filedate{2020/06/06} +\def\fileversion{0.96} +\def\filedate{2021/04/05} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -270,9 +270,10 @@ % \define@key[psset]{pst-func}{n}[1]{\def\psk@func@n{#1 }} \psset[pst-func]{n=0} -\def\psLaguerre{\@ifnextchar[{\psLaguerre@i}{\psLaguerre@i[]}}%% hv 20200111 +% +\def\psLaguerre{\@ifnextchar[\psLaguerre@i{\psLaguerre@i[]}}%% hv 20200111 \def\psLaguerre@i[#1](#2,#3){{%%% n - \pst@killglue% + \pst@killglue \psplot[#1]{#2}{#3}{% /L_n 1 def 0 1 \psk@func@n { @@ -287,6 +288,274 @@ }% }\ignorespaces} % +\def\psLaguerreC{\pst@object{psLaguerreC}}%% hv 20200612 +\def\psLaguerreC@i(#1,#2)(#3,#4){{%%% n (xMin,xMax)(yMin,yMax) + \pst@killglue + \begin@SpecialObj + \addto@pscode{% +% 20 dict begin + /yC #3 def + /dx #2 #1 sub \psk@plotpoints div def + /dy #4 #3 sub \psk@plotpoints div def + /L_i { + 5 userdict begin + /X ED + /n_i ED + /L_n 0 def + 0 1 n_i { + /k_i ED + -1 k_i exp k_i factorial div + n_i k_i MoverN mul + X k_i exp mul L_n add + /L_n ED + } for + L_n % return L_n(x) + end + } def + /n \psk@func@n def + [ % start array of x/y values + \psk@plotpoints { /xC #1 def \psk@plotpoints { + /Re 0 def + 0 1 \psk@func@n 2 div floor { + /j ED % loop index + /j2 j dup add def % 2j + n j2 sub xC L_i % calculate L_{n-2j}(x) + j2 exp % L_{n-2j}^{2j}(x) + -1 j exp yC j2 exp mul % (-1^j)*y^(2j) + j2 factorial % (2*j)! + div + mul + Re add /Re ED + } for + /Im 0 def + 0 1 \psk@func@n 1 sub 2 div floor { + /j ED % loop index + /j2 j dup add def % 2j + n j2 sub 1 sub xC L_i % calculate L_{n-2j-1}(x) + j2 1 add exp % L_{n-2j}^{2j+1}(x) + -1 j 1 sub exp yC j2 1 add exp mul % (-1^j)*y^(2j+1) + j2 1 add factorial % (2*j+1)! + div + mul + Im add /Im ED + } for + Re Im 2 copy \tx@ScreenCoor +% Re Im dup mul exch dup mul add sqrt dup 4 gt {pop 4} if 4 div setgray +% xC yC \tx@ScreenCoor 0 360 2 arc gsave fill stroke grestore + xC dx add /xC ED + } repeat + yC dy add /yC ED + } repeat + false \tx@NArray + \psk@dotsize + \@nameuse{psds@\psk@dotstyle} + \tx@setStrokeTransparency + newpath + n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat +%% end + }% + \end@SpecialObj +}\ignorespaces} +% + +\def\psLaguerreCC{\pst@object{psLaguerreCC}}%% hv 20200612 +\def\psLaguerreCC@i(#1,#2)(#3,#4){{%%% n (xMin,xMax)(yMin,yMax) + \pst@killglue + \begin@SpecialObj + \addto@pscode{% +% 20 dict begin +gsave + /yC #3 def + /dx #2 #1 sub \psk@plotpoints div def + /dy #4 #3 sub \psk@plotpoints div def + /n \psk@func@n def + [ % start array of x/y values + \psk@plotpoints { /xC #1 def \psk@plotpoints { +/z [xC yC ] def +/L0 [1 0] def +/L1 [1 z {-1 mul} forall 3 1 roll add exch] def +n 1 le { + n 0 eq {/L1 L0 def} if + n 1 eq {/L1 L1 def} if + }{ +/m 1 def +n 1 sub + { + /L2 1 m 1 add div + [2 m mul 1 add z {-1 mul} forall 3 1 roll add exch] L1 cxmul + L0 m neg cxrmul cxadd + exch cxrmul def + /L0 L1 def + /L1 L2 def +/m m 1 add def +} repeat +} ifelse +L1 aload pop \tx@ScreenCoor + xC dx add /xC ED + } repeat + yC dy add /yC ED + } repeat + false \tx@NArray + \psk@dotsize + \@nameuse{psds@\psk@dotstyle} + \tx@setStrokeTransparency + newpath + n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat +grestore +%% end + }% + \end@SpecialObj +}\ignorespaces} +% + +\def\psLaguerreCCC{\pst@object{psLaguerreCCC}}%% hv 20200612 +\def\psLaguerreCCC@i(#1,#2)(#3,#4){{%%% n (xMin,xMax)(yMin,yMax) + \pst@killglue + \begin@SpecialObj + \addto@pscode{% +% 20 dict begin + /yC #3 def + /dx #2 #1 sub \psk@plotpoints div def + /dy #4 #3 sub \psk@plotpoints div def + [ % start array of x/y values + \psk@plotpoints { + /xC #1 def + \psk@plotpoints { + /Z [xC yC] def + /L [1 0] def + 0 1 \psk@func@n { + /k ED + \psk@func@n k MoverN -1 k exp k factorial div mul + Z k + tx@FuncDict begin cxexp exch + cxrmul L cxadd end /L ED + } for + L aload pop \tx@ScreenCoor + xC dx add /xC ED + } repeat + yC dy add /yC ED + } repeat +% ] aload length 3 1 roll moveto 2 div cvi 1 sub { lineto } repeat 1 0 0 setrgbcolor 0.1 setlinewidth stroke + false \tx@NArray + \psk@dotsize + \@nameuse{psds@\psk@dotstyle} + \tx@setStrokeTransparency + newpath + n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat +%% end + }% + \end@SpecialObj +}\ignorespaces} +% +\def\psLaguerreCCCC{\pst@object{psLaguerreCCCC}}%% hv 20200612 +\def\psLaguerreCCCC@i(#1,#2)(#3,#4){{%%% n (xMin,xMax)(yMin,yMax) + \pst@killglue + \begin@SpecialObj + \addto@pscode{% +% 20 dict begin + /yC #3 def + /dx #2 #1 sub \psk@plotpoints div def + /dy #4 #3 sub \psk@plotpoints div def + % start array of x/y values + \psk@plotpoints { + /xC #1 def + [ + \psk@plotpoints { + /Z [xC yC] def + /L [1 0] def + 0 1 \psk@func@n { + /k ED + \psk@func@n k MoverN -1 k exp k factorial div mul + Z k + tx@FuncDict begin cxexp exch + cxrmul L cxadd end /L ED + } for + L aload pop \tx@ScreenCoor + xC dx add /xC ED + } repeat + ] + aload length 3 1 roll moveto 2 div cvi 1 sub { lineto } repeat 1 0 0 setrgbcolor 0.1 setlinewidth stroke + yC dy add /yC ED + } repeat +% ] aload length 3 1 roll moveto 2 div cvi 1 sub { lineto } repeat 1 0 0 setrgbcolor 0.1 setlinewidth stroke +% false \tx@NArray +% \psk@dotsize +% \@nameuse{psds@\psk@dotstyle} +% \tx@setStrokeTransparency +% newpath +% n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat +%% end + }% + \end@SpecialObj +}\ignorespaces} +% +\def\psContourLaguerre{\pst@object{psContourLaguerre}}%% hv 20200612 +\def\psContourLaguerre@i(#1,#2)(#3,#4){{%%% n (xMin,xMax)(yMin,yMax) + \pst@killglue + \begin@SpecialObj + \addto@pscode{% + /yC #3 def + /dx #2 #1 sub \psk@plotpoints div def + /dy #4 #3 sub \psk@plotpoints div def + /contourdata [ % start array of x/y values + \psk@plotpoints { + /xC #1 def + [ + \psk@plotpoints { + /Z [xC yC] def + /L [1 0] def + 0 1 \psk@func@n { + /k ED + \psk@func@n k MoverN -1 k exp k factorial div mul + Z k + tx@FuncDict begin cxexp exch + cxrmul L cxadd end /L ED + } for +% L aload cxnorm exch pop + xC yC L cxre exch pop + xC dx add /xC ED + } repeat + ] + yC dy add /yC ED + } repeat + ] def + /zMax 0 def /zMin 0 def % lowest and highest value + contourdata aload length /N ED % get the no of arrays + N { % inside contourdata + /data ED % save first inner array + data aload length 3 div round cvi { % get the records + \psk@colorOffset + dup zMin lt % z