summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-func
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-09-05 22:37:02 +0000
committerKarl Berry <karl@freefriends.org>2006-09-05 22:37:02 +0000
commit2662cb2866615a0dca6251d3b51ade8f800f7b72 (patch)
treeba0d55339b684dce935b0f6664e26cee84a0165c /Master/texmf-dist/tex/generic/pst-func
parentdf3d34383f9394122dbe42b06a13646e71f925a9 (diff)
pst-func (6sep06)
git-svn-id: svn://tug.org/texlive/trunk@2085 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.tex43
1 files changed, 27 insertions, 16 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 efb3b102086..b1a4b5c99f1 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -21,21 +21,18 @@
% Requires PSTricks, pst-node, pst-xkey
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTnodesLoaded\endinput\else\input pst-plot.tex\fi
+\ifx\PSTricksAddLoaded\endinput\else\input pstricks-add.tex\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex \fi
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
% interface to the `xkeyval' package
\pst@addfams{pst-func}
-\def\fileversion{0.45}
-\def\filedate{2006/04/22}
+\def\fileversion{0.46}
+\def\filedate{2006/09/06}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
-%\pstheader{pstricks-add.pro}
-%\def\pst@funcdict{tx@FuncDict begin }
-%\def\tx@saveCoor{\pst@3ddict saveCoor end }
-%\def\tx@ConvertTo2D{\pst@3ddict ConvertTo2D end }
%
\define@key[psset]{pst-func}{xShift}{\def\psk@xShift{#1}}
\psset[pst-func]{xShift=0}
@@ -70,8 +67,7 @@
\define@key[psset]{pst-func}{coeff}{\def\psk@coeff{#1}}
\define@key[psset]{pst-func}{Abbreviation}{\def\psk@Deriviation{#1}}% compatibility
\define@key[psset]{pst-func}{Derivation}{\def\psk@Derivation{#1}}
-\newif\ifPst@markZeros%
-\define@key[psset]{pst-func}{markZeros}[true]{\@nameuse{Pst@markZeros#1}}
+\define@boolkey[psset]{pst-func}[Pst@]{markZeros}[true]{}
\define@key[psset]{pst-func}{epsZero}{\def\psk@epsZero{#1}}
\define@key[psset]{pst-func}{dZero}{\def\psk@dZero{#1}}
\define@key[psset]{pst-func}{zeroLineTo}{\def\psk@zeroLineTo{#1}}
@@ -385,8 +381,7 @@
\psIntegral[#1]{#2}{#3}(#4,#5){pop pop x #6\space x t neg add #7\space mul}%
}%
%
-\newif\ifPst@printValue%
-\define@key[psset]{pst-func}{printValue}[true]{\@nameuse{Pst@printValue#1}}
+\define@boolkey[psset]{pst-func}[Pst@]{printValue}[true]{}
\define@key[psset]{pst-func}{barwidth}{\def\psFunc@barwidth{#1 }}% a factor, not a dimen
\psset[pst-func]{printValue=false,barwidth=1}
%
@@ -480,12 +475,28 @@
\ignorespaces%
}
%
+% Superellipese / Lamefunction
+\define@key[psset]{pst-func}{radiusA}{\pst@getlength{#1}\pst@radiusA}
+\define@key[psset]{pst-func}{radiusB}{\pst@getlength{#1}\pst@radiusB}
+\psset[pst-func]{radiusA=1,radiusB=1}
+%
+\def\psLame{\pst@object{psLame}}
+\def\psLame@i#1{%
+ \addbefore@par{plotpoints=200}
+ \pst@killglue
+ \begin@SpecialObj
+ \parametricplot{0}{360}{%
+ t cos dup mul 1 #1\space div exp \pst@radiusA \pst@number\psxunit div mul
+ t 90 gt { t 270 lt { neg } if } if
+ t sin dup mul 1 #1\space div exp \pst@radiusB \pst@number\psyunit div mul
+ t 180 gt { neg } if }
+ \end@SpecialObj
+}
+%
% For polar plots
-\newif\ifpolarplot
-\define@key[psset]{pst-func}{polarplot}[true]{\@nameuse{polarplot#1}}
-\newif\ifPst@algebraic%
-\define@key[psset]{pst-func}{algebraic}[true]{\@nameuse{Pst@algebraic#1}}%
-\psset[pst-func]{polarplot=false,algebraic=false}
+%\define@boolkey[psset]{pst-func}[PstAdd@]{polarplot}[true]{}
+%\define@boolkey[psset]{pst-func}[PstAdd@]{algebraic}[true]{}
+%\psset[pst-func]{polarplot=false,algebraic=false}
%
\def\psplotImp{\pst@object{psplotImp}}% 20060420
\def\psplotImp@i(#1,#2)(#3,#4)#5{%
@@ -497,7 +508,7 @@
/xMax #3 def
/yMin #2 def
/yMax #4 def
- \ifpolarplot
+ \ifPst@polarplot
/@PolarAlgPlot (#5) tx@addDict begin AlgParser end cvx def
/Func {
/phi y x atan def