summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-17 18:40:40 +0000
committerKarl Berry <karl@freefriends.org>2010-03-17 18:40:40 +0000
commitcb72a109260611fc385763b7288db209e5c86165 (patch)
tree5c3e92058a08b8bc77af7b2ac220ce7a9017269b /Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
parent59d1decd10c6e2cf2cb3c19cc2631ba9dbb01ecc (diff)
pstricks-add 3.39 (13mar10)
git-svn-id: svn://tug.org/texlive/trunk@17472 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex48
1 files changed, 26 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
index 0cf76d4e7af..7fd67ab5812 100644
--- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
+++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex
@@ -30,8 +30,8 @@
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
\ifx\PSTmathLoaded\endinput\else \input pst-math \fi
%
-\def\fileversion{3.38}
-\def\filedate{2009/12/13}
+\def\fileversion{3.39}
+\def\filedate{2010/03/12}
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -1116,17 +1116,18 @@
%% #1 : x value
%% #2 : delta x or x0,x1
%% #3 : function
-\def\psplotTangent{\@ifnextchar*{\def\pst@tempA{true }\psplotTangent@v}{\def\pst@tempA{false }\psplotTangent@v*}}
-\def\psplotTangent@v*{\@ifnextchar[{\psplotTangent@i}{\psplotTangent@i[]}}
-\def\psplotTangent@i[#1]#2#3#4{%
- \expandafter\psplotTangent@ii#3,,\@nil
- \def\pst@par{#1}%
- \ifx\psk@Derive\@empty\ifPst@algebraic\addbefore@par{Derive=NOT@EMPTY}\fi\fi%%dr 0606
+\def\psplotTangent{\pst@object{psplotTangent}}%
+%\def\psplotTangent{\@ifnextchar*{\def\pst@tempA{true }\psplotTangent@v}{\def\pst@tempA{false }\psplotTangent@v*}}
+%\def\psplotTangent@v*{\@ifnextchar[{\psplotTangent@i}{\psplotTangent@i[]}}
+\def\psplotTangent@i#1#2#3{%
+ \expandafter\psplotTangent@ii#2,,\@nil
+% \def\pst@par{#1}%
\begin@OpenObj%
+ \ifx\psk@Derive\@empty\ifPst@algebraic\def\psk@Derive{NOT@EMPTY}\fi\fi%%dr 0606 hv 1003
\addto@pscode{
- /StarVersion \pst@tempA def
+% /StarVersion \if@star true \else false \fi def
gsave % save current state
- /F@pstplot \ifPst@algebraic (#4) tx@addDict begin AlgParser end cvx \else { #4 } \fi def % define function
+ /F@pstplot \ifPst@algebraic (#3) tx@addDict begin AlgParser end cvx \else { #3 } \fi def % define function
\ifx\psk@Derive\@empty\else
\ifx\psk@Derive\@NOTEMPTY\else%%dr 0606
/FDer@pstplot % do we have a derivation defined?
@@ -1135,39 +1136,39 @@
\fi
/@parametric false def %%dr 0606
% first we calculate the origin
- #2 dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
%%{ /y ED /x ED } % if yes, then we have 2 values
{ /y ED /x ED /@parametric true def } % if yes, then we have 2 values%%dr 0606
{ \ifPst@polarplot x \ifPst@algebraic RadtoDeg \fi PtoC /y ED /x ED \else /y ED \fi } ifelse
cleartomark
\ifx\psk@Derive\@NOTEMPTY%%begin dr 0606
%% algebraic we can use the derivative machine
- /FDer@pstplot (#4) @parametric { (t) } { (x) } ifelse
+ /FDer@pstplot (#3) @parametric { (t) } { (x) } ifelse
tx@Derive begin Derive end tx@addDict begin AlgParser end cvx def
\fi%%end dr 0606
x \pst@number\psxunit mul y \pst@number\psyunit mul
translate % define the temporary origin
% now we calculate the slope of the tangent
\ifx\psk@Derive\@empty% de we have a derivation defined?
- #2 abs 1.0e-6 lt % no, we choose secant for the tangent
- { #2 0.0005 add dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 abs 1.0e-6 lt % no, we choose secant for the tangent
+ { #1 0.0005 add dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
{ /y2 ED /x2 ED } % we have 2 values
{ \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
cos mul /x2 ED x \ifPst@algebraic RadtoDeg \fi sin mul \else /x2 x def \fi /y2 ED } ifelse
cleartomark % delete the mark
- #2 0.0005 sub dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 0.0005 sub dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
{ /y1 ED /x1 ED }
{ \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
cos mul /x1 ED x \ifPst@algebraic RadtoDeg \fi sin mul \else /x1 x def \fi /y1 ED } ifelse
cleartomark
y2 y1 sub x2 x1 sub } % dy dx
{ % > 1.0e-06
- #2 1.0005 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 1.0005 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
{ /y2 ED /x2 ED } % we have 2 values
{ \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
cos mul /x2 ED x \ifPst@algebraic RadtoDeg \fi sin mul \else /x2 x def \fi /y2 ED } ifelse
cleartomark
- #2 .9995 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 .9995 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot
{ /y1 ED /x1 ED } % we have 2 values
{ \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
cos mul /x1 ED x \ifPst@algebraic RadtoDeg \fi sin mul \else /x1 x def \fi /y1 ED } ifelse
@@ -1176,7 +1177,7 @@
atan % atan(dy dx), we have the slope angle of the secant
\ifPST@Tnormal 90 add \fi
\else % there is a derivation defined
- #2 dup /x ED /t ED tx@addDict begin mark FDer@pstplot end counttomark 1 gt % test, if we have parametricplot
+ #1 dup /x ED /t ED tx@addDict begin mark FDer@pstplot end counttomark 1 gt % test, if we have parametricplot
{ /y ED /x ED }
{ \ifPst@polarplot /Fphi ED % the value F'(phi)
tx@addDict begin F@pstplot end x \ifPst@algebraic RadtoDeg \fi PtoC /y0 ED /x0 ED % the x y values
@@ -1193,12 +1194,15 @@
[ % start array of points
\ifPST@Tnormal
0 0 % moveto
- #3
+ #2
y \pst@number\psyunit mul x \pst@number\psxunit mul Atan cos div \pst@number\psxunit mul 0 % lineto
\else % points are in reverse order ...
- \ifx\pst@tempRight\@empty #3 \else \pst@tempRight\space \fi \pst@number\psxunit mul 0 % moveto
- StarVersion { 0 }{\ifx\pst@tempRight\@empty #3 neg \else
- \pst@tempLeft\space \fi \pst@number\psxunit mul} ifelse 0 % lineto
+ \ifx\pst@tempRight\@empty #2 \else \pst@tempRight\space \fi \pst@number\psxunit mul 0 % moveto
+ \if@star 0
+ \else
+ \ifx\pst@tempRight\@empty #2 neg \else \pst@tempLeft\space \fi
+ \pst@number\psxunit mul
+ \fi 0 % lineto
\fi
\pst@cp % kill the currentpoint, if any
false % don't show the points