diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex | 89 |
1 files changed, 44 insertions, 45 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 3f82e910a9d..4840064a482 100644 --- a/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex +++ b/Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex @@ -1,4 +1,4 @@ -%% $Id: pstricks-add.tex 566 2011-08-20 07:19:32Z herbert $ +%% $Id: pstricks-add.tex 606 2011-12-11 17:32:58Z herbert $ %% %% %% This is file `pstricks-add.tex', @@ -31,8 +31,8 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\PSTmathLoaded\endinput\else \input pst-math \fi % -\def\fileversion{3.54} -\def\filedate{2011/08/20} +\def\fileversion{3.55} +\def\filedate{2011/12/11} \message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -902,7 +902,7 @@ /tmpar 2 array def /str 4 string def tmpar 0 (Created data for points #1Tick0..#1Tick) put tmpar 1 scount str cvs put tmpar tx@NodeDict begin concatstringarray = end - \fi + \fi% end }% end pst@Verb %Draw ticks \multido{\iA=#4+1}{#5}{% @@ -1275,66 +1275,64 @@ \tx@Line }% \end@OpenObj\ignorespaces} -\def\psplotTangent@ii#1,#2,#3\@nil{% +\def\psplotTangent@x#1,#2,#3\@nil{% \def\pst@tempLeft{#1}% \def\pst@tempRight{#2}} %% #1 : x value %% #2 : delta x or x0,x1 %% #3 : function -\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}% -% \addbefore@par{Derive=NOT@EMPTY} - \begin@OpenObj% +\def\psplotTangent{\@ifnextchar*{\@startrue\psplotTangent@i}{\@starfalse\psplotTangent@i*}} +\def\psplotTangent@i*{\@ifnextchar[{\psplotTangent@ii}{\psplotTangent@ii[]}} +\def\psplotTangent@ii[#1]#2#3#4{% + \pst@killglue% + \expandafter\psplotTangent@x#3,,\@nil\relax + \begingroup% + \ifx\relax#1\relax\else\psset{linestyle=solid,#1}\fi \ifx\psk@Derive\@empty\ifPst@algebraic\def\psk@Derive{NOT@EMPTY}\fi\fi%%dr 0606 hv 1003 + \pst@addarrowdef \addto@pscode{ -% /StarVersion \if@star true \else false \fi def - gsave % save current state - /F@pstplot \ifPst@algebraic (#3) tx@addDict begin AlgParser end cvx \else { #3 } \fi def % define function + /F@pstplot \ifPst@algebraic (#4) tx@addDict begin AlgParser end cvx \else { #4 } \fi def % define function \ifx\psk@Derive\@empty\else - \ifx\psk@Derive\@NOTEMPTY\else%%dr 0606 - /FDer@pstplot % do we have a derivation defined? + \ifx\psk@Derive\@NOTEMPTY\else%%dr 0606 + /FDer@pstplot % do we have a derivation defined? \ifPst@algebraic (\psk@Derive) tx@addDict begin AlgParser end cvx \else { \psk@Derive } \fi def % define derivation - \fi%%dr 0606 - \fi + \fi%%dr 0606 + \fi% /@parametric false def %%dr 0606 % first we calculate the origin - #1 dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot + #2 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 (#3) @parametric { (t) } { (x) } ifelse + /FDer@pstplot (#4) @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? - #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 + #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 { /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 - #1 0.0005 sub dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot + #2 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 - #1 1.0005 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot + #2 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 - #1 .9995 mul dup /x ED /t ED tx@addDict begin mark F@pstplot end counttomark 1 gt % test, if we have parametricplot + #2 .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 @@ -1343,7 +1341,7 @@ atan % atan(dy dx), we have the slope angle of the secant \ifPST@Tnormal 90 add \fi \else % there is a derivation defined - #1 dup /x ED /t ED tx@addDict begin mark FDer@pstplot end counttomark 1 gt % test, if we have parametricplot + #2 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 @@ -1357,39 +1355,40 @@ cvi 180 mod dup 90 gt { 180 sub } if % -90 <= angle <= 90 rotate % rotate, depending to the origin /Lineto /lineto load def % the pro file needs /Lineto + \pst@cp % kill the currentpoint, if any [ % start array of points \ifPST@Tnormal 0 0 % moveto - #2 + #3 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 #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 + \ifx\pst@tempRight\@empty #3 \else \pst@tempRight\space \fi \pst@number\psxunit mul 0 % moveto + \if@star 0 + \else + \ifx\pst@tempRight\@empty #3 neg \else \pst@tempLeft\space \fi \pst@number\psxunit mul \fi 0 % lineto \fi - \pst@cp % kill the currentpoint, if any + \pst@usecolor\pslinecolor false % don't show the points \tx@Line -% ArrowA CP 4 2 roll ArrowB L % the line with arrows L is defined in pstricks.pro -% \pst@number\pslinewidth SLW % set linewidth in pt -% \@nameuse{psls@\pslinestyle} % linestyle -% \pst@usecolor\pslinecolor % linecolor - stroke % stroke everything + \ifx\pslinestyle\@none\else + \pst@number\pslinewidth SLW + \tx@setStrokeTransparency + \@nameuse{psls@\pslinestyle} + \fi \ifshowpoints % show the points? + gsave \psk@dotsize - \@nameuse{psds@\psk@dotstyle}% + \@nameuse{psds@\psk@dotstyle} 0 0 Dot + grestore \fi - grestore % restore old graphics state }% - \use@pscode % part of \end@OpenObj - \endgroup% % part of \end@OpenObj + \use@pscode + \endgroup% \@starfalse% - \ignorespaces% % part of \end@OpenObj -}% + \ignorespaces} % %% #1-#2 x range %% #3 initial value of y (which is a vector) y(0) y'(0) y''(0) ... |