summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-func
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-func')
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex32
1 files changed, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
index 3ced97eacaf..743e17c87ea 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-func.tex 883 2014-02-01 16:47:25Z herbert $
+%% $Id: pst-func.tex 892 2014-02-03 21:33:38Z herbert $
%%
%% This is file `pst-func.tex',
%%
@@ -30,8 +30,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.77}
-\def\filedate{2014/02/01}
+\def\fileversion{0.78}
+\def\filedate{2014/02/03}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -43,6 +43,8 @@
\def\ChebyshevU{ tx@FuncDict begin ChebyshevU end }
%
+\define@key[psset]{pst-func}{epsilon}[1.e-08]{\def\psk@epsilon{#1 }}
+\psset[pst-func]{epsilon=1.e-08}
\define@key[psset]{pst-func}{xShift}[0]{\def\psk@xShift{#1}}
\psset[pst-func]{xShift=0}
%
@@ -945,19 +947,33 @@
\endgroup\ignorespaces}
%
\def\psWeierstrass{\pst@object{psWeierstrass}}
-\def\psWeierstrass@i(#1,#2)#3{%
+\def\psWeierstrass@i(#1,#2){\@ifnextchar[{\psWeierstrass@ii(#1,#2)}{\psWeierstrass@iii(#1,#2)}}
+\def\psWeierstrass@ii(#1,#2)[#3]#4{% #1 xStart; #2 xEnd; #3 a; #4 b %% the original definition
\addbefore@par{plotpoints=500}%
\begin@SpecialObj
- \psplot{#1}{#2}{
- /ps@a #3 def
+ \psplot{#1}{#2}[/ps@a #3 def /ps@b #4 def]{
+ /ps@n 0 def
+ /ps@WS 0 def
+ {
+ ps@a ps@n exp ps@b ps@n exp Pi mul x mul RadtoDeg cos mul
+ dup abs \psk@epsilon gt { ps@WS add /ps@WS ED }{ ps@WS add exit } ifelse
+ ps@n 1 add /ps@n ED
+ } loop
+ }%
+ \end@SpecialObj
+}
+\def\psWeierstrass@iii(#1,#2)#3{% #1 xStart; #2 xEnd; #3 a
+ \addbefore@par{plotpoints=500}%
+ \begin@SpecialObj
+ \psplot{#1}{#2}[/ps@a #3 def]{
/ps@k 1 def
/ps@WS 0 def
{
ps@k ps@a exp Pi mul dup x mul RadtoDeg sin exch div
- dup abs 1e-8 gt { ps@WS add /ps@WS ED }{ ps@WS add exit } ifelse
+ dup abs \psk@epsilon gt { ps@WS add /ps@WS ED }{ ps@WS add exit } ifelse
ps@k 1 add /ps@k ED
} loop
- }
+ }%
\end@SpecialObj
}
%