summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/README1
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdfbin2177985 -> 2207705 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex129
-rw-r--r--Master/texmf-dist/tex/generic/pst-func/pst-func.tex26
5 files changed, 154 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes
index 15482a342be..d6e6663678e 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.49 2007-07-23 - add psVolume, rotating a function around the x-axis
0.48 2007-03-17 - add another distribution function: psPoisson
0.47 2007-02-01 - add support of arrows for psPolynomial
0.46 2006-09-06 - using the bool key from xkeyval
diff --git a/Master/texmf-dist/doc/generic/pst-func/README b/Master/texmf-dist/doc/generic/pst-func/README
index 0989cb41c24..eb7f599e47c 100644
--- a/Master/texmf-dist/doc/generic/pst-func/README
+++ b/Master/texmf-dist/doc/generic/pst-func/README
@@ -14,6 +14,7 @@ pst-func: plotting special mathematical functions:
-- psBinomialN
-- psLame (Lam\`e\ Curve -- a superellipse)
-- psplotImp (plotting implicit defined functions)
+-- psVolume (rotating f(x) around the x-axis)
-- psPrintValue
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 eae559b4ce2..e4a9995332f 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 92255041f8e..a1be51a8928 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
@@ -1,7 +1,8 @@
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
-\usepackage{pamathx}
+%\usepackage{pamathx}
+\usepackage{mathpazo}
\usepackage{url}
\usepackage{amsmath}
\usepackage{tabularx}
@@ -893,6 +894,131 @@ for polar plots are also possible (see next example).
\end{pspicture*}
\end{LTXexample}
+
+
+\clearpage
+\section{\CMD{psVolume} -- Rotating functions around the x-axis}
+
+This macro shows the behaviour of a rotated function around the x-axis.
+
+\begin{verbatim}
+\psVolume[<options>](xMin,xMax){<steps>}{<function f(x)>}
+\end{verbatim}
+
+$f(x)$ has to be described as usual for the macro psplot.
+
+\makebox[\linewidth]{%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=magenta!30](0,4){1}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=red!40](0,4){2}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=blue!40](0,4){4}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+}
+
+\makebox[\linewidth]{%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=green!40](0,4){8}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=yellow!40](0,4){16}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=cyan!40](0,4){32}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+}
+
+\begin{lstlisting}
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=magenta!30](0,4){1}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=red!40](0,4){2}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=blue!40](0,4){4}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=green!40](0,4){8}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=yellow!40](0,4){16}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-2)(5,2.5)
+\psaxes{->}(0,0)(0,-2)(3,2.5)
+\psVolume[fillstyle=solid,fillcolor=cyan!40](0,4){32}{x sqrt}
+\psline{->}(4,0)(5,0)
+\end{pspicture}
+\end{lstlisting}
+
+
+\psset{xunit=2}
+\makebox[\linewidth]{%
+\begin{pspicture}(-0.5,-4)(3,4)
+ \psaxes{->}(0,0)(0,-4)(3,4)
+ \psVolume[fillstyle=solid,fillcolor=cyan!40](0,1){4}{x}
+ \psVolume[fillstyle=solid,fillcolor=yellow!40](1,2){4}{x dup mul}
+ \psline(2,0)(3,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-4)(3,4)
+ \psaxes{->}(0,0)(0,-4)(3,4)
+ \psVolume[fillstyle=solid,fillcolor=cyan!40](0,1){20}{x}
+ \psVolume[fillstyle=solid,fillcolor=yellow!40](1,2){20}{x dup mul}
+ \psline(2,0)(3,0)
+\end{pspicture}
+}
+\begin{lstlisting}
+\psset{xunit=2}
+\begin{pspicture}(-0.5,-4)(3,4)
+ \psaxes{->}(0,0)(0,-4)(3,4)
+ \psVolume[fillstyle=solid,fillcolor=cyan!40](0,1){4}{x}
+ \psVolume[fillstyle=solid,fillcolor=yellow!40](1,2){4}{x dup mul}
+ \psline(2,0)(3,0)
+\end{pspicture}
+%
+\begin{pspicture}(-0.5,-4)(3,4)
+ \psaxes{->}(0,0)(0,-4)(3,4)
+ \psVolume[fillstyle=solid,fillcolor=cyan!40](0,1){20}{x}
+ \psVolume[fillstyle=solid,fillcolor=yellow!40](1,2){20}{x dup mul}
+ \psline(2,0)(3,0)
+\end{pspicture}
+\end{lstlisting}
+
\clearpage
\section{\CMD{psPrintValue}}\label{sec:printValue}
@@ -946,6 +1072,7 @@ valuewidth & <number> & 10 & the width of the string for the converted
+
\section{Credits}
Denis Girou | Manuel Luque | Timothy Van Zandt
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 ce583f7fc77..ab399eb9ec9 100644
--- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
+++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
@@ -28,8 +28,8 @@
% interface to the `xkeyval' package
\pst@addfams{pst-func}
-\def\fileversion{0.48}
-\def\filedate{2006/11/20}
+\def\fileversion{0.49}
+\def\filedate{2007/12/23}
\message{`PST-func' v\fileversion, \filedate\space (hv)}
%
\pstheader{pst-func.pro}
@@ -587,6 +587,28 @@
\ignorespaces
}
%
+\def\psVolume{\pst@object{psVolume}}% 2007-06-23
+\def\psVolume@i(#1,#2)#3#4{{%
+ \begin@SpecialObj
+ \psplot[fillstyle=none]{#1}{#2}{#4}\psplot[fillstyle=none]{#1}{#2}{#4 neg}
+ \multido{\iA=1+1}{#3}{%
+ \pscustom{%
+ \code{
+ /dX #2 #1 sub #3 div def
+ /Start dX \iA\space 1 sub mul #1 add def
+ /End Start dX add def
+ /Height End Start add 2 div /x ED #4 def }
+ \psellipticarc(!Start 0)(! Height 8 div Height){90}{270}
+ \rlineto(! dX 0)
+ \psellipticarc(!End 0)(! Height 8 div Height){270}{90}
+ \rlineto(!dX neg 0)}}
+ \psset{fillstyle=none}
+ \psellipse(#2,0)(!#2 dup #1 sub #3 div 2 div sub /x ED #4 dup 8 div exch)
+ \psset{plotstyle=line,linestyle=dashed,plotpoints=40,dotstyle=*,dotsize=0.5pt}
+ \psplot{#1}{#2}{#4}\psplot{#1}{#2}{#4 neg}%
+ \end@SpecialObj
+}\ignorespaces}
+%
\catcode`\@=\PstAtCode\relax
%
%% END: pst-func.tex