summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-func
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-01 00:38:24 +0000
committerKarl Berry <karl@freefriends.org>2008-03-01 00:38:24 +0000
commit7a7daece45261ca66f3c03d81820fdb769a4bfd3 (patch)
tree290ddfa460b479cafbf42d9a2ea3357c5743a1ba /Master/texmf-dist/tex/generic/pst-func
parent28449a86b337c6806d66224749e8beff165d2ee8 (diff)
pst-func update (28feb08)
git-svn-id: svn://tug.org/texlive/trunk@6781 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.tex47
1 files changed, 30 insertions, 17 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 2d0dcae366e..d5f13909efa 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -28,8 +28,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
-\def\fileversion{0.50}
-\def\filedate{2007/08/27}
+\def\fileversion{0.51}
+\def\filedate{2008/02/27}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -345,8 +345,10 @@
scy b scx exch lineto
/b b dx add def
} repeat
- stroke
+% stroke
}%
+ \psk@fillstyle%
+ \pst@stroke%
\end@SpecialObj%
}
%
@@ -373,8 +375,10 @@
scy t scx exch lineto
/t t dd add def
} repeat
- stroke
+% stroke
}%
+ \psk@fillstyle%
+ \pst@stroke%
\end@SpecialObj%
}
%
@@ -701,24 +705,33 @@
\def\psVolume{\pst@object{psVolume}}% 2007-06-23
\def\psVolume@i(#1,#2)#3#4{{%
\begin@SpecialObj
- \psplot[fillstyle=none]{#1}{#2}{#4}\psplot[fillstyle=none]{#1}{#2}{#4 neg}
- \multido{\iA=1+1}{#3}{%
- \pscustom{%
- \code{
- /dX #2 #1 sub #3 div def
- /Start dX \iA\space 1 sub mul #1 add def
- /End Start dX add def
- /Height End Start add 2 div /x ED #4 def }
+ \psplot[fillstyle=none]{#1}{#2}{#4}% original function
+ \psplot[fillstyle=none]{#1}{#2}{#4 neg}% mirrored at the x-axis
+ \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)
+ % x is the mean between Start+End
\psellipticarc(!Start 0)(! Height 8 div Height){90}{270}
- \rlineto(! dX 0)
+ % draw the first falf of the ellipse
+ \rlineto(! dX 0)% draw a line in x-direction
\psellipticarc(!End 0)(! Height 8 div Height){270}{90}
- \rlineto(!dX neg 0)}}
+ % 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)
- \psset{plotstyle=line,linestyle=dashed,plotpoints=40,dotstyle=*,dotsize=0.5pt}
- \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg}%
+ \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.
+ \psset{plotstyle=line,linestyle=dashed,
+ plotpoints=40,dotstyle=*,dotsize=0.5pt}
+ \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg}
+ % draw again the curves to get the borderline
\end@SpecialObj
}\ignorespaces}
+
+%
%
\catcode`\@=\PstAtCode\relax
%