summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-18 23:09:00 +0000
committerKarl Berry <karl@freefriends.org>2014-06-18 23:09:00 +0000
commit451b2f3d546ab208d12ccab29befbf4577374c2e (patch)
tree0acda79bafce79afe36258aae2e02561eeead79e
parent6271138aedb2f61eee0225300db1569008084a10 (diff)
pstricks-add (13jun14)
git-svn-id: svn://tug.org/texlive/trunk@34298 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/Changes5
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdfbin5112398 -> 5115226 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex167
-rw-r--r--Master/texmf-dist/tex/generic/pstricks-add/pstricks-add.tex160
4 files changed, 241 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/Changes b/Master/texmf-dist/doc/generic/pstricks-add/Changes
index 88e985b699d..b8535206e8d 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/Changes
+++ b/Master/texmf-dist/doc/generic/pstricks-add/Changes
@@ -1,4 +1,4 @@
-%% $Id: Changes 914 2014-05-17 20:02:53Z herbert $
+%% $Id: Changes 923 2014-06-16 07:31:28Z herbert $
%%
pstricks-add.pro -----------
0.23 2009-12-17 - add RGBtoGRAY and WavelengthToGRAY
@@ -39,7 +39,8 @@ pstricks-add.sty ----------- (hv)
pstricks-add.tex ----------- (hv)
- v 3.68 2014-05-17 - another minor fixe to \psStep
+ v 3.73 2014-06-16 - enable \ncput et al for \psVector
+ v 3.72 2014-06-12 - allow multiple coors for \psVector
v 3.67 2014-05-07 - some minor fixes to \psStep
v 3.66 2014-04-17 - added \psBigArrow
v 3.65 2014-01-21 - added \ignorespaces for \psStartPoint
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
index 925fc26054c..8b265124401 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
index 72530064e63..c4c2fad2532 100644
--- a/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
+++ b/Master/texmf-dist/doc/generic/pstricks-add/pstricks-add-doc.tex
@@ -1,4 +1,4 @@
-%% $Id: pstricks-add-doc.tex 914 2014-05-17 20:02:53Z herbert $
+%% $Id: pstricks-add-doc.tex 924 2014-06-16 21:25:49Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside]{pst-doc}
\listfiles
@@ -16,7 +16,7 @@
\usepackage{pstricks-add}
\let\pstricksaddFV\fileversion
\usepackage{pst-eucl,pst-fun,pst-func,multirow}
-\usepackage{pifont}
+\usepackage{pifont,pst-func}
\let\belowcaptionskip\abovecaptionskip
%
\def\textat{\char064}%
@@ -234,24 +234,28 @@ for the horizontal line in \Lkeyval{psMarkAngleLineStyle} and preset to
\end{lstlisting}
-\begin{pspicture}[showgrid](10,10)
+ \begin{pspicture}[showgrid](10,10)
\psStartPoint(1,1)
- \psVector(3;30)\psVector(4;60)\psVector[linecolor=red](3;10)
- \psVector[linestyle=dashed](4;110)
+ \psVector(3;30)(4;60)\nbput{$V_2$}
+ \psVector[linecolor=red](3;10)\nbput{$V_3$}
+ \psVector[linestyle=dashed](4;110)\nbput{$V_4$}
\psStartPoint(1,1)\psset{markAngle}
- \psVector[linestyle=dashed](4;110)\psVector[linecolor=red](3;10)
- \psVector(4;60)\psVector(3;30)
-\end{pspicture}
+ \psVector[linestyle=dashed](4;110)\ncput*{$V_1$}
+ \psVector[linecolor=red](3;10)\ncput*{$V_2$}
+ \psVector(4;60)(3;30)\ncput*{$V_4$}
+ \end{pspicture}
\begin{lstlisting}
-\begin{pspicture}[showgrid](10,10)
+ \begin{pspicture}[showgrid](10,10)
\psStartPoint(1,1)
- \psVector(3;30)\psVector(4;60)\psVector[linecolor=red](3;10)
- \psVector[linestyle=dashed](4;110)
+ \psVector(3;30)(4;60)\nbput{$V_2$}
+ \psVector[linecolor=red](3;10)\nbput{$V_3$}
+ \psVector[linestyle=dashed](4;110)\nbput{$V_4$}
\psStartPoint(1,1)\psset{markAngle}
- \psVector[linestyle=dashed](4;110)\psVector[linecolor=red](3;10)
- \psVector(4;60)\psVector(3;30)
-\end{pspicture}
+ \psVector[linestyle=dashed](4;110)\ncput*{$V_1$}
+ \psVector[linecolor=red](3;10)\ncput*{$V_2$}
+ \psVector(4;60)(3;30)\ncput*{$V_4$}
+ \end{pspicture}
\end{lstlisting}
All end points of the vectors are saved in node names with the preset name \verb=Vector#=,
@@ -266,13 +270,13 @@ the endpoint of the third vector or the name of the starting point of the forth
\begin{pspicture}[showgrid,linewidth=1pt](10,10.4)
\psStartPoint[A](1,1)% nodes have the base name A
- \psVector(3;30)\psVector(4;60)\psVector[linecolor=red](3;10)
- \psVector[linestyle=dashed](4;110)
+ \psVector(3;30)(4;60)\psVector[linecolor=red](3;10)
+ \psVector[linestyle=dashed](4;110)\nbput{$V_3$}
\psline{->}(A0)(A4)
\psStartPoint[B](1,1)\psset{markAngle}% nodes have the base name B
- \psVector[linestyle=dashed](4;110)
- \psVector[linecolor=red](3;10)
- \psVector(4;60)\psVector(3;30)
+ \psVector[linestyle=dashed](4;110)\naput{$V_1$}
+ \psVector[linecolor=red](3;10)\ncput*{$V_2$}
+ \psVector(4;60)(3;30)
\psline[arrows=-D>,arrowscale=2,linewidth=1.5pt,linecolor=red](B2)(A2)
\psline[arrows=-D>,arrowscale=2,linewidth=1.5pt,linecolor=blue](A3)(B3)
\multido{\iA=0+1}{5}{\uput[0](A\iA){A\iA}\uput[180](B\iA){B\iA}}
@@ -281,16 +285,16 @@ the endpoint of the third vector or the name of the starting point of the forth
\begin{lstlisting}
\begin{pspicture}[showgrid,linewidth=1pt](10,10.4)
\psStartPoint[A](1,1)% nodes have the base name A
- \psVector(3;30)\psVector(4;60)\psVector[linecolor=red](3;10)
- \psVector[linestyle=dashed](4;110)
+ \psVector(3;30)(4;60)\psVector[linecolor=red](3;10)
+ \psVector[linestyle=dashed](4;110)\nbput{$V_3$}
\psline{->}(A0)(A4)
\psStartPoint[B](1,1)\psset{markAngle}% nodes have the base name B
- \psVector[linestyle=dashed](4;110)
- \psVector[linecolor=red](3;10)
- \psVector(4;60)\psVector(3;30)
+ \psVector[linestyle=dashed](4;110)\naput{$V_1$}
+ \psVector[linecolor=red](3;10)\ncput*{$V_2$}
+ \psVector(4;60)(3;30)
\psline[arrows=-D>,arrowscale=2,linewidth=1.5pt,linecolor=red](B2)(A2)
\psline[arrows=-D>,arrowscale=2,linewidth=1.5pt,linecolor=blue](A3)(B3)
- \multido{\iA=0+1}{5}{\uput[0](A\iA){A\iA}\uput[180](B\iA){B\iA}
+ \multido{\iA=0+1}{5}{\uput[0](A\iA){A\iA}\uput[180](B\iA){B\iA}}
\end{pspicture}
\end{lstlisting}
@@ -996,7 +1000,8 @@ into the above structure for using it with the example file.
\end{LTXexample}
\emph{Important} is the option \verb|-dNOSAFER| for the \texttt{ps2pdf} run, otherwise Ghostscript
-didn't allow the run of external data files.
+didn't allow the run of external data files. Important optional arguments are
+\Lkeyword{colored}, \Lkeyword{colorOffset}, and \Lkeyword{colSteps}.
%--------------------------------------------------------------------------------------
\section{Random dots}
@@ -1609,6 +1614,89 @@ the mathematical function in postfix or algebraic notation (with
There is also an optional argument \Lkeyword{noVerticalLines} which suppresses all
vertical lines of the step function in the output.
+\iffalse
+
+
+
+\definecolor{BeigeTS}{rgb}{0.98,0.95,0.87}
+\definecolor{CornBlauTS}{rgb}{0.39,0.59,0.93}
+\definecolor{SandBraun}{rgb}{0.96,0.64,0.38}
+
+\begin{LTXexample}[pos=t,preset=\centering]
+\psset{yunit=1.25cm,arrowinset=0.02,arrowlength=2,linewidth=0.5pt,saveNodeCoors,NodeCoorPrefix=n,PrintCoord}
+\def\funkf{2*sqrt(x)*cos(ln(x))*sin(x)}
+\begin{pspicture}[plotpoints=500,algebraic,fontscale=5,markZeros,dotscale=0.7](-0.5,-3)(10,2.5)
+\psStep[fillstyle=solid,fillcolor=BeigeTS,opacity=0.7,linewidth=0.3pt,linecolor=SandBraun!50](0.001,9.5){40}{\funkf}
+\psStep[StepType=Riemann,fillstyle=solid,opacity=0.3,fillcolor=CornBlauTS,linecolor=CornBlauTS,linewidth=0.3pt]%
+(0.001,9.5){40}{\funkf}
+\psaxes[labelFontSize=\scriptstyle,ticksize=-0.1 0]{->}(0,0)(0,-2.75)(10,2.5)
+\psplot[linecolor=BeigeTS!60,linewidth=0.8pt]{0.001}{9.75}{\funkf}
+\psplotTangent[linecolor=blue, Derive={Derive(1,\funkf)}]{1.29}{1.5}{\funkf}
+\uput[90](6,1.2){$f(x)=2\cdot\sqrt{x}\cdot\cos{(\ln{x})}\cdot\sin{x}$}
+\psZero[xShift=-0.2,yShift=0.15,linecolor=blue!50!black!90,ydecimals=0,postString={1},Newton](0.5,1){\funkf}{0}{N1}
+\psZero[xShift=-0.05,yShift=0.15,linecolor=blue!50!black!90,ydecimals=0,postString={2}](2,4){\funkf}{0}{N2}
+\psZero[xShift=-0.45,yShift=0.15,linecolor=blue!50!black!90,ydecimals=0,postString={3}](4,6){\funkf}{0}{N3}
+\psZero[xShift=-0.45,yShift=0.15,linecolor=blue!50!black!90,ydecimals=0,postString={4}](6,7){\funkf}{0}{N4}
+\psZero[xShift=-0.45,yShift=0.15,linecolor=blue!50!black!90,ydecimals=0,postString={5}](9,11){\funkf}{0}{N5}
+\psZero[xShift=-1.15,yShift=0,linecolor=blue!50!black!90,PtName={M},postString={m=1}](0.5,2){Derive(1,\funkf)-1+\funkf}{\funkf}{M}
+\pcline{->}(0.5,-1)(M)
+\nbput[nrot=:U,labelsep=0.01]{\scriptsize Steigung ist hier \psPrintValueNew[PSfont=Palatino-Roman,decimals=0,round=true,fontscale=7]{nMx,{Derive(1,\funkf)}}}
+%\psdot[linecolor=green,strokeopacity=0.8](*{nMx} {\funkf})
+\uput[90](*{nMx} {\funkf}){$m=$\psPrintValueNew[PSfont=Palatino-Roman,decimals=0,round=true,fontscale=8]{nMx,{Derive(1,\funkf)}}}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+
+
+\begin{pspicture}(-0.5,-1.5)(10.2,1.5)
+ \psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-1.5)(10.2,1.5)
+ \psplot[linewidth=.6pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)}
+ \psStep[algebraic,StepType=infimum,fillstyle=solid,opacity=0.3,fillcolor=green!50!black!30,linecolor=green,linewidth=0.1pt,strokeopacity=0.8](0,10){50}%
+ {sqrt(x)*cos(x)*sin(x)}
+\end{pspicture}
+
+
+\psset{yunit=1.25cm,plotpoints=500}
+\begin{pspicture}(-0.5,-1.5)(10,1.5)
+ \psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-1.5)(10,1.5)
+ \psStep[algebraic,StepType=supremum,fillstyle=solid,opacity=0.3,fillcolor=green!50!black!30,linecolor=green,linewidth=0.1pt](0,10){50}%
+ {sqrt(x)*cos(x)*sin(x)}
+ \psplot[linewidth=.5pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)}
+\end{pspicture}
+
+
+
+\begin{pspicture}(-0.5,-0.5)(10,3)
+ \psaxes[labelFontSize=\scriptstyle]{->}(10,3)
+ \psplot[plotpoints=500,linewidth=.5pt,algebraic]{0}{10}{sqrt(x)}
+ \psStep[linecolor=green,StepType=upper,fillstyle=solid,opacity=0.3,fillcolor=green!50!black!60,linewidth=0.3pt](0,9){9}{x sqrt}
+ \psStep[linecolor=BeigeTS,StepType=lower,fillstyle=hlines,hatchcolor=BeigeTS,hatchwidth=0.3pt,hatchsep=1.2pt,linewidth=0.3pt](0,9){9}{x sqrt }
+\end{pspicture}
+
+
+
+\psset{plotpoints=500}
+\begin{pspicture}(-0.5,-2.25)(10,3)
+ \psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-2.25)(10,3)
+ \psplot[linewidth=0.5pt,algebraic]{0}{10}{sqrt(x)*sin(x)}
+ \psStep[algebraic,linecolor=SandBraun,linewidth=0.4pt,StepType=upper](0,9){20}{sqrt(x)*sin(x)}
+ \psStep[linecolor=CornBlauTS,linewidth=0.4pt,linestyle=dashed,dash=1.6pt 1.6pt](0,9){20}{x sqrt x RadtoDeg sin mul}
+\end{pspicture}
+
+
+
+\psset{yunit=1.25cm,plotpoints=500}
+\begin{pspicture}(-0.5,-1.5)(10,1.5)
+ \psaxes[labelFontSize=\scriptstyle]{->}(0,0)(0,-1.5)(10,1.5)
+ \psStep[algebraic,StepType=Riemann,fillstyle=solid,opacity=0.3,fillcolor=CornBlauTS,linecolor=CornBlauTS,linewidth=0.2pt](0,10){50}%
+ {sqrt(x)*cos(x)*sin(x)}
+ \psplot[linewidth=.5pt,algebraic]{0}{10}{sqrt(x)*cos(x)*sin(x)}
+\end{pspicture}
+
+\fi
+
\clearpage
%--------------------------------------------------------------------------------------
@@ -1670,6 +1758,9 @@ be used in the default ways for nodes:
\end{LTXexample}
+
+
+
\subsection{\nxLcs{psplotTangent} and option \nxLkeyword{Tnormal}}
%--------------------------------------------------------------------------------------
There is an additional option, named \Lkeyword{Derive} for an
@@ -1718,6 +1809,7 @@ radian unit!
\egroup
\end{center}
+
\begin{lstlisting}
\def\F{x RadtoDeg dup dup cos exch 2 mul cos add exch 3 mul cos add}
\def\Fp{x RadtoDeg dup dup sin exch 2 mul sin 2 mul add exch 3 mul sin 3 mul add neg}
@@ -1850,13 +1942,32 @@ a \Lnotation{|} (see example).
\begin{pspicture}(-4,-4)(4,6)
\parametricplot[algebraic,plotpoints=500,linewidth=3\pslinewidth]{0}{3.141592}{\LissaAlg}
\multido{\r=0.000+0.314}{11}{%
- \psplotTangent[algebraic,linecolor=red,arrows=<->]{\r}{1.5}{\LissaAlg} }
+ \psplotTangent[algebraic,linecolor=red,arrows=<->]{\r}{1.5}{\LissaAlg}}
\multido{\r=0.157+0.314}{11}{%
- \psplotTangent[algebraic,linecolor=blue,arrows=<->,%
+ \psplotTangent[algebraic,linecolor=blue,arrows=<->,
Derive=\LissaAlgDer]{\r}{1.5}{\LissaAlg} }
\end{pspicture}
\end{LTXexample}
+\iffalse
+\begin{LTXexample}[pos=t,wide]
+\psset{yunit=2cm,xunit=1.2cm,plotpoints=500,arrowinset=0.02,arrowlength=2,algebraic}
+\def\funkf{2*sqrt(x)*cos(ln(x))*sin(x)}
+\begin{pspicture}[showgrid](-1,-3)(10,3.2)
+\psaxes[labelFontSize=\scriptstyle,subticks=5,ticksize=-0.1 0,labelsep=0.07]{->}(0,0)(0,-2.75)(10,2.5)
+\psplot{0.001}{9.75}{\funkf}
+\psplotTangent[linecolor=blue,Derive={Derive(1,\funkf)},
+ showpoints,nodesep=0]{0.35}{1.5}{\funkf}
+\psplotTangent[linecolor=blue,Derive={Derive(1,\funkf)},Tnormal,
+ nodesepA=-3,nodesepB=0,strokeopacity=0.4]{0.35}{1.5}{\funkf}
+\psdot[linecolor=cyan](ENormal)
+\psdot[linecolor=cyan](ENormalE)
+\psdot[linecolor=red](OCurve)
+\psdot[linecolor=green](ETangent)
+\psdot[linecolor=green](ETangentE)
+\end{pspicture}
+\end{LTXexample}
+\fi
\clearpage
\section{Successive derivatives of a function}
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 f7751f1c9d1..018fa300df7 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 914 2014-05-17 20:02:53Z herbert $
+%% $Id: pstricks-add.tex 924 2014-06-16 21:25:49Z herbert $
%%
%% This is file `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.68}
-\def\filedate{2014/05/17}
+\def\fileversion{3.73}
+\def\filedate{2014/06/16}
\message{`pstricks-add' v\fileversion, \filedate\space (dr,hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -1318,7 +1318,7 @@ a add
\def\psStep@i(#1,#2)#3#4{%
\begin@ClosedObj%
\addto@pscode{
- \ifPst@algebraic /Func (#4) tx@addDict begin AlgParser end cvx def \fi
+ /Func \ifPst@algebraic (#4) tx@addDict begin AlgParser end cvx \else {#4} \fi def
/x #1 def
/dx #2 #1 sub #3 div def
/scx { \pst@number\psxunit mul } def
@@ -1326,7 +1326,7 @@ a add
\ifcase\psk@StepType % 0->lower, height is always f(x)
x scx 0 moveto
#3 {
- \ifPst@algebraic Func \else #4 \fi
+ Func
scy dup x scx exch \ifPst@noVerticalLines moveto \else lineto \fi
/x x dx add def
x scx exch lineto
@@ -1336,7 +1336,7 @@ a add
x scx 0 moveto
#3 {
/x x dx add def
- \ifPst@algebraic Func \else #4 \fi scy dup x dx sub scx exch
+ Func scy dup x dx sub scx exch
\ifPst@noVerticalLines moveto \else lineto \fi
x scx exch lineto
x scx 0 \ifPst@noVerticalLines moveto \else lineto \fi
@@ -1348,11 +1348,11 @@ a add
/AMin [] def
/dt dx eps3 div def
#3 {
- /Max \ifPst@algebraic Func \else #4 \fi def
+ /Max Func def
/Min Max def
/t x def % save x value
eps3 {
- \ifPst@algebraic Func \else #4 \fi
+ Func
dup
Max lt { /Max exch def } { dup Min gt { /Min exch def }{ pop } ifelse } ifelse
/x x dt add def
@@ -1373,8 +1373,8 @@ a add
closepath
} repeat
\or % 3->inf(imum)
- #3 {
x scx 0 moveto
+ #3 {
\ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x)
/xOld x def
/x x dx add def
@@ -1383,11 +1383,11 @@ a add
scy dup xOld scx exch \ifPst@noVerticalLines moveto \else lineto \fi
x scx exch lineto
x scx 0 \ifPst@noVerticalLines moveto \else lineto \fi
- closepath
+ closepath x scx 0 moveto
} repeat
\or % 4-> sup(remum)
- #3 {
x scx 0 moveto
+ #3 {
\ifPst@algebraic Func \else #4 \fi /y0 ED % left value f(x)
/x x dx add def
\ifPst@algebraic Func \else #4 \fi /y1 ED % right value f(x+dx)
@@ -1395,7 +1395,7 @@ a add
scy dup x dx sub scx exch \ifPst@noVerticalLines moveto \else lineto \fi
x scx exch lineto
x scx 0 \ifPst@noVerticalLines moveto \else lineto \fi
- closepath
+ closepath x scx 0 moveto
} repeat
\fi
}%
@@ -1404,7 +1404,13 @@ a add
\end@ClosedObj%
}
%
-\define@key[psset]{pstricks-add}{Derive}{\def\psk@Derive{#1}}%
+\define@key[psset]{pstricks-add}{Derive}{\def\psk@Derive{#1}}
+%\define@key[psset]{pstricks-add}{Derive}{\expandafter\psk@@Derive#1,,\@nil}%
+%\def\psk@@Derive#1,#2,#3\@nil{%
+% \ifx\relax#2\relax
+% \ifPST@algebraic\def\psk@Derive{ (#1) tx@addDict begin AlgParser end cvx }\else \def\psk@Derive{ #1 }\fi
+% \else\def\psk@Derive{ (#1)(x) tx@Derive begin Derive end tx@addDict begin AlgParser end cvx } \fi
+%}
\define@boolkey[psset]{pstricks-add}[PST@]{Tnormal}[true]{}
\psset[pstricks-add]{CMYK=true}
@@ -1496,7 +1502,7 @@ a add
\pst@killglue
\expandafter\psplotTangent@x#3,,\@nil\relax
\begingroup
- \ifx\relax#1\relax\else\psset{linestyle=solid,#1}\fi%
+ \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{
@@ -1509,72 +1515,72 @@ a add
\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
+ #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 /@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
+ { \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
+% %% algebraic we can use the derivative machine
/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
+ x \pst@number\psxunit mul y \pst@number\psyunit mul
translate % define the temporary origin
- % now we calculate the slope of the tangent
+ % 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 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
+ { \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
{ /y1 ED /x1 ED }
- { \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
+ { \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
+ 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
+ #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
+ { \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
- { /y1 ED /x1 ED } % we have 2 values
- { \ifPst@polarplot dup x \ifPst@algebraic RadtoDeg \fi
+ cleartomark
+ #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
- cleartomark
- y2 y1 sub \pst@number\psyunit mul x2 x1 sub \pst@number\psxunit mul } ifelse
+ cleartomark
+ y2 y1 sub \pst@number\psyunit mul x2 x1 sub \pst@number\psxunit mul } ifelse
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
+ #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)
+ { \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
- x \ifPst@algebraic RadtoDeg \fi sin Fphi mul x0 add /y ED
- x \ifPst@algebraic RadtoDeg \fi cos Fphi mul y0 sub /x ED
+ x \ifPst@algebraic RadtoDeg \fi sin Fphi mul x0 add /y ED
+ x \ifPst@algebraic RadtoDeg \fi cos Fphi mul y0 sub /x ED
\else /y ED /x 1 def \fi } ifelse
- cleartomark
+ cleartomark
y \pst@number\psyunit mul x \pst@number\psxunit mul Atan \ifPST@Tnormal 90 add \fi
% y ATAN1 % we have the slope angle of the tangent. ATAN is defined int the pstricks.pro, patch 6
\fi
dup % to prevent rounding errors use original value
cvi 180 mod 90 gt { 180 sub } if % -90 <= angle <= 90
rotate % rotate, depending to the origin
- /Lineto /lineto load def % the pro file needs /Lineto
+ /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
- #3
- y \pst@number\psyunit mul x \pst@number\psxunit mul Atan cos div \pst@number\psxunit mul 0 % lineto
+ 0 \psk@nodesepA add 0 % moveto
+ #3 \pst@number\psxunit mul \psk@nodesepB sub 0
+% 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
- \if@star 0
- \else
- \ifx\pst@tempRight\@empty #3 neg \else \pst@tempLeft\space \fi
+ \ifx\pst@tempRight\@empty #3 \psk@nodesepA \pst@number\psxunit div sub \else \pst@tempRight\space \fi \pst@number\psxunit mul 0 % moveto
+ \if@star 0
+ \else
+ \ifx\pst@tempRight\@empty #3 \psk@nodesepB \pst@number\psxunit div sub neg \else \pst@tempLeft\space \fi
\pst@number\psxunit mul
\fi 0 % lineto
\fi
@@ -1583,7 +1589,7 @@ a add
\tx@Line
\ifx\pslinestyle\@none\else
\pst@number\pslinewidth SLW
- \tx@setStrokeTransparency
+ \tx@setStrokeTransparency
\@nameuse{psls@\pslinestyle}
\fi
\ifshowpoints % show the points?
@@ -1594,9 +1600,32 @@ a add
grestore
\fi
}%
- \use@pscode%
- \endgroup%
- \@starfalse%
+ \use@pscode
+ %% ---- only for algebraic: 3 Nodes for Origin, Tangent-End and Normal-End --- 31.05.2014 TS
+\iffalse
+ \ifPst@algebraic
+ \pst@Verb{
+ #2 /x ED % x-Wert wird definiert
+ /Function (#4) tx@AlgToPs begin AlgToPs end cvx def
+ /mt (#4) (x) tx@Derive begin Derive end tx@addDict begin AlgParser end cvx def % mt ist die Steigung an der Stelle x = #2
+ x Function /y ED % y = f(x=#2) ist der Funktionswert an der Stelle x = #2
+ #3 mt 1 Atan cos dup mul mt 1 Atan sin \pst@number\psyunit mul \pst@number\psxunit div dup mul add sqrt div /ldt ED
+ mt 0 ge { ldt mt 1 Atan cos mul /Dx ED ldt mt 1 Atan sin mul /Dy ED }
+ {ldt mt 1 Atan cos mul neg /Dx ED ldt mt 1 Atan sin mul neg /Dy ED } ifelse
+ x Dx add /xt ED
+ y Dy add /yt ED
+ x Dy \pst@number\psyunit mul \pst@number\psxunit div add /xn ED
+ y Dx \pst@number\psxunit mul \pst@number\psyunit div sub /yn ED
+ }%
+ \pnode(! x y){OCurve}%
+ \pnode(! xt yt){ETangent}%
+ \pnode(! xn yn){ENormal}%
+ \psLNode(ENormal)(OCurve){2}{ENormalE}%
+ \psLNode(ETangent)(OCurve){2}{ETangentE}%
+ \fi
+\fi
+ \endgroup
+ \@starfalse
\ignorespaces}
%
%% #1-#2 x range
@@ -2299,8 +2328,8 @@ a add
\def\psStartPoint{\@ifnextchar[{\psStartPoint@i}{\psStartPoint@i[Vector]}}
\def\psStartPoint@i[#1](#2){%
\global\psVectorCtr=\@ne
- \gdef\psVectorName{#1}
- \pnode(#2){#10}
+ \gdef\psVectorName{#1}%
+ \pnode(#2){#10}%
\pst@getcoor{#2}\pst@tempA%
\pstVerb{tx@Dict begin
\pst@tempA
@@ -2308,29 +2337,33 @@ a add
\pst@number\psxunit div /cp.X exch def end }\ignorespaces}
%
\def\psVector{\pst@object{psVector}}
-\def\psVector@i(#1){%
- \pst@killglue%
+\def\psVector@i{%
+ \pst@killglue
\addbefore@par{arrows=->,arrowsize=6pt}%
% \addto@par{showpoints=false}%
- \pst@getcoor{#1}\pst@tempCoor%
+ \psVector@ii}
+
+\def\psVector@ii(#1){%
+ \pst@getcoor{#1}\pst@tempCoor
\begingroup
- \use@par%
+ \use@keep@par
\rput(! cp.X cp.Y ){%
- \psline(0,0)(#1)%
+ \pnode(0,0){@@@A}\pnode(#1){@@@B}
\ifPst@markAngle
\psarc[style=psMarkAngleStyle](0,0){1}{0}{!\pst@tempCoor exch atan}%
\psline[style=psMarkAngleLineStyle](1.5,0)%
\fi}%
+ \ncline[nodesep=0pt]{@@@A}{@@@B}
\pnode(! \pst@tempCoor \pst@number\psyunit div cp.Y add exch
\pst@number\psxunit div cp.X add exch ){\psVectorName\the\psVectorCtr}%
\global\advance\psVectorCtr by \@ne%
- \endgroup%
- \pst@Verb{%tx@Dict begin
+ \endgroup
+ \pst@Verb{ %tx@Dict begin
\pst@tempCoor
\pst@number\psyunit div cp.Y add /cp.Y exch def
\pst@number\psxunit div cp.X add /cp.X exch def %end
}%
- \ignorespaces}
+ \@ifnextchar(\psVector@ii\ignorespaces}
%
\define@key[psset]{pstricks-add}{basename}{\def\psk@basename{#1}}%
\psset[pstricks-add]{basename=}%
@@ -2490,11 +2523,14 @@ a add
%
\define@key[psset]{pstricks-add}{colSteps}{\def\psk@colSteps{#1 }}
\define@boolkey[psset]{pstricks-add}[Pst@]{colored}[true]{}
-\psset[pstricks-add]{colSteps=0,colored=false}% continuing colors and grayscale
+\define@key[psset]{pstricks-add}{colorOffset}[]{\def\psk@colorOffset{#1 }}
+\psset[pstricks-add]{colSteps=0,colored=false,colorOffset=}% continuing colors and grayscale
%
\def\pstContour{\pst@object{pstContour}}
\def\pstContour@i#1{%
+\addbefore@par{radius=1pt}
\begin@SpecialObj%
+ \pssetlength\pst@dimb\psk@radius
\addto@pscode{
(#1) run
/zMax 0 def /zMin 0 def % lowest and highest value
@@ -2502,6 +2538,7 @@ a add
N{ % inside contourdata
/data ED % save first inner array
data aload length 3 div round cvi { % get the records
+ \psk@colorOffset
dup zMin lt % z<zMin?
{ /zMin ED } % yes, save it
{ dup zMax gt { /zMax ED }{ pop } ifelse } ifelse
@@ -2514,6 +2551,7 @@ a add
0 1 N 1 sub { % for i=0 to N-1
contourdata exch get /data ED % get first array
data aload length 3 div round cvi {
+ \psk@colorOffset
/z ED /y ED /x ED
z zMin sub dz div % relative z (0..1)
\ifPst@colored 400 mul 380 add tx@addDict begin wavelengthToRGB
@@ -2523,7 +2561,7 @@ a add
setgray
\fi
x \pst@number\psxunit mul y \pst@number\psyunit mul
- 1 0 360 arc fill
+ \pst@number\pst@dimb 0 360 arc fill
} repeat
} for
}%