diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-21 22:58:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-21 22:58:06 +0000 |
commit | 959ce7d977a53f679382b123caf58b8acce4f06b (patch) | |
tree | 218798a758d33708099dd4cacbea2ff910050a41 /Master/texmf-dist/tex/generic/pst-func | |
parent | fb3b8219c1ee881895924996ae07451090d5c2a3 (diff) |
pst-func (21mar14)
git-svn-id: svn://tug.org/texlive/trunk@33251 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-func')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-func/pst-func.tex | 31 |
1 files changed, 22 insertions, 9 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 743e17c87ea..cf5c27b9d78 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 892 2014-02-03 21:33:38Z herbert $ +%% $Id: pst-func.tex 897 2014-03-21 08:06:41Z herbert $ %% %% This is file `pst-func.tex', %% @@ -30,8 +30,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.78} -\def\filedate{2014/02/03} +\def\fileversion{0.79} +\def\filedate{2014/03/21} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -1080,15 +1080,20 @@ \pst@killglue \begingroup \use@par - \psplot[algebraic=false,fillstyle=none]{#1}{#2}{#4}% original function - \psplot[algebraic=false,fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis + \psplot[fillstyle=none]{#1}{#2}{#4}% original function + \ifPst@algebraic + \psplot[fillstyle=none]{#1}{#2}{-(#4)} + \else + \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis + \fi \multido{\iA=1+1}{#3}{% run it #3 times with increment \A \pscustom{% to get a closed filled ellipse \code{ % the PS code /dX #2 #1 sub #3 div def % delta x, the step /Start dX \iA\space 1 sub mul #1 add def % xStart /End Start dX add def % xEnd=xStart+dX - /Height End Start add 2 div /x ED #4 def } % height=f(x) + /Height End Start add 2 div /x ED + \ifPst@algebraic (#4) AlgParser cvx exec \else #4 \fi def } % height=f(x) % x is the mean between Start+End \psellipticarc(!Start 0)(! Height 8 div Height){90}{270} % draw the first falf of the ellipse @@ -1097,11 +1102,19 @@ % draw the other half of the ellipse \rlineto(!dX neg 0)}}% draw a line in negative x-direction \psset{fillstyle=none} - \psellipse(#2,0)(!#2 dup #1 sub #3 div 2 div sub /x ED #4 dup - 8 div exch)% draw again the ellipse to get the borderline. +% \psellipse(#2,0)(!#2 dup #1 sub #3 div 2 div sub /x ED #4 dup +% 8 div exch)% draw again the ellipse to get the borderline. + \psellipse(#2,0)(!{ #2 dup #1 sub #3 div 2 div sub /x ED + \ifPst@algebraic (#4) AlgParser cvx exec \else #4 \fi dup + 8 div exch}) % draw again the ellipse to get the borderline. \psset{plotstyle=line,linestyle=dashed, plotpoints=40,dotstyle=*,dotsize=0.5pt} - \psplot[algebraic=false]{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg} + \psplot[fillstyle=none]{#1}{#2}{#4} + \ifPst@algebraic + \psplot[fillstyle=none]{#1}{#2}{-(#4)} + \else + \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis + \fi % draw again the curves to get the borderline \endgroup% \ignorespaces% |