texlive[43912] Master/texmf-dist: pst-func (18apr17)

commits+karl at tug.org commits+karl at tug.org
Tue Apr 18 23:31:01 CEST 2017


Revision: 43912
          http://tug.org/svn/texlive?view=revision&revision=43912
Author:   karl
Date:     2017-04-18 23:31:01 +0200 (Tue, 18 Apr 2017)
Log Message:
-----------
pst-func (18apr17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2017-04-18 21:30:48 UTC (rev 43911)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2017-04-18 21:31:01 UTC (rev 43912)
@@ -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 at PontName->\psk at func@PointName (same name in pst-eucl)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2017-04-18 21:30:48 UTC (rev 43911)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2017-04-18 21:31:01 UTC (rev 43912)
@@ -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 @@
     Leon Free,
     Attila Gati, 
     Horst Gierhardt,  
+    Jürgen Gilg,
     Christophe Jorssen,
     Lars Kotthoff, 
     Buddy Ledger,
@@ -600,7 +611,7 @@
 \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,29 +619,70 @@
 
 \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)
 \psStep[fillstyle=solid,fillcolor=BeigeTS,opacity=0.7,linewidth=0.3pt,
@@ -641,25 +693,227 @@
 \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]
 \begin{lstlisting}
 \definecolor{BeigeTS}{rgb}{0.98,0.95,0.87}

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2017-04-18 21:30:48 UTC (rev 43911)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2017-04-18 21:31:01 UTC (rev 43912)
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at 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 at Scin {
        value 0 ne { value log floor cvi /expon ED }{ /expon 0 def } ifelse
        value 10 expon exp div
-       \psk at decimals -1 gt { 10  \psk at decimals exp dup 3 1 roll mul
+       \psk at decimals -1 gt { 10 \psk at decimals exp dup 3 1 roll mul
          \ifPst at round round \else cvi \fi  exch div } if
        \psk at decimals 0 eq { cvi } if /numb ED
        expon \psk at valuewidth string cvs /expon exch def
@@ -683,7 +683,7 @@
     { kOld 0 eq
     { kOld \psFunc at leftEnd sub scx 0 moveto   % starting point
     \ifPst at LineEnding
-    kOld \psFunc at radiusout\pst at number\psxunit div sub scx 0 L stroke 
+    kOld \psFunc at radiusout\pst at number\psxunit div sub scx 0 L stroke
      kOld scx 0 newpath \psFunc at radiusout 0 360 arc kOld scx 0 \psFunc at radiusinR 360 0 arcn closepath \pst at usecolor\psk at LineEndColorR fill \else
     kOld scx 0 L stroke \fi }
     { } ifelse } ifelse
@@ -707,7 +707,7 @@
       ifelse % recursive definition
       \ifPst at 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 at radiusout 0 360 arc kOld scx F scy \psFunc at radiusinL 360 0 arcn closepath \pst at usecolor\psk at LineEndColorL fill 
+       kOld scx F scy newpath \psFunc at radiusout 0 360 arc kOld scx F scy \psFunc at radiusinL 360 0 arcn closepath \pst at usecolor\psk at LineEndColorL fill
       kOld \ifPst at LineEnding\psFunc at radiusout\pst at number\psxunit div add \fi
       scx F scy moveto
       k 1 add
@@ -1526,16 +1526,18 @@
   \endgroup
   \ignorespaces}
 %
+\define at boolkey[psset]{pst-func}[Pst@]{xory}[true]{}
+\define at boolkey[psset]{pst-func}[Pst@]{approx}[true]{}
+\define at boolkey[psset]{pst-func}[Pst@]{Framed}[true]{}
 \define at boolkey[psset]{pst-func}[Pst@]{Newton}[true]{}
 \define at boolkey[psset]{pst-func}[Pst@]{PrintCoord}[true]{}
 \define at boolkey[psset]{pst-func}[Pst@]{onlyNode}[true]{}
 \define at boolkey[psset]{pst-func}[Pst@]{onlyYVal}[true]{}
 \define at boolkey[psset]{pst-func}[Pst@]{originV}[true]{}
-\define at key[psset]{pst-func}{PointName}[]{\def\psk at func@PointName{#1}}
+\define at key[psset]{pst-func}{PointName}[I]{\def\psk at func@PointName{#1}}
 \define at key[psset]{pst-func}{ydecimals}[2]{\pst at getint{#1}\psk at 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 @@
 % (#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 at killglue
-%  \addbefore at par{fontscale=40,PSfont=Times-Roman}%
+  \addbefore at par{framesep=1pt}%fontscale=40,PSfont=Times-Roman}%
  \use at par
  \pst at Verb{
    /FunctionA
@@ -1583,24 +1585,25 @@
   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 at pscode{
-  \ifPst at onlyNode \else
+\pnode(! xM yM){#5}%
+\addto at pscode{%
+\ifPst at onlyNode\else
   /dec \psk at decimals\space def   % Anzahl der Dezimahlen f\"{u}r x
   /ydec \psk at ydecimals\space def % Anzahl der Dezimalen f\"{u}r y
   /symb { /Symbol findfont \psk at fontscale\space scalefont setfont } bind def             % Symbolschrift f\"{u}r Klammer und senkrechten Strich
   /schrift { \psk at PSfont findfont \psk at fontscale scalefont setfont } bind def            % Schrift f\"{u}r die Ergebnisse
-  /TiefSchrift { /Symbol findfont \psk at fontscale 1.6 div scalefont setfont } bind def    % Schrift f\"{u}r tiefergestellte Buchstaben
+  /TiefSchrift { /Symbol findfont \psk at fontscale 1.8 div scalefont setfont } bind def    % Schrift f\"{u}r tiefergestellte Buchstaben
   /spdx \psk at fontscale 4 div def % Abstand, der mit der Schriftg\"{o}{\ss}e skaliert ist
   /spdy \psk at 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 at 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 at comma dot2comma \fi show } def % gegebenenfalls Komma statt Punkt und Ergebnis anzeigen
   /FunctionA \ifPst at algebraic (#3) tx at AlgToPs begin AlgToPs end cvx \else {#3} \fi def
   /FunctionB \ifPst at algebraic (#4) tx at AlgToPs begin AlgToPs end cvx \else {#4} \fi def
+  /frs \pst at number\psframesep def
  \ifPst at Newton
   /eps 1e-6 def
   /x0 #1 def
@@ -1634,17 +1637,89 @@
     yM \psk at yShift\space add \pst at number\psyunit mul
   \fi
   \pst at usecolor\pslinecolor
-  \ifPst at PrintCoord
-    moveto schrift (\psk at func@PointName) show
+ \ifPst at PrintCoord
+/xytext { moveto schrift (\psk at func@PointName) show
     0 spdy 2 mul neg rmoveto TiefSchrift (\psk at 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 at Framed
+       frs \psk at fontscale 0.15 mul frs add neg rmoveto
+       0 \psk at fontscale 0.9 mul frs 2 mul add rlineto
+       \ifPst at originV
+          frs neg \psk at fontscale 0.75 mul frs add L
+         \else
+          xM \psk at xShift\space add \pst at number\psxunit mul frs sub
+          yM \psk at yShift\space add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
+       \fi
+        0 \psk at fontscale 0.9 mul frs 2 mul add neg rlineto closepath
+         gsave
+          \pst at usecolor\psfillcolor \tx at setTransparency fill
+         grestore
+            \ifx\pslinestyle\@none\else
+            \pst at number\pslinewidth SLW \pst at usecolor\pslinecolor \tx at setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
+           \fi
+       \ifPst at originV 0 0 \else
+          xM \psk at xShift\space add \pst at number\psxunit mul
+          yM \psk at yShift\space add \pst at 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 at onlyYVal moveto schrift yM yWert \else  moveto schrift xM Wert \fi
-  \fi\fi}%
- \ifPst at markZeros \psdot(#5)\fi
+    \ifPst at originV 0 0 \else
+       xM \psk at xShift\space add \pst at number\psxunit mul
+       yM \psk at yShift\space add \pst at number\psyunit mul
+    \fi
+      /xorytext { moveto schrift
+  \ifPst at onlyYVal%  nur der y-Wert
+        \ifPst at xory%   in Form von y=b
+          (\psk at func@PointName) show
+          spdx 5 div neg spdy 2.2 mul neg rmoveto TiefSchrift (\psk at postString) show
+          spdx 1.5 div spdy 2 mul rmoveto symb(\ifPst at approx \string \273 \else \string = \fi) show
+          spdx 1.5 div neg 0 rmoveto schrift yM yWert
+        \else schrift yM yWert
+       \fi
+     \else
+       \ifPst at xory%     in Form x = a
+          (\psk at func@PointName) show
+          spdx 7 div neg spdy 2.2 mul neg rmoveto TiefSchrift (\psk at postString) show
+          spdx 1.5 div spdy 2 mul rmoveto symb (\ifPst at 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 at Framed%------------------------------  Rahmenbeginn ------------------------------
+       frs \psk at fontscale 0.14 mul frs add neg rmoveto
+       0 \psk at fontscale 0.9 mul frs 2 mul add rlineto
+          \ifPst at originV
+             frs neg \psk at fontscale 0.75 mul frs add L
+           \else
+             xM \psk at xShift\space add \pst at number\psxunit mul frs sub
+             yM \psk at yShift\space add \pst at number\psyunit mul \psk at fontscale 0.75 mul add frs add L
+          \fi
+       0 \psk at fontscale 0.9 mul frs 2 mul add neg rlineto closepath
+        gsave
+         \pst at usecolor\psfillcolor \tx at setTransparency fill
+        grestore
+         \ifx\pslinestyle\@none\else
+           \pst at number\pslinewidth SLW \pst at usecolor\pslinecolor \tx at setStrokeTransparency \@nameuse{psls@\pslinestyle} stroke
+         \fi
+       \ifPst at originV 0 0 \else
+          xM \psk at xShift\space add \pst at number\psxunit mul
+          yM \psk at yShift\space add \pst at number\psyunit mul
+       \fi
+     xorytext
+   \fi
+  \fi
+\fi}%
+\ifPst at markZeros\psdot(#5)\fi
 \endgroup\use at pscode\ignorespaces
 }%
 %



More information about the tex-live-commits mailing list