summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-18 21:31:01 +0000
committerKarl Berry <karl@freefriends.org>2017-04-18 21:31:01 +0000
commit684bd5dd12c9a1f9dfdb2093e5250b7e5d8967c2 (patch)
tree7f12713b1dd027ae1a97b3508e1ae69e2690e2e4 /Master
parent76a768304e5d0d23edc97a9596d9170fb74c8bae (diff)
pst-func (18apr17)
git-svn-id: svn://tug.org/texlive/trunk@43912 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin3689975 -> 3775226 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex296
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex119
4 files changed, 373 insertions, 43 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index b2c4046fbfc..a430f165a07 100644
--- a/Master/texmf-dist/doc/generic/pst-func/Changes
+++ b/Master/texmf-dist/doc/generic/pst-func/Changes
@@ -1,4 +1,5 @@
..... pst-func.tex
+0.85 2017-04-18 - allow framing of function values (ts)
0.84 2017-03-11 - some more modifications to the binomial distributions (ts)
0.83 2017-03-07 - added some more macros for binomial distributions (ts)
0.82 2016-05-01 - psk@PontName->\psk@func@PointName (same name in pst-eucl)
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
index eb54d3153d8..c366b9a9dc5 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
index 2c508068253..e5c5fc0aa5d 100644
--- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
@@ -25,7 +25,17 @@
\lstset{language=PSTricks,
- morekeywords={psGammaDist,psChiIIDist,psTDist,psFDist,psBetaDist,psPlotImpl},basicstyle=\footnotesize\ttfamily}
+ morekeywords={psGammaDist,psChiIIDist,psTDist,psFDist,psBetaDist,psPlotImpl},basicstyle=\footnotesize\ttfamily,
+ literate=%
+ {Ö}{{\"O}}1
+ {Ä}{{\"A}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1
+ {ü}{{\"u}}1
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {~}{{\textasciitilde}}1
+}
%
\psset{labelFontSize=\scriptstyle}% for mathmode
%\def\pshlabel#1{\footnotesize#1}
@@ -63,6 +73,7 @@ Thanks to \\
Leon Free,
Attila Gati,
Horst Gierhardt,
+ Jürgen Gilg,
Christophe Jorssen,
Lars Kotthoff,
Buddy Ledger,
@@ -600,7 +611,7 @@ which plots the envelope curve instead of the Bernstein polynomial.
\Lcs{psZero}\OptArgs\Largr{$x_0,x_1$}\Largb{functionA}\OptArg{functionB}\Largb{node name}
\end{BDef}
-If the second function is not given the macro calculates and displays the zeros of
+If the second function is not given the macro calculates and displays the zeros of
the first function. If the second function is defined too, then the macro calculates the
intermediate point of the two functions. The intervall is defined as $[x_0,x_1]$.
Possible optional arguments are
@@ -608,28 +619,69 @@ Possible optional arguments are
\medskip
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule
-\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule
-\Lkeyword{markZeros} & false & Mark the zeros/intermediate points with a symbol.\\
-\Lkeyword{Newton} & false & Use Newton method instead of the bisector one.\\
-\Lkeyword{PrintCoord} & false & Print the pair of coordinate of the zero/intermediate point.\\
-\Lkeyword{onlyNode} & false & Calculate only the node, do not print anything.\\
-\Lkeyword{onlyYVal} & false & Print only the value.\\
-\Lkeyword{originV} & false & Put the values without an offset.\\
-\Lkeyword{PointName} & I & The printed prefix for the calculated Points.\\
-\Lkeyword{decimals} & 2 & The decimals for the $x$ value.\\
-\Lkeyword{ydecimals} & 2 & The decimals for the $y$ value.\\
-\Lkeyword{xShift} & 0 & $x$ move for the printed value.\\
-\Lkeyword{yShift} & 0 & $y$ move for the printed value.\\\bottomrule
+\emph{Name} & \emph{Default} & \emph{Meaning} \\\midrule
+\Lkeyword{markZeros} & false & Mark the zeros/intermediate points with a symbol.\\
+\Lkeyword{Newton} & false & Use Newton method instead of the bisector one.\\
+\Lkeyword{PrintCoord} & false & Print the pair of coordinates of the zero/intermediate point, like $P(x|y)$.\\
+\Lkeyword{onlyNode} & false & Calculate only the node, do not print anything, if markZeros $=$ false.\\
+\Lkeyword{onlyYVal} & false & Print only the $y$-value.\\
+\Lkeyword{xory} & false & Print $x=$ $x$-Value or, if onlyYVal $=$ true, $y=$ $y$-value.\\
+\Lkeyword{approx} & true & Change the $=$, if xory $=$ true to $\approx$.\\
+\Lkeyword{originV} & false & Put the values without an offset.\\
+\Lkeyword{Framed} & false & Show a filled frame in backround, framesep, fillcolor, opacity or
+ linestyle are options to show different frames.\\
+\Lkeyword{PointName} & I & The printed prefix for the calculated Points.\\
+\Lkeyword{decimals} & 2 & The decimals for the $x$ value.\\
+\Lkeyword{ydecimals} & 2 & The decimals for the $y$ value.\\
+\Lkeyword{xShift} & 0 & $x$ move for the printed value.\\
+\Lkeyword{yShift} & 0 & $y$ move for the printed value.\\
+\bottomrule
\end{tabularx}
\medskip
-The following example was done by Thomas Söll.
+The following examples where done by Jürgen Gilg and Thomas Söll.
\bigskip
\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}
-\psset{yunit=1.25cm,arrowinset=0.02,arrowlength=2,linewidth=0.5pt,saveNodeCoors,NodeCoorPrefix=n}
+\psset{yunit=1.25cm,arrowinset=0.02,arrowlength=2,linewidth=0.5pt,saveNodeCoors,NodeCoorPrefix=n,comma}
+\def\funkf{2*sqrt(x)*cos(ln(x))*sin(x)}
+\begin{pspicture}[plotpoints=500,algebraic,fontscale=5,markZeros,
+ PointName=N,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}$}
+{\psset{dotscale=1.5,linecolor=blue!50!black!90,ydecimals=0,Framed,opacity=0.8,decimals=1,PrintCoord}
+ \psZero[xShift=-0.2,yShift=0.15,postString=1,Newton](0.5,1){\funkf}{N1}
+ \psZero[xShift=-0.05,yShift=0.15,postString=2](2,4){\funkf}{N2}
+ \psZero[xShift=-0.45,yShift=0.15,postString=3](4,6){\funkf}{N3}
+ \psZero[xShift=-0.45,yShift=0.15,postString=4](6,7){\funkf}{N4}
+ \psZero[xShift=-0.25,yShift=0.15,PointName=x,postString=5,xory,PrintCoord=false,linestyle=none,fillcolor=green,opacity=0.6](9,11){\funkf}{N5}
+ \psZero[xShift=-0.95,yShift=0,PointName=M,decimals=0,linestyle=none,fillcolor=SandBraun,
+ ydecimals=1,opacity=0.8,postString={m=1}](0.5,2){Derive(1,\funkf)-1+\funkf}[\funkf]{M}%
+}
+\pcline{->}(0.5,-1)(M)
+\nbput[nrot=:U,labelsep=0.3,npos=0.2]{%
+ \scriptsize \psZero[originV=true,xory=true,onlyYVal=true,PointName=f(x),postString={m=1},Framed,
+ opacity=0.8,linestyle=none,markZeros=false,fontscale=10](0.5,2){Derive(1,\funkf)-1+\funkf}[\funkf]{R}}
+\psdot[linecolor=green,strokeopacity=0.8](M)
+\uput{0.5}[40](M){\psZero[originV=true,approx=false,xory=true,onlyYVal=true,
+ PointName=m,postString={m=1},markZeros=false,fontscale=8](0.5,2){Derive(1,\funkf)-1}[1]{R}}
+\end{pspicture}
+
+
+%\begin{LTXexample}[pos=t]
+\begin{lstlisting}
+\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}
+\psset{yunit=1.25cm,arrowinset=0.02,arrowlength=2,linewidth=0.5pt,saveNodeCoors,NodeCoorPrefix=n,comma}
\def\funkf{2*sqrt(x)*cos(ln(x))*sin(x)}
\begin{pspicture}[plotpoints=500,algebraic,fontscale=5,markZeros,PrintCoord,
PointName=N,dotscale=0.7](-0.5,-3)(10,2.5)
@@ -641,23 +693,225 @@ The following example was done by Thomas Söll.
\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}$}
-{\psset{dotscale=1.5,linecolor=blue!50!black!90,ydecimals=0}
+{\psset{dotscale=1.5,linecolor=blue!50!black!90,ydecimals=0,Framed,opacity=0.8,decimals=1}
\psZero[xShift=-0.2,yShift=0.15,postString=1,Newton](0.5,1){\funkf}{N1}
\psZero[xShift=-0.05,yShift=0.15,postString=2](2,4){\funkf}{N2}
\psZero[xShift=-0.45,yShift=0.15,postString=3](4,6){\funkf}{N3}
\psZero[xShift=-0.45,yShift=0.15,postString=4](6,7){\funkf}{N4}
\psZero[xShift=-0.45,yShift=0.15,postString=5](9,11){\funkf}{N5}
- \psZero[xShift=-1.15,yShift=0,PointName=M,
- postString={m=1}](0.5,2){Derive(1,\funkf)-1+\funkf}[\funkf]{M}%
+ \psZero[xShift=-1.15,yShift=0,PointName=M,decimals=0,linestyle=none,fillcolor=SandBraun,
+ opacity=0.8,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
+ \scriptsize Steigung ist hier\phantom{i}
\psPrintValueNew[PSfont=Palatino-Roman,decimals=0,round,fontscale=7]{nMx,{Derive(1,\funkf)}}}
\psdot[linecolor=green,strokeopacity=0.8](*{nMx} {\funkf})
-\uput[90](*{nMx} {\funkf}){$m=$
+\uput[90](*{nMx} {\funkf}){$m=$
\psPrintValueNew[PSfont=Palatino-Roman,decimals=0,round,fontscale=8]{nMx,{Derive(1,\funkf)}}}
\end{pspicture}
+\end{lstlisting}
+%\end{LTXexample}
+
+{\psset{yunit=0.8,comma,decimals=2,algebraic=true,markZeros=true,plotpoints=500,saveNodeCoors,NodeCoorPrefix=n}
+%----------------- FUNKTIONSDEFINITIONEN in "algebraic" -----------------
+\def\funkf{0.75*x^4-3*x^2-2}
+\def\funkg{0.25*x+1}
+
+\begin{pspicture}(-6.5,-5.5)(6.5,8.5)
+%------ Gitter im Hintergrund (CLIPPED) -----------------
+\begin{psclip}%
+{\psframe[linestyle=none](-6.4,-5.4)(6.4,7.4)}
+\psgrid[subgriddiv=2,gridlabels=0,gridwidth=0.3pt,gridcolor=black!50,subgridwidth=0.2pt,subgridcolor=black!30](-6.5,-7.5)(6.5,8.5)
+\end{psclip}
+%--------- Achsen ------------
+\psaxes[xDecimals=0, yDecimals=0,labelFontSize=\scriptstyle,arrowscale=1.3,arrowinset=0.05,arrowlength=1.9, Dy=1,dy=1,dx=1,Dx=1,subticks=0,comma,tickwidth=0.5pt]{->}(0,0)(-6.5,-5.5)(6.5,7.5)[$x$,-90][$y$,180]% Achsen
+%----- Funktionsgraphen plotten (Clippen, damit sie nicht aus dem Gitter ragen) -----------------
+\begin{psclip}%
+{\psframe[linestyle=none](-6.5,-5.4)(6.5,7.4)}
+\psplot[linewidth=1pt,linecolor=Gray]{-6.5}{6.5}{\funkf}%
+\psplot[linewidth=1pt,linecolor=BrickRed]{-6.5}{6.5}{\funkg}%
+\end{psclip}
+%----------------- SPEZIELLE PUNKTE -----------------
+{\psset{fontscale=8,PrintCoord=true,linestyle=none,opacity=0.8,Framed=true,fillcolor=cyan!10}
+%----------------- NULLSTELLEN -----------------
+\psZero[xShift=-0.9,yShift=0.15,PointName={N},postString={1},ydecimals=0](-3,-2){\funkf}[0]{N1}
+\psZero[xShift=-0.9,yShift=0.15,PointName={N},postString={2},ydecimals=0](2,3){\funkf}[0]{N2}
+%----------------- EXTREMWERTE -----------------
+\psZero[xShift=-0.9,yShift=-0.25,PointName={T},postString={1}](-2,0){Derive(1,\funkf)+\funkf}[\funkf]{T1}
+\psZero[xShift=-0.9,yShift=0.25,PointName={H},postString={}](-1,1){Derive(1,\funkf)+\funkf}[\funkf]{H}
+\psZero[xShift=-0.9,yShift=-0.25,PointName={T},postString={2}](0,2.5){Derive(1,\funkf)+\funkf}[\funkf]{T2}
+%----------------- WENDEPUNKTE -----------------
+\psZero[xShift=-1.2,yShift=-0.25,PointName={W},postString={1}](-1.5,-0.5){Derive(2,\funkf)+\funkf}[\funkf]{W1}
+\psZero[xShift=-0.6,yShift=-0.25,PointName={W},postString={2}](0.5,1.5){Derive(2,\funkf)+\funkf}[\funkf]{W2}
+\psZero[onlyNode=true,markZeros=false](-1.5,-0.5){Derive(2,\funkf)+Derive(1,\funkf)}[Derive(1,\funkf)]{mW1}%Steigung Wendepunkt 1 ist "nmW1y"
+}
+%----------------- GLEICHUNG WENDETANGENTE -----------------
+\def\funkWende{nmW1y*(x-nW1x)+nW1y}
+%----------------- GLEICHUNG WENDENORMALE -----------------
+\def\funkNormal{-1/nmW1y*(x-nW1x)+nW1y} %m_n=-1/m_t
+%----------------- Tangente und Normale in W1 plotten ------------------
+\psplot[linewidth=1pt,linecolor=blue]{-1.3}{2.55}{\funkWende}%
+\psplot[linewidth=1pt,linecolor=Green]{-6.5}{5}{\funkNormal}%
+%----------------- Punkte und Werte NICHT anzeigen
+{\psset{onlyNode=true,markZeros=false}
+%----------------- Schnittpunkt: Wendetangente in W1 mit f -------------
+\psZero(0,4){\funkWende}[\funkf]{WS1}
+%----------------- Schnittpunkte: Wendenormale in W1 mit f -------------
+\psZero(-4,0){\funkNormal}[\funkf]{WN1}
+\psZero(0,1.5){\funkNormal}[\funkf]{WN2}
+\psZero(1.5,3){\funkNormal}[\funkf]{WN3}
+%----------------- NULLSTELLE von g -----------------
+\psZero(-3,3){\funkg}[0]{Ng1}
+%----------------- SCHNITTPUNKTE f und g -----------------
+\psZero(0,3){\funkg}[\funkf]{S1}
+\psZero(-3,0){\funkg}[\funkf]{S2}
+}
+%----------------- FLÄCHE mit x-ACHSE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=gray,linestyle=none]{%
+\psplot{nN1x}{nW1x}{\funkf}
+\lineto(!nW1x 0)
+\closepath
+}
+%----------------- FLÄCHE ZWISCHEN WENDETANGENTE UND KURVE f -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=blue,linestyle=none]{%
+\psplot{nW1x}{nWS1x}{\funkWende}
+\psplot{nWS1x}{nW1x}{\funkf}
+\closepath
+}
+%----------------- FLÄCHE ZWISCHEN WENDENORMALE UND KURVE f (Zwei FlÄchenstücke!!!) ----
+%----------------- linke FLÄCHE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=green,linestyle=none]{%
+\psplot{nWN1x}{nW1x}{\funkNormal}
+\psplot{nW1x}{nWN1x}{\funkf}
+\closepath
+}
+%----------------- rechte FLÄCHE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=green,linestyle=none]{%
+\psplot{nWN2x}{nWN3x}{\funkNormal}
+\psplot{nWN3x}{nWN2x}{\funkf}
+\closepath
+}
+%----------------- FLÄCHE zwischen den KURVEN f und g und beiden KOORDINATEN-ACHSEN -----
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=yellow,linestyle=none]{%
+\psplot{0}{nS1x}{\funkg}
+\psplot{nS1x}{nN2x}{\funkf}
+\lineto(0,0)
+\closepath
+}
+% SPIELEREI: FLÄCHE mit f und PARALLELEN ZUR x-ACHSE
+% Punkte und Werte NICHT anzeigen
+{\psset{onlyNode=true,markZeros=false}
+\psZero(-3,-2){\funkf}[2]{M1}
+\psZero(-3,-2){\funkf}[4]{M2}
+}
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=magenta,linestyle=none]{%
+\psplot{nM1x}{nM2x}{\funkf}
+\lineto(0,4)
+\lineto(0,2)
+\closepath
+}
+\end{pspicture}}
+
+\begin{lstlisting}
+\psset{yunit=0.8,comma,decimals=2,algebraic=true,markZeros=true,plotpoints=500,saveNodeCoors,NodeCoorPrefix=n}
+%----------------- FUNKTIONSDEFINITIONEN in "algebraic" -----------------
+\def\funkf{0.75*x^4-3*x^2-2}
+\def\funkg{0.25*x+1}
+
+\begin{pspicture}(-6.5,-5.5)(6.5,8.5)
+%------ Gitter im Hintergrund (CLIPPED) -----------------
+\begin{psclip}%
+{\psframe[linestyle=none](-6.4,-5.4)(6.4,7.4)}
+\psgrid[subgriddiv=2,gridlabels=0,gridwidth=0.3pt,gridcolor=black!50,subgridwidth=0.2pt,subgridcolor=black!30](-6.5,-7.5)(6.5,8.5)
+\end{psclip}
+%--------- Achsen ------------
+\psaxes[xDecimals=0, yDecimals=0,labelFontSize=\scriptstyle,arrowscale=1.3,arrowinset=0.05,arrowlength=1.9, Dy=1,dy=1,dx=1,Dx=1,subticks=0,comma,tickwidth=0.5pt]{->}(0,0)(-6.5,-5.5)(6.5,7.5)[$x$,-90][$y$,180]% Achsen
+%----- Funktionsgraphen plotten (Clippen, damit sie nicht aus dem Gitter ragen) -----------------
+\begin{psclip}%
+{\psframe[linestyle=none](-6.5,-5.4)(6.5,7.4)}
+\psplot[linewidth=1pt,linecolor=Gray]{-6.5}{6.5}{\funkf}%
+\psplot[linewidth=1pt,linecolor=BrickRed]{-6.5}{6.5}{\funkg}%
+\end{psclip}
+%----------------- SPEZIELLE PUNKTE -----------------
+{\psset{fontscale=8,PrintCoord=true,linestyle=none,opacity=0.8,Framed=true,fillcolor=cyan!10}
+%----------------- NULLSTELLEN -----------------
+\psZero[xShift=-0.9,yShift=0.15,PointName={N},postString={1},ydecimals=0](-3,-2){\funkf}[0]{N1}
+\psZero[xShift=-0.9,yShift=0.15,PointName={N},postString={2},ydecimals=0](2,3){\funkf}[0]{N2}
+%----------------- EXTREMWERTE -----------------
+\psZero[xShift=-0.9,yShift=-0.25,PointName={T},postString={1}](-2,0){Derive(1,\funkf)+\funkf}[\funkf]{T1}
+\psZero[xShift=-0.9,yShift=0.25,PointName={H},postString={}](-1,1){Derive(1,\funkf)+\funkf}[\funkf]{H}
+\psZero[xShift=-0.9,yShift=-0.25,PointName={T},postString={2}](0,2.5){Derive(1,\funkf)+\funkf}[\funkf]{T2}
+%----------------- WENDEPUNKTE -----------------
+\psZero[xShift=-1.2,yShift=-0.25,PointName={W},postString={1}](-1.5,-0.5){Derive(2,\funkf)+\funkf}[\funkf]{W1}
+\psZero[xShift=-0.6,yShift=-0.25,PointName={W},postString={2}](0.5,1.5){Derive(2,\funkf)+\funkf}[\funkf]{W2}
+\psZero[onlyNode=true,markZeros=false](-1.5,-0.5){Derive(2,\funkf)+Derive(1,\funkf)}[Derive(1,\funkf)]{mW1}%Steigung Wendepunkt 1 ist "nmW1y"
+}
+%----------------- GLEICHUNG WENDETANGENTE -----------------
+\def\funkWende{nmW1y*(x-nW1x)+nW1y}
+%----------------- GLEICHUNG WENDETANGENTE -----------------
+\def\funkNormal{-1/nmW1y*(x-nW1x)+nW1y} %m_n=-1/m_t
+%----------------- Tangente und Normale in W1 plotten ------------------
+\psplot[linewidth=1pt,linecolor=blue]{-1.3}{2.55}{\funkWende}%
+\psplot[linewidth=1pt,linecolor=Green]{-6.5}{5}{\funkNormal}%
+%----------------- Punkte und Werte NICHT anzeigen
+{\psset{onlyNode=true,markZeros=false}
+%----------------- Schnittpunkt: Wendetangente in W1 mit f -------------
+\psZero(0,4){\funkWende}[\funkf]{WS1}
+%----------------- Schnittpunkte: Wendenormale in W1 mit f -------------
+\psZero(-4,0){\funkNormal}[\funkf]{WN1}
+\psZero(0,1.5){\funkNormal}[\funkf]{WN2}
+\psZero(1.5,3){\funkNormal}[\funkf]{WN3}
+%----------------- NULLSTELLE von g -----------------
+\psZero(-3,3){\funkg}[0]{Ng1}
+%----------------- SCHNITTPUNKTE f und g -----------------
+\psZero(0,3){\funkg}[\funkf]{S1}
+\psZero(-3,0){\funkg}[\funkf]{S2}
+}
+%----------------- FLÄCHE mit x-ACHSE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=gray,linestyle=none]{%
+\psplot{nN1x}{nW1x}{\funkf}
+\lineto(!nW1x 0)
+\closepath
+}
+%----------------- FLÄCHE ZWISCHEN WENDETANGENTE UND KURVE f -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=blue,linestyle=none]{%
+\psplot{nW1x}{nWS1x}{\funkWende}
+\psplot{nWS1x}{nW1x}{\funkf}
+\closepath
+}
+%----------------- FLÄCHE ZWISCHEN WENDENORMALE UND KURVE f (Zwei FlÄchenstücke!!!) ----
+%----------------- linke FLÄCHE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=green,linestyle=none]{%
+\psplot{nWN1x}{nW1x}{\funkNormal}
+\psplot{nW1x}{nWN1x}{\funkf}
+\closepath
+}
+%----------------- rechte FLÄCHE -----------------
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=green,linestyle=none]{%
+\psplot{nWN2x}{nWN3x}{\funkNormal}
+\psplot{nWN3x}{nWN2x}{\funkf}
+\closepath
+}
+%----------------- FLÄCHE zwischen den KURVEN f und g und beiden KOORDINATEN-ACHSEN -----
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=yellow,linestyle=none]{%
+ \psplot{0}{nS1x}{\funkg}
+ \psplot{nS1x}{nN2x}{\funkf}
+ \lineto(0,0)
+ \closepath}
+% SPIELEREI: FLÄCHE mit f und PARALLELEN ZUR x-ACHSE
+% Punkte und Werte NICHT anzeigen
+{\psset{onlyNode=true,markZeros=false}
+\psZero(-3,-2){\funkf}[2]{M1}
+\psZero(-3,-2){\funkf}[4]{M2}}
+\pscustom[fillstyle=solid,opacity=0.3,fillcolor=magenta,linestyle=none]{%
+ \psplot{nM1x}{nM2x}{\funkf}
+ \lineto(0,4)
+ \lineto(0,2)
+ \closepath}
+\end{pspicture}
+\end{lstlisting}
+
%\begin{LTXexample}[pos=t]
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 3c6d6b4200d..87f2da085d7 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -31,8 +31,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
%
-\def\fileversion{0.84}
-\def\filedate{2017/03/11}
+\def\fileversion{0.85}
+\def\filedate{2017/04/18}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -434,7 +434,7 @@
\psk@Scin {
value 0 ne { value log floor cvi /expon ED }{ /expon 0 def } ifelse
value 10 expon exp div
- \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul
+ \psk@decimals -1 gt { 10 \psk@decimals exp dup 3 1 roll mul
\ifPst@round round \else cvi \fi exch div } if
\psk@decimals 0 eq { cvi } if /numb ED
expon \psk@valuewidth string cvs /expon exch def
@@ -683,7 +683,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
{ kOld 0 eq
{ kOld \psFunc@leftEnd sub scx 0 moveto % starting point
\ifPst@LineEnding
- kOld \psFunc@radiusout\pst@number\psxunit div sub scx 0 L stroke
+ kOld \psFunc@radiusout\pst@number\psxunit div sub scx 0 L stroke
kOld scx 0 newpath \psFunc@radiusout 0 360 arc kOld scx 0 \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill \else
kOld scx 0 L stroke \fi }
{ } ifelse } ifelse
@@ -707,7 +707,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
ifelse % recursive definition
\ifPst@markZeros kOld scx F scy L k dx add scx F scy L k dx add scx 0 L kOld 1 add scx 0 L
\else
- kOld scx F scy newpath \psFunc@radiusout 0 360 arc kOld scx F scy \psFunc@radiusinL 360 0 arcn closepath \pst@usecolor\psk@LineEndColorL fill
+ kOld scx F scy newpath \psFunc@radiusout 0 360 arc kOld scx F scy \psFunc@radiusinL 360 0 arcn closepath \pst@usecolor\psk@LineEndColorL fill
kOld \ifPst@LineEnding\psFunc@radiusout\pst@number\psxunit div add \fi
scx F scy moveto
k 1 add
@@ -1526,16 +1526,18 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
\endgroup
\ignorespaces}
%
+\define@boolkey[psset]{pst-func}[Pst@]{xory}[true]{}
+\define@boolkey[psset]{pst-func}[Pst@]{approx}[true]{}
+\define@boolkey[psset]{pst-func}[Pst@]{Framed}[true]{}
\define@boolkey[psset]{pst-func}[Pst@]{Newton}[true]{}
\define@boolkey[psset]{pst-func}[Pst@]{PrintCoord}[true]{}
\define@boolkey[psset]{pst-func}[Pst@]{onlyNode}[true]{}
\define@boolkey[psset]{pst-func}[Pst@]{onlyYVal}[true]{}
\define@boolkey[psset]{pst-func}[Pst@]{originV}[true]{}
-\define@key[psset]{pst-func}{PointName}[]{\def\psk@func@PointName{#1}}
+\define@key[psset]{pst-func}{PointName}[I]{\def\psk@func@PointName{#1}}
\define@key[psset]{pst-func}{ydecimals}[2]{\pst@getint{#1}\psk@ydecimals }
\psset[pst-func]{originV=false,onlyNode=false,ydecimals=2,
- PrintCoord=false,onlyYVal=false,Newton=false,PointName=I,
-}
+ PrintCoord=false,onlyYVal=false,Newton=false,PointName=I,Framed=false,xory=false,approx=true}
%
%--------------------------------------------------------------------
%------------- calculate the value of an intersectionpoint -----------
@@ -1546,7 +1548,7 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
% (#1,#2) Intervall f\"{u}r die Nullstelle, bzw #1 Startwert f\"{u}r Newton, #3 1. Funktion, #4 2. Funktion, #5 Knotenname
\begingroup
\pst@killglue
-% \addbefore@par{fontscale=40,PSfont=Times-Roman}%
+ \addbefore@par{framesep=1pt}%fontscale=40,PSfont=Times-Roman}%
\use@par
\pst@Verb{
/FunctionA
@@ -1583,24 +1585,25 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
F_1 F_M mul 0 ge {/Xinf xM def} {/Xsup xM def} ifelse % F_1 * F_M > 0 (F_1 und F_M haben gleiches VZ) => neuer linker x-Wert = xM2
Xinf Xsup sub abs 1e-6 le {exit} if } loop % Die Schleife endet, wenn die Differenz von linkem und rechtem Wert < 10^-6
\fi
- /x xM def FunctionA /yM exch def % x wird Mittelwert und an dieser Stelle die Funktion berechnet und als yM2 definiert
+ /x xM def FunctionA /yM exch def % x wird Mittelwert und an dieser Stelle die Funktion berechnet und als yM definiert
}%
- \pnode(! xM yM){#5}%
- \addto@pscode{
- \ifPst@onlyNode \else
+\pnode(! xM yM){#5}%
+\addto@pscode{%
+\ifPst@onlyNode\else
/dec \psk@decimals\space def % Anzahl der Dezimahlen f\"{u}r x
/ydec \psk@ydecimals\space def % Anzahl der Dezimalen f\"{u}r y
/symb { /Symbol findfont \psk@fontscale\space scalefont setfont } bind def % Symbolschrift f\"{u}r Klammer und senkrechten Strich
/schrift { \psk@PSfont findfont \psk@fontscale scalefont setfont } bind def % Schrift f\"{u}r die Ergebnisse
- /TiefSchrift { /Symbol findfont \psk@fontscale 1.6 div scalefont setfont } bind def % Schrift f\"{u}r tiefergestellte Buchstaben
+ /TiefSchrift { /Symbol findfont \psk@fontscale 1.8 div scalefont setfont } bind def % Schrift f\"{u}r tiefergestellte Buchstaben
/spdx \psk@fontscale 4 div def % Abstand, der mit der Schriftg\"{o}{\ss}e skaliert ist
/spdy \psk@fontscale 15 div def % Abstand, der mit der Schriftg\"{o}{\ss}e skaliert ist
- /Wert { 10 dec exp mul round 10 dec exp div dec 0 eq {cvi 15 string cvs} {15 string cvs } ifelse % x-Wert runden und als string ablegen
+ /Wert { dec -1 le { /dec 15 def } if 10 dec exp mul round 10 dec exp div dec 0 eq { cvi 15 string cvs } { 15 string cvs } ifelse % x-Wert runden und als string ablegen
\ifPst@comma dot2comma \fi show } def % gegebenenfalls Komma statt Punkt und Ergebnis anzeigen
- /yWert { 10 ydec exp mul round 10 ydec exp div ydec 0 eq {cvi 15 string cvs} {15 string cvs } ifelse % y-Wert runden und als string ablegen
+ /yWert { 10 ydec exp mul round 10 ydec exp div ydec 0 eq { cvi 15 string cvs } { 15 string cvs } ifelse % y-Wert runden und als string ablegen
\ifPst@comma dot2comma \fi show } def % gegebenenfalls Komma statt Punkt und Ergebnis anzeigen
/FunctionA \ifPst@algebraic (#3) tx@AlgToPs begin AlgToPs end cvx \else {#3} \fi def
/FunctionB \ifPst@algebraic (#4) tx@AlgToPs begin AlgToPs end cvx \else {#4} \fi def
+ /frs \pst@number\psframesep def
\ifPst@Newton
/eps 1e-6 def
/x0 #1 def
@@ -1634,17 +1637,89 @@ radiusout=2,radiusinL=0,radiusinR=1.5,LineEnding=true,leftEnd=1,rightEnd=2,VLine
yM \psk@yShift\space add \pst@number\psyunit mul
\fi
\pst@usecolor\pslinecolor
- \ifPst@PrintCoord
- moveto schrift (\psk@func@PointName) show
+ \ifPst@PrintCoord
+/xytext { moveto schrift (\psk@func@PointName) show
0 spdy 2 mul neg rmoveto TiefSchrift (\psk@postString) show
0 spdy 3 mul rmoveto symb (\string\050) show
0 spdy neg rmoveto schrift xM Wert
spdx 3 div spdy rmoveto symb (\string\174) show
- spdx 3 div spdy neg rmoveto yM yWert 0 spdy rmoveto symb (\string\051) show
+ spdx 3 div spdy neg rmoveto schrift yM yWert 0 spdy rmoveto symb (\string\051) show } bind def
+ xytext
+ 0 spdy neg rmoveto
+% ------------------------------------------------------------------------------ TS 03.2017
+ \ifPst@Framed
+ frs \psk@fontscale 0.15 mul frs add neg rmoveto
+ 0 \psk@fontscale 0.9 mul frs 2 mul add rlineto
+ \ifPst@originV
+ frs neg \psk@fontscale 0.75 mul frs add L
+ \else
+ xM \psk@xShift\space add \pst@number\psxunit mul frs sub
+ yM \psk@yShift\space add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L
+ \fi
+ 0 \psk@fontscale 0.9 mul frs 2 mul add neg rlineto closepath
+ gsave
+ \pst@usecolor\psfillcolor \tx@setTransparency fill
+ grestore
+ \ifx\pslinestyle\@none\else
+ \pst@number\pslinewidth SLW \pst@usecolor\pslinecolor \tx@setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
+ \fi
+ \ifPst@originV 0 0 \else
+ xM \psk@xShift\space add \pst@number\psxunit mul
+ yM \psk@yShift\space add \pst@number\psyunit mul
+ \fi
+ xytext
+ 0 spdy neg rmoveto
+ \fi
+%------------------------------ Wenn nicht die Form P(a|b) sondern x = a oder y = b oder nur a oder nur b -------------------
\else
- \ifPst@onlyYVal moveto schrift yM yWert \else moveto schrift xM Wert \fi
- \fi\fi}%
- \ifPst@markZeros \psdot(#5)\fi
+ \ifPst@originV 0 0 \else
+ xM \psk@xShift\space add \pst@number\psxunit mul
+ yM \psk@yShift\space add \pst@number\psyunit mul
+ \fi
+ /xorytext { moveto schrift
+ \ifPst@onlyYVal% nur der y-Wert
+ \ifPst@xory% in Form von y=b
+ (\psk@func@PointName) show
+ spdx 5 div neg spdy 2.2 mul neg rmoveto TiefSchrift (\psk@postString) show
+ spdx 1.5 div spdy 2 mul rmoveto symb(\ifPst@approx \string \273 \else \string = \fi) show
+ spdx 1.5 div neg 0 rmoveto schrift yM yWert
+ \else schrift yM yWert
+ \fi
+ \else
+ \ifPst@xory% in Form x = a
+ (\psk@func@PointName) show
+ spdx 7 div neg spdy 2.2 mul neg rmoveto TiefSchrift (\psk@postString) show
+ spdx 1.5 div spdy 2 mul rmoveto symb (\ifPst@approx \string \273 \else \string = \fi) show
+ spdx 1.5 div neg 0 rmoveto schrift xM Wert
+ \else schrift xM Wert
+ \fi
+ \fi } bind def
+ xorytext
+ \ifPst@Framed%------------------------------ Rahmenbeginn ------------------------------
+ frs \psk@fontscale 0.14 mul frs add neg rmoveto
+ 0 \psk@fontscale 0.9 mul frs 2 mul add rlineto
+ \ifPst@originV
+ frs neg \psk@fontscale 0.75 mul frs add L
+ \else
+ xM \psk@xShift\space add \pst@number\psxunit mul frs sub
+ yM \psk@yShift\space add \pst@number\psyunit mul \psk@fontscale 0.75 mul add frs add L
+ \fi
+ 0 \psk@fontscale 0.9 mul frs 2 mul add neg rlineto closepath
+ gsave
+ \pst@usecolor\psfillcolor \tx@setTransparency fill
+ grestore
+ \ifx\pslinestyle\@none\else
+ \pst@number\pslinewidth SLW \pst@usecolor\pslinecolor \tx@setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
+ \fi
+ \ifPst@originV 0 0 \else
+ xM \psk@xShift\space add \pst@number\psxunit mul
+ yM \psk@yShift\space add \pst@number\psyunit mul
+ \fi
+ xorytext
+ \fi
+ \fi
+\fi}%
+\ifPst@markZeros\psdot(#5)\fi
\endgroup\use@pscode\ignorespaces
}%
%