summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/tools/tpm-ctan-check2
-rw-r--r--Master/texmf-dist/doc/generic/pst-3dplot/Changes18
-rw-r--r--Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.pdfbin1024842 -> 1303195 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.tex431
-rw-r--r--Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.pdfbin12639 -> 10375 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.tex51
-rw-r--r--Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro140
-rw-r--r--Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex463
-rw-r--r--Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty3
-rw-r--r--Master/texmf-dist/tpm/pst-3dplot.tpm6
10 files changed, 881 insertions, 233 deletions
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check
index fea37185ca6..ad11fe3892b 100755
--- a/Build/tools/tpm-ctan-check
+++ b/Build/tools/tpm-ctan-check
@@ -76,7 +76,7 @@ sub main
polynom poemscol powerdot powerdot-doc-vn
ppr-prv pracjourn preview probsoln proof psfrag psnfss pstricks
pstricks-add
- pst-3d pst-barcode pst-blur pst-eucl pst-func
+ pst-3d pst-3dplot pst-barcode pst-blur pst-eucl pst-func
pst-labo pst-lens pst-optic pst-osci pst-pdf pst-pdgr pst-slpe
pst-uml
qtree
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/Changes b/Master/texmf-dist/doc/generic/pst-3dplot/Changes
index 2b62d2de1b3..ccdcca1878d 100644
--- a/Master/texmf-dist/doc/generic/pst-3dplot/Changes
+++ b/Master/texmf-dist/doc/generic/pst-3dplot/Changes
@@ -1,9 +1,27 @@
pst-3dplot.pro --------
+0.22 2006-01-11 add code for left-Handed coor (experimental)
+0.21 2005-10-10 add code for 3D sphere
0.20 2005-01-14 add rotPoint subroutine with RotSequenz option
0.11 2005-01-11 add rotPoint subroutine
pst-3dplot.tex --------
+1.72 2006-02-07 - allow negative direction for ellipse
+ - add code for left-Handed coor (experimental
+ and not documented)
+1.71 2005-11-10 - latest xcolor needs ...={[cmyk]{.3,.4,.1,0}}
+ - fix a bug with Dx
+ - new macro for pstThreeDSphere which needs no pst-vue3d
+1.70 2005-10-16 fixes a bug with \pst@tempa
+1.69 2005-09-25 - add macro \pstParaboloid
+ - some modifications to the code
+1.68 2005-08-02 fix a bug in \pstRotIIIDPoint
+1.67 2005-07-23 add an option zCoor, to plot Lines like const=f(x,y)
+1.66 2005-06-21 use the trig macros of trig.sty to prevent wrong values
+ for sin/cos(90) and 270 degrees
+1.65 2005-02-24 set \def\pst@linetype{2} to prevent a undefined macro
+1.64 2005-02-21 fix bug in pstThreeDPlaneGrid with the start
+ values, which should be in pt
1.63 2005-02-19 spurious blank
1.62 2005-02-16 some modifications to \pstThreeDEllipse
1.61 2005-02-08 spurious blanks in drawStyle
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.pdf b/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.pdf
index b79c271118c..9141e91335c 100644
--- a/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.tex b/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.tex
index dba7c9eab15..33c35b47f43 100644
--- a/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-3dplot/doc/pst-3dplot-doc.tex
@@ -6,7 +6,6 @@
\usepackage{geometry}
\usepackage{pstricks}
\usepackage{pst-grad}
-\usepackage{pst-example}
\usepackage{showexpl}
\lstset{wide=true}
\usepackage{pst-3dplot}
@@ -18,6 +17,7 @@
\usepackage{calc}
\usepackage{comment}
\usepackage{prettyref}
+\usepackage[scaled=0.8]{luximono}
\pagestyle{fancy}
\usepackage{url}
\usepackage{longtable}
@@ -25,6 +25,7 @@
\makeatletter
\def\verbatim@font{\small\normalfont\ttfamily}
\makeatother
+\def\Lcs#1{{\ttfamily\textbackslash #1}}
\lfoot{\small\ttfamily\jobname.tex}
\cfoot{}
\rfoot{\thepage}
@@ -35,13 +36,8 @@
\newcommand{\PS}{PostScript}
\newcommand\CMD[1]{\texttt{\textbackslash#1}}
\newcommand\verbI[1]{\small\texttt{#1}}
-\makeatletter
-\def\verbatim@font{\small\normalfont\ttfamily}
-\makeatother
-\xdefinecolor{gray85}{gray}{0.85}
-\xdefinecolor{gray90}{gray}{0.9}
-\psset{subgriddiv=0,gridlabels=7pt,gridcolor=gray85}
-\usepackage[pdfauthor={Herbert Voss},pdftitle={3D Plots},linktocpage]{hyperref}
+\psset{subgriddiv=0,gridlabels=7pt,gridcolor=black!15}
+\usepackage[pdfauthor={Herbert Voss},pdftitle={3D Plots},linktocpage,colorlinks]{hyperref}
%
\begin{document}
\author{Herbert Voß\thanks{voss@perce.de}}
@@ -270,7 +266,7 @@ nameX & <string> & \$x\$\\
spotX & <angle> & 180\\
nameY & <string> & \$y\$\\
spotY & <angle> & 0\\
-nameZ & <string> & \$x\$\\
+nameZ & <string> & \$z\$\\
spotZ & <angle> & 90\\
IIIDticks & false|true & false\\
Dx & <value> & 1\\
@@ -292,11 +288,11 @@ RotSequence & xyz|xzy|yxz|yzx|zxy|zyx & xyz\\
-\begin{example}[width=6cm]
+\begin{LTXexample}[width=6cm]
\begin{pspicture}(-3,-2.5)(3,4.25)\psgrid
\pstThreeDCoor
\end{pspicture}
-\end{example}
+\end{LTXexample}
There are no restrictions for the angles and the max and min values for the axes; all \verb|pstricks|
options are possible as well. The following example changes the color and the width of the axes.
@@ -310,7 +306,7 @@ other macros. Otherwise they are only local inside the macro to which they are p
\verb+Alpha+ ist the horizontal and \verb+Beta+ the vertical rotation angle of the
Cartesian coordinate system.
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-1.25)(1,2.25)\psgrid
\pstThreeDCoor[%
linewidth=1.5pt,linecolor=blue,%
@@ -319,53 +315,53 @@ Cartesian coordinate system.
zMin=-1,zMax=2,%
Alpha=-60,Beta=30]
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,%
zMin=-2,zMax=2]
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2,%
Alpha=30,Beta=60]
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2,%
Alpha=30,Beta=-60]
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[
xMin=-2,xMax=2,yMin=-2,yMax=2,%
zMin=-2,zMax=2,Alpha=90,Beta=60]
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[linewidth=1.5pt,%
xMin=-1,xMax=2,yMin=-1,yMax=2,%
zMin=-1,zMax=2,Alpha=40,Beta=0]
\end{pspicture}
-\end{example}
+\end{LTXexample}
@@ -379,22 +375,22 @@ With the option \verb+IIIDticks+ the axes get ticks and labels. There are severa
\psset{unit=1.25,gridlabels=0pt}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-3,-2.5)(3,4)
\psgrid
\pstThreeDCoor[IIIDticks]%
\pstThreeDPut(3,0,3){\Huge default}
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-3,-2.5)(3,4)\psgrid
\pstThreeDCoor[linecolor=black,%
IIIDticks,xMin=-2,yMin=-2,zMin=-2]%
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-3,-2.5)(3,4)\psgrid
\pstThreeDCoor[linecolor=black,%
IIIDticks,IIIDzTicksPlane=xz,IIIDzticksep=-0.2,%
@@ -402,20 +398,20 @@ With the option \verb+IIIDticks+ the axes get ticks and labels. There are severa
IIIDyTicksPlane=xy,,IIIDyticksep=0.2,%
Dx=2,Dy=1,Dz=0.25,Alpha=-135,Beta=-30]%
\end{pspicture}
-\end{example}
+\end{LTXexample}
The following example shows a wrong placing of the labels, the planes should be changed.
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\psset{Alpha=-60,Beta=60}
\begin{pspicture}(-4,-2.25)(1,3)
\psgrid
\pstThreeDCoor[linecolor=black,%
IIIDticks,Dx=2,Dy=1,Dz=0.25]%
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-3,-2.25)(2,3)
\psgrid
\psset{Alpha=30,Beta=30}
@@ -427,7 +423,7 @@ The following example shows a wrong placing of the labels, the planes should be
\pstThreeDDot[linecolor=red,drawCoor=true](2,1,2.5)% the center
\pstThreeDEllipse(2,1,2.5)(-0.5,0.5,0.5)(0.5,0.5,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
@@ -437,15 +433,15 @@ The coordinate system can be rotated independent from the given Alpha and Beta v
the axes in any direction and any order. There are the three options \verb+RotX+, \verb+RotY+, \verb+RotZ+ and an
additional one for the rotating sequence, which can be any combination of the three letters \verb+xyz+.
-\begin{example}[pos=a]
-\begin{pspicture}(-6,-3)(6,5)
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-6,-3)(6,3)
\multido{\iA=0+10}{18}{%
- \pstThreeDCoor[RotZ=\iA,xMin=0,xMax=5,yMin=0,yMax=5,zMin=-1,zMax=5]%
+ \pstThreeDCoor[RotZ=\iA,xMin=0,xMax=5,yMin=0,yMax=5,zMin=-1,zMax=3]%
}
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\psset{unit=2,linewidth=1.5pt}
\begin{pspicture}(-2,-1.5)(2,2.5)%
\pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
@@ -464,9 +460,9 @@ additional one for the rotating sequence, which can be any combination of the th
\pstThreeDBox[fillstyle=gradient,RotX=0](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
\pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
\end{pspicture}%
-\end{example}
+\end{LTXexample}
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-2,-1.5)(2,2.5)%
\pstThreeDCoor[xMin=0,xMax=2,yMin=0,yMax=2,zMin=0,zMax=2]%
\pstThreeDBox(0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
@@ -474,7 +470,7 @@ additional one for the rotating sequence, which can be any combination of the th
\pstThreeDBox[RotX=90,RotY=90,linecolor=green](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
\pstThreeDBox[RotX=90,RotY=90,RotZ=90,linecolor=blue](0,0,0)(.5,0,0)(0,1,0)(0,0,1.5)
\end{pspicture}%
-\end{example}
+\end{LTXexample}
@@ -500,7 +496,7 @@ This macro is a special one for the coordinate system to show the units, but can
be used in any way. \verb+subticks+ defines the number of ticklines for both axes and
\verb+xsubticks+ and \verb+ysubticks+ for each one.
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-5,-5)(5,6.5)
\pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=7,yMax=7,zMax=7,linewidth=2pt]
\psset{linewidth=0.1pt,linecolor=lightgray}
@@ -508,9 +504,9 @@ be used in any way. \verb+subticks+ defines the number of ticklines for both axe
\pstThreeDPlaneGrid[planeGrid=xz](0,0)(7,7)
\pstThreeDPlaneGrid[planeGrid=yz](0,0)(7,7)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-1,-2)(10,10)
\psset{Beta=20,Alpha=160,subticks=7}
\pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=7,yMax=7,zMax=7,linewidth=1pt]
@@ -534,10 +530,10 @@ be used in any way. \verb+subticks+ defines the number of ticklines for both axe
}
\pstThreeDPlaneGrid[planeGrid=yz,planeGridOffset=7](0,0)(7,7)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-6,-2)(4,7)
\psset{Beta=10,Alpha=30,subticks=7}
\pstThreeDCoor[xMin=0,yMin=0,zMin=0,xMax=7,yMax=7,zMax=7,linewidth=1.5pt]
@@ -562,7 +558,7 @@ be used in any way. \verb+subticks+ defines the number of ticklines for both axe
\pstThreeDPlaneGrid[planeGrid=xz,planeGridOffset=7](0,0)(7,7)
\pstThreeDPlaneGrid[planeGrid=yz,planeGridOffset=7](0,0)(7,7)
\end{pspicture}
-\end{example}
+\end{LTXexample}
\medskip
The equation for the examples is
@@ -627,7 +623,7 @@ The syntax is similiar to the \verb|\rput| macro:
\pstThreeDPut[options](x,y,z){<any stuff>}
\end{verbatim}}
-\begin{example}[width=3.25cm]
+\begin{LTXexample}[width=3.25cm]
\begin{pspicture}(-2,-1.25)(1,2.25)
\psgrid
\psset{Alpha=-60,Beta=30}
@@ -636,7 +632,7 @@ The syntax is similiar to the \verb|\rput| macro:
\pstThreeDPut(1,0.5,1.25){pst-3dplot}
\pstThreeDDot[drawCoor=true](1,0.5,1.25)
\end{pspicture}
-\end{example}
+\end{LTXexample}
\medskip
@@ -664,7 +660,7 @@ Possible values for the two dimensional plane are \verb| xy xz yz |. If this par
The object can be of any type, in most cases it will be some kind of text. The reference point for the object is the left side and vertically centered, often abbreviated as \verb|lB|. The following examples show for all three planes the same textbox.
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-4,-4)(3,4)
\psgrid
\psset{Alpha=30}
@@ -673,9 +669,9 @@ The object can be of any type, in most cases it will be some kind of text. The r
\pstPlanePut[plane=xy](0,0,0){\fbox{\Huge\red xy plane}}
\pstPlanePut[plane=xy](0,0,3){\fbox{\Huge\red xy plane}}
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-5,-3)(2,3)
\psgrid
\pstThreeDCoor[xMin=2,yMin=-4,zMin=-3,zMax=2]
@@ -683,10 +679,10 @@ The object can be of any type, in most cases it will be some kind of text. The r
\pstPlanePut[plane=xz](0,0,0){\fbox{\Huge\green\textbf{xz plane}}}
\pstPlanePut[plane=xz](0,3,0){\fbox{\Huge\green\textbf{xz plane}}}
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-2,-4)(6,2)
\psgrid
\pstThreeDCoor[xMin=-4,yMin=-4,zMin=-4,xMax=2,zMax=2]
@@ -694,7 +690,7 @@ The object can be of any type, in most cases it will be some kind of text. The r
\pstPlanePut[plane=yz](0,0,0){\fbox{\Huge\blue\textbf{yz plane}}}
\pstPlanePut[plane=yz](3,0,0){\fbox{\Huge\blue\textbf{yz plane}}}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\bigskip
@@ -703,7 +699,7 @@ The following examples use the \verb|origin| option to show that there are still
% Einfuegung Erlaeuterug examplee und Abbildungen
% - raus: --------------------------------------------------------------
%
-% \begin{example}[width=6.25cm]
+% \begin{LTXexample}[width=6.25cm]
% \begin{pspicture}(-3,-2)(3,4)\psgrid
% \psset{origin=lb}
% \pstThreeDCoor
@@ -714,7 +710,7 @@ The following examples use the \verb|origin| option to show that there are still
% \pstThreeDDot[drawCoor=true,linecolor=blue](-2,1,3)
% \pstPlanePut[plane=yz](-2,1,3){\fbox{\Huge\blue\textbf{YZ}}}
% \end{pspicture}
-% \end{example}
+% \end{LTXexample}
% %
% - rein: --------------------------------------------------------------
The second parameter is \verb|planecorr|. As first the values:
@@ -734,7 +730,7 @@ What kind off correction is ment? In the plots above labels for the $xy$ plane
If you want to keep the labels readable for every view, i.\,e.\ for every value of \verb|Alpha| and \verb|Beta|, you should set the value of the parameter \verb|planecorr| to \verb|normal|; just like in next example:
\medskip
-\begin{example}[width=6cm]
+\begin{LTXexample}[width=6cm]
\begin{pspicture}(-3,-2)(3,4)\psgrid
\psset{origin=lb}
\pstThreeDCoor[xMax=3.2,yMax=3.2,zMax=4]
@@ -748,7 +744,7 @@ If you want to keep the labels readable for every view, i.\,e.\ for every value
\pstPlanePut[plane=yz,planecorr=normal](-1.5,0.5,3)
{\fbox{\Huge\blue\textbf{YZ}}}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\medskip
But, why we have a third value \verb|xyrot| of \verb|planecorr|?
@@ -759,7 +755,7 @@ letters is parallel to the $y$ axis. It's done by setting
\medskip
-\begin{example}[width=6cm]
+\begin{LTXexample}[width=6cm]
\begin{pspicture}(-2,-2)(4,4)\psgrid
\psset{origin=lb}
\psset{Alpha=69.3,Beta=19.43}
@@ -774,7 +770,7 @@ letters is parallel to the $y$ axis. It's done by setting
\pstPlanePut[plane=yz,planecorr=xyrot](-2,1,3)
{\fbox{\Huge\blue\textbf{YZ}}}
\end{pspicture}
-\end{example}
+\end{LTXexample}
% --- ende ------------------------------------------------------------
@@ -799,26 +795,26 @@ Dots can be drawn with dashed lines for the three coordinates, when the option \
with the option \verb|dotstyle=none|.\index{dotstyle} In this case the macro draws only the coordinates\index{coordinates}
when the \verb|drawCoor| option is set to true.
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2)(2,2)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2]
\psset{dotstyle=*,dotscale=2,linecolor=red,drawCoor=true}
\pstThreeDDot(-1,1,1)
\pstThreeDDot(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
In the following figure the coordinates of the dots are $(a,a,a)$ where a is $-2,-1,0,1,2$.
-\begin{example}[width=5.25cm]
+\begin{LTXexample}[width=5.25cm]
\begin{pspicture}(-3,-3.25)(2,3.25)\psgrid
\psset{Alpha=30,Beta=60,dotstyle=square*,dotsize=3pt,%
linecolor=blue,drawCoor=true}
\pstThreeDCoor[xMin=-3,xMax=3,yMin=-3,yMax=3,zMin=-3,zMax=3]
\multido{\n=-2+1}{5}{\pstThreeDDot(\n,\n,\n)}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\section{Lines}
@@ -834,7 +830,7 @@ All options for lines from \verb|pstricks| are possible, there are no special on
There is no special \verb+polygon+ macro, because you can get nearlx the same with
\verb+\pstThreeDLine+.
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2]
\psset{dotstyle=*,linecolor=red,drawCoor=true}
@@ -843,12 +839,12 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDLine[linewidth=3pt,linecolor=blue,arrows=->]%
(-1,1,0.5)(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2]
\psset{dotstyle=*,linecolor=red,drawCoor=true}
@@ -856,10 +852,10 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDDot(1.5,-1,-1)
\pstThreeDLine[linewidth=3pt,linecolor=blue](-1,1,1)(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\psset{Alpha=30,Beta=60,dotstyle=pentagon*,dotsize=5pt,%
linecolor=red,drawCoor=true}
@@ -868,9 +864,9 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDDot(1.5,-1,-1)
\pstThreeDLine[linewidth=3pt,linecolor=blue](-1,1,1)(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\psset{Alpha=30,Beta=-60}
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2]
@@ -878,10 +874,10 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDDot[drawCoor=true](1.5,-1,-1)
\pstThreeDLine[linewidth=3pt,linecolor=blue](-1,1,1)(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\psset{Alpha=30,Beta=-60}
\pstThreeDCoor[xMin=-2,xMax=2,yMin=-2,yMax=2,zMin=-2,zMax=2]
@@ -890,9 +886,9 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDLine[linewidth=3pt,arrowscale=1.5,%
linecolor=magenta,linearc=0.5]{<->}(-1,1,1)(1.5,2,-1)(1.5,-1,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-3,-2)(4,5)\label{lines}
\pstThreeDCoor[xMin=-3,xMax=3,yMin=-1,yMax=4,zMin=-1,zMax=3]
\multido{\iA=1+1,\iB=60+-10}{5}{%
@@ -909,7 +905,7 @@ There is no special \verb+polygon+ macro, because you can get nearlx the same wi
\pstThreeDLine[SphericalCoor=true,linestyle=dashed]%
(0,0,0)(1,\iA,60)(2,\iA,50)(3,\iA,40)(4,\iA,30)(5,\iA,20)}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\section{Triangles}
@@ -920,7 +916,7 @@ A triangle is given with its three points:
When the option \verb|fillstyle| is set to another value than \verb|none| the triangle is filled with the active color or with the one which is set with the option \verb|fillcolor|.
-\begin{example}[width=6.25cm]
+\begin{LTXexample}[width=6.25cm]
\begin{pspicture}(-3,-4.25)(3,3.25)\psgrid
\pstThreeDCoor[xMin=-4,xMax=4,yMin=-3,yMax=5,zMin=-4,zMax=3]
\pstThreeDTriangle[fillcolor=yellow,fillstyle=solid,%
@@ -928,7 +924,7 @@ When the option \verb|fillstyle| is set to another value than \verb|none| the tr
\pstThreeDTriangle[drawCoor=true,linecolor=black,%
linewidth=2pt](3,1,-2)(1,4,-1)(-2,2,0)
\end{pspicture}
-\end{example}
+\end{LTXexample}
Especially for triangles the option \verb|linejoin| is important. The default value is $1$, which gives rounded edges.
@@ -956,7 +952,7 @@ The syntax for a 3D square is:
\pstThreeDSquare(<vector o>)(<vector u>)(<vector v>)
\end{verbatim}
-\begin{example}[width=5cm]
+\begin{LTXexample}[width=5cm]
\begin{pspicture}(-1,-1)(4,3)\psgrid
\pstThreeDCoor[xMin=-3,xMax=1,yMin=-1,yMax=2,zMin=-1,zMax=3]
\psset{arrows=->,arrowsize=0.2,linecolor=blue,linewidth=1.5pt}
@@ -964,19 +960,19 @@ The syntax for a 3D square is:
\pstThreeDLine(-2,2,3)(2,2,3)\uput[0](3,2){$\vec{u}$}
\pstThreeDLine(-2,2,3)(-2,3,3)\uput[180](1,2){$\vec{v}$}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\medskip
Squares are nothing else than a polygon with the starting point $P_o$ given with the origin vector $\vec{o}$ and the two direction vectors $\vec{u}$ and $\vec{v}$, which build the sides of the square.
-\begin{example}[width=7.25cm]
+\begin{LTXexample}[width=7.25cm]
\begin{pspicture}(-3,-2)(4,3)\psgrid
\pstThreeDCoor[xMin=-3,xMax=3,yMin=-1,yMax=4,zMin=-1,zMax=3]
{\psset{fillcolor=blue,fillstyle=solid,drawCoor=true,dotstyle=*}
\pstThreeDSquare(-2,2,3)(4,0,0)(0,1,0)}
\end{pspicture}
-\end{example}
+\end{LTXexample}
\section{Boxes}
@@ -990,7 +986,7 @@ A box is a special case of a square and has the syntax
These are the origin vector $\vec{o}$ and three direction vectors $\vec{u}$, $\vec{v}$ and $\vec{w}$, which are for example shown in the following figure.
-\begin{example}[width=5.25cm]
+\begin{LTXexample}[width=5.25cm]
\begin{pspicture}(-2,-1.25)(3,4.25)\psgrid
\psset{Alpha=30,Beta=30}
\pstThreeDCoor[xMin=-3,xMax=1,yMin=-1,yMax=2,zMin=-1,zMax=4]
@@ -1005,16 +1001,16 @@ These are the origin vector $\vec{o}$ and three direction vectors $\vec{u}$, $\v
\pstThreeDLine[linecolor=blue](-1,1,2)(1,1,2)
\pstThreeDLine[linecolor=blue](-1,1,2)(-1,2,2)
\end{pspicture}
-\end{example}
+\end{LTXexample}
-\begin{example}[width=5.25cm]
+\begin{LTXexample}[width=5.25cm]
\begin{pspicture}(-2,-1.25)(3,4.25)\psgrid
\psset{Alpha=30,Beta=30}
\pstThreeDCoor[xMin=-3,xMax=1,yMin=-1,yMax=2,zMin=-1,zMax=4]
\pstThreeDBox(-1,1,2)(0,0,2)(2,0,0)(0,1,0)
\pstThreeDDot[drawCoor=true](-1,1,2)
\end{pspicture}
-\end{example}
+\end{LTXexample}
@@ -1057,7 +1053,9 @@ e:\frac{\left(x-x_{M}\right)^{2}}{a^{2}}+\frac{\left(y-y_{M}\right)^{2}}{b^{2}}=
$\left(x_m;y_m\right)$ is the center, $a$
and $b$ the semi major and semi minor axes
-respectively and $e$ the excentricity. For $a=b=1$ in equation \ref{gl.600} we get the one for the circle, which is nothing else than a special ellipse. The equation written in the parameterform is
+respectively and $e$ the excentricity. For $a=b=1$ in equation~\ref{gl.600} we get the one for the circle,
+which is nothing else than a special ellipse.
+The equation written in the parameterform is
\begin{equation}\label{gl601}
\begin{split}
@@ -1071,18 +1069,21 @@ or the same with vectors to get an ellipse in a 3D system:
e:\vec{x} &=\vec{m}+\cos\alpha\cdot\vec{u}+\sin\alpha\cdot\vec{v}\qquad 0\leq\alpha\leq360
\end{align}
-where $\vec{m}$ is the center, $\vec{u}$ and $\vec{v}$ the directions vectors which are perpendicular to each other.
+where $\vec{m}$ is the center, $\vec{u}$ and $\vec{v}$ the directions vectors which are
+perpendicular to each other.
\subsection{Options}
-In addition to all possible options from \verb|pst-plot| there are two special options to allow drawing of an arc (with predefined values for a full ellipse/circle):
+In addition to all possible options from \verb|pst-plot| there are two special
+options to allow drawing of an arc (with predefined values for a full ellipse/circle):
%
\begin{verbatim}
beginAngle=0
endAngle=360
\end{verbatim}
-Ellipses and circles are drawn with the in section \ref{subsec:parametricplotThreeD} described \verb|parametricplotThreeD| macro with a default setting of $50$ points for a full ellipse/circle.
+Ellipses and circles are drawn with the in section~\ref{subsec:parametricplotThreeD} described
+\verb|parametricplotThreeD| macro with a default setting of $50$ points for a full ellipse/circle.
\subsection{Ellipse}
It is very difficult to see in a 3D coordinate system the difference of an ellipse and a circle. Depending to the view point an ellipse maybe seen as a circle and vice versa. The syntax of the ellipse macro is:
@@ -1091,8 +1092,33 @@ It is very difficult to see in a 3D coordinate system the difference of an ellip
\end{verbatim}
where \verb|c| is for center and \verb|u| and \verb|v| for the two direction vectors.
+The order of these two vectors is important for the drawing if it
+is a left or right turn. It follows the right hand rule: flap the first vector $\vec{u}$ on the
+shortest way into the second one $\vec{u}$, then you'll get the positive rotating.
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-3,-2)(3,3)
+ \pstThreeDCoor[IIIDticks]
+ \psset{arrowscale=2,arrows=->}
+ \pstThreeDLine(0,0,0)(3,0,0)\pstThreeDLine(0,0,0)(0,3,0)\pstThreeDLine(0,0,0)(0,0,3)
+ \psset{linecolor=blue,linewidth=1.5pt,beginAngle=0,endAngle=90}
+ \pstThreeDEllipse(0,0,0)(3,0,0)(0,3,0) \pstThreeDEllipse(0,0,0)(0,0,3)(3,0,0)
+ \pstThreeDEllipse(0,0,0)(0,3,0)(0,0,3)
+\end{pspicture}\hspace{2em}
+\begin{pspicture}(-3,-2)(3,3)
+ \pstThreeDCoor[IIIDticks]
+ \psset{arrowscale=2,arrows=->}
+ \pstThreeDLine(0,0,0)(3,0,0)\pstThreeDLine(0,0,0)(0,3,0)\pstThreeDLine(0,0,0)(0,0,3)
+ \psset{linecolor=blue,linewidth=1.5pt,beginAngle=0,endAngle=90}
+ \pstThreeDEllipse(0,0,0)(0,3,0)(3,0,0) \pstThreeDEllipse(0,0,0)(3,0,0)(0,0,3)
+ \pstThreeDEllipse(0,0,0)(0,0,3)(0,3,0)
+\end{pspicture}
+\end{LTXexample}
+
-\begin{example}[width=4.25cm]
+
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-2.25)(2,2.25)\psgrid
\pstThreeDCoor[xMax=2,yMax=2,zMax=2]
\pstThreeDDot[linecolor=red,drawCoor=true](1,0.5,0.5)
@@ -1102,20 +1128,21 @@ where \verb|c| is for center and \verb|u| and \verb|v| for the two direction vec
\pstThreeDEllipse(1,0.5,0.5)(-0.5,0.5,0.5)(0.5,0.5,-1)
\pstThreeDEllipse[RotZ=45,linecolor=red](1,0.5,0.5)(-0.5,0.5,0.5)(0.5,0.5,-1)
\end{pspicture}
-\end{example}
+\end{LTXexample}
\subsection{Circle}
-The circle is a special case of an ellipse (equ. \ref{gl.6}) with the vectors
+The circle is a special case of an ellipse (equ.~\ref{gl.6}) with the vectors
$\vec{u}$ and $\vec{v}$ which are perpendicular
to each other: $\left|\vec{u}\right|=\left|\vec{v}\right|=r$.
with
$\vec{u}\cdot\vec{v}=\vec{0}$
-The macro \verb|\pstThreeDCircle| is nothing else than a synonym for \verb|\pstThreeDEllipse|. In the following example the circle is drawn with only $20$ plotpoints and the option \verb|showpoints=true|.
+The macro \verb|\pstThreeDCircle| is nothing else than a synonym for \verb|\pstThreeDEllipse|.
+In the following example the circle is drawn with only $20$ plotpoints and the option \verb|showpoints=true|.
-\begin{example}[width=4.25cm]
+\begin{LTXexample}[width=4.25cm]
\begin{pspicture}(-2,-1.25)(2,2.25)\psgrid
\pstThreeDCoor[xMax=2,yMax=2,zMax=2,linecolor=black]
\psset{linecolor=red,linewidth=2pt,plotpoints=20,showpoints=true}
@@ -1124,28 +1151,206 @@ The macro \verb|\pstThreeDCircle| is nothing else than a synonym for \verb|\pstT
\pstThreeDCircle[RotY=15,linecolor=blue](1.6,+0.6,1.7)(0.8,0.4,0.8)(0.8,-0.8,-0.4)
\pstThreeDDot[RotY=15,drawCoor=true,linecolor=blue](1.6,+0.6,1.7)
\end{pspicture}
-\end{example}
+\end{LTXexample}
+
+
+\begin{center}
+\bgroup
+\makebox[\linewidth]{%
+\def\radius{4 }\def\PhiI{20 }\def\PhiII{50 }
+%
+\def\RadIs{\radius \PhiI sin mul}
+\def\RadIc{\radius \PhiI cos mul}
+\def\RadIIs{\radius \PhiII sin mul}
+\def\RadIIc{\radius \PhiII cos mul}
+\begin{pspicture}(-4,-4)(4,5)
+ \psset{Alpha=45,Beta=30,linestyle=dashed}
+ \pstThreeDCoor[linestyle=solid,xMin=-5,xMax=5,yMax=5,zMax=5,IIIDticks]
+ \pstThreeDEllipse[linecolor=red](0,0,0)(0,\radius,0)(0,0,\radius)
+ \pstThreeDEllipse(\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+ \pstThreeDEllipse(\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+%
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+%
+ \psset{linecolor=blue,arrows=->,arrowscale=2,linewidth=1.5pt,linestyle=solid}
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiI,endAngle=\PhiII]%
+ (0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiII,endAngle=\PhiI](\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiII,endAngle=\PhiI]%
+ (0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiI,endAngle=\PhiII](\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+\end{pspicture}
+\begin{pspicture}(-4,-4)(4,5)
+ \psset{Alpha=45,Beta=30,linestyle=dashed}
+ \pstThreeDCoor[linestyle=solid,xMin=-5,xMax=5,yMax=5,zMax=5,IIIDticks]
+ \pstThreeDEllipse[linecolor=red](0,0,0)(0,\radius,0)(0,0,\radius)
+ \pstThreeDEllipse(\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+ \pstThreeDEllipse(\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+%
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+%
+ \pscustom[fillstyle=solid,fillcolor=blue]{
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiI,endAngle=\PhiII]%
+ (0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiII,endAngle=\PhiI](\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiII,endAngle=\PhiI]%
+ (0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiI,endAngle=\PhiII](\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+ }
+\end{pspicture}
+}
+\egroup
+\end{center}
+\begin{lstlisting}
+\def\radius{4 }\def\PhiI{20 }\def\PhiII{50 }
+%
+\def\RadIs{\radius \PhiI sin mul}
+\def\RadIc{\radius \PhiI cos mul}
+\def\RadIIs{\radius \PhiII sin mul}
+\def\RadIIc{\radius \PhiII cos mul}
+\begin{pspicture}(-4,-4)(4,5)
+ \psset{Alpha=45,Beta=30,linestyle=dashed}
+ \pstThreeDCoor[linestyle=solid,xMin=-5,xMax=5,yMax=5,zMax=5,IIIDticks]
+ \pstThreeDEllipse[linecolor=red](0,0,0)(0,\radius,0)(0,0,\radius)
+ \pstThreeDEllipse(\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+ \pstThreeDEllipse(\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+%
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+%
+ \psset{linecolor=blue,arrows=->,arrowscale=2,linewidth=1.5pt,linestyle=solid}
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiI,endAngle=\PhiII]%
+ (0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiII,endAngle=\PhiI](\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiII,endAngle=\PhiI]%
+ (0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiI,endAngle=\PhiII](\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+\end{pspicture}
+\begin{pspicture}(-4,-4)(4,5)
+
+[ ... ]
+
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[linestyle=dotted,SphericalCoor](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[SphericalCoor,
+ beginAngle=-90,endAngle=90](0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+%
+ \pscustom[fillstyle=solid,fillcolor=blue]{
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiI,endAngle=\PhiII]%
+ (0,0,0)(\radius,90,\PhiII)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiII,endAngle=\PhiI](\RadIIs,0,0)(0,\RadIIc,0)(0,0,\RadIIc)
+ \pstThreeDEllipse[SphericalCoor,beginAngle=\PhiII,endAngle=\PhiI]%
+ (0,0,0)(\radius,90,\PhiI)(\radius,0,0)
+ \pstThreeDEllipse[beginAngle=\PhiI,endAngle=\PhiII](\RadIs,0,0)(0,\RadIc,0)(0,0,\RadIc)
+ }
+\end{pspicture}
+\end{lstlisting}
+
+% ---------------------------------------------------------------------------------------
+\subsection{\CMD{pstParaboloid}}
+% ---------------------------------------------------------------------------------------
+The syntax is
+
+\begin{verbatim}
+\pstParaboloid[Parameter]{height}{radius}
+\end{verbatim}
+
+\verb+height+ and \verb+radius+ depend to each other, it is the radius of the circle
+at the height. By default the paraboloid is placed in the origin of coordinate system, but
+with \verb+\pstThreeDput+ it can be placed anywhere. The possible options are listed in
+table~\ref{tab:paraboloid}.
+The segment color must be set as a cmyk color \verb|SegmentColor={[cmyk]{c,m,y,k}}| in parenthesis,
+otherwise \verb|xcolor| cannot read the values. A white color is given by \verb|SegmentColor={[cmyk]{0,0,0,0}}|.
+
+\begin{table}[htb]
+\centering
+\caption{Options for the \Lcs{pstParaboloid} macro}\label{tab:paraboloid}
+\smallskip
+\begin{tabular}{l|l}
+\textbf{Option name} & \textbf{value}\\\hline
+\verb|SegmentColor| & cmyk color for the segments (0.2,0.6,1,0)\\
+\verb|showInside| & show inside (true)\\
+\verb|increment| & number for the segments (10)
+\end{tabular}
+\end{table}
+
+
+
+% x=radius/sqrt(h)*V*cos(V)
+% y=radius/sqrt(h)*V*sin(V)
+% z=radius/sqrt(h)*V*V
+\begin{LTXexample}[width=4cm]
+\begin{pspicture}(-2,-1)(2,5)
+\pstThreeDCoor[xMax=2,yMax=2,zMin=0,zMax=6,IIIDticks]%
+\pstParaboloid{5}{1}% Höhe 5 und Radius 1
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(-.5\linewidth,-1)(.5\linewidth,7.5)
+\pstParaboloid[showInside=false,SegmentColor={[cmyk]{0.8,0.1,.11,0}}]{4}{5}%
+\pstThreeDCoor[xMax=3,yMax=3,zMax=7.5,IIIDticks]
+\end{pspicture}
+\end{LTXexample}
\section{Spheres}\label{sec:spheres}
-To draw spheres \verb|pst-3dplot| uses the macros from the \verb|pst-vue3d| package and places it with internally the \verb|\rput| macro at the right place.\footnote{%
-This package is available CTAN %
-\url{ftp://ftp.dante.de/pub/tex/graphics/pstricks/contrib/pst-vue3d/}. The documentation is in french, but it is mostly self explanatory} The syntax for this macro is
+\begin{LTXexample}[width=6.25cm]
+\begin{pspicture}(-4,-2.25)(2,4.25)\psgrid
+ \pstThreeDCoor[xMin=-3,yMax=2]
+ \pstThreeDSphere(1,-1,2){2}
+ \pstThreeDDot[dotstyle=x,linecolor=red,drawCoor=true](1,-1,2)
+\end{pspicture}
+\end{LTXexample}
+
\begin{verbatim}
\pstThreeDSphere[<options>](x,y,z){Radius}
\end{verbatim}
-\verb|(x,y,z)| is the center of the sphere. For all the other possible options or the possibility to draw demispheres, have a look at the documentation.\cite{vue3d:2002}
+\verb|(x,y,z)| is the center of the sphere and possible options are listed in table~\ref{tab:sphereOptions}.
+The segment color must be set as a cmyk color \verb|SegmentColor={[cmyk]{c,m,y,k}}| in parenthesis,
+otherwise \verb|xcolor| cannot read the values. A white color is given by \verb|SegmentColor={[cmyk]{0,0,0,0}}|.
+
+\begin{table}[htb]
+\centering
+\caption{Options for the sphere macro}\label{tab:sphereOptions}
+\smallskip
+\begin{tabular}{l|l}
+\textbf{Option name} & \textbf{value}\\\hline
+\verb|SegmentColor| & cmyk color for the segments (0.2,0.6,1,0)\\
+\verb|increment| & number for the segments (10)
+\end{tabular}
+\end{table}
+
-\begin{example}[width=6.25cm]
+\begin{LTXexample}[width=6.25cm]
\begin{pspicture}(-4,-2.25)(2,4.25)\psgrid
\pstThreeDCoor[xMin=-3,yMax=2]
- \pstThreeDSphere[linecolor=blue](1,-1,2){2}
+ \pstThreeDSphere[SegmentColor={[cmyk]{0,0,0,0}}](1,-1,2){2}
\pstThreeDDot[dotstyle=x,linecolor=red,drawCoor=true](1,-1,2)
\end{pspicture}
-\end{example}
+\end{LTXexample}
+
+
+
\section{Mathematical functions}
@@ -1395,14 +1600,14 @@ In the example the $t$ value is divided by $600$ for the \verb|z| coordinate, be
which is the same as \verb|(0,0)| for the parameter \verb|u|.
-\begin{example}[width=6.75cm]
+\begin{LTXexample}[width=6.75cm]
\begin{pspicture}(-3.25,-2.25)(3.25,5.25)\psgrid
\parametricplotThreeD[xPlotpoints=200,linecolor=blue,%
linewidth=1.5pt,plotstyle=curve](0,2160){%
2.5 t cos mul 2.5 t sin mul t 600 div}
\pstThreeDCoor[zMax=5]
\end{pspicture}
-\end{example}
+\end{LTXexample}
Instead of using the \verb|\pstThreeDSphere| macro (see section \ref{sec:spheres}) it is also possible to use parametric functions for a sphere. The macro plots continous lines only for the \verb|t| parameter, so a sphere plotted with the longitudes need the parameter equations as
@@ -1523,13 +1728,13 @@ The syntax is very easy
If the data file is not in the same directory than the document, insert the file name with the full path. Figure \ref{fig:fileplot} shows a file plot with the option \texttt{linestyle=line}.
\begin{figure}[htb]
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-6,-3)(6,10)
\psset{xunit=0.5cm,yunit=0.75cm,Alpha=30,Beta=30}% the global parameters
\pstThreeDCoor[xMin=-10,xMax=10,yMin=-10,yMax=10,zMin=-2,zMax=10]
\fileplotThreeD[plotstyle=line]{data3D.Roessler}
\end{pspicture}%
-\end{example}%
+\end{LTXexample}%
\caption{Demonstration of \texttt{\textbackslash fileplotThreeD} with \texttt{Alpha=30} and \texttt{Beta=15}}\label{fig:fileplot}
\end{figure}
@@ -1549,13 +1754,13 @@ In difference to the macro \CMD{fileplotThreeD} the \CMD{dataplotThreeD} cannot
\readdata{\dataThreeD}{data3D.Roessler}
\begin{figure}[htb]
-\begin{example}[width=8.5cm]
+\begin{LTXexample}[width=8.5cm]
\begin{pspicture}(-4.5,-3.5)(4,11)
\psset{xunit=0.5cm,yunit=0.75cm,Alpha=-30}
\pstThreeDCoor[xMin=-10,xMax=10,yMin=-10,yMax=10,zMin=-2,zMax=10]
\dataplotThreeD[plotstyle=line]{\dataThreeD}
\end{pspicture}%
-\end{example}
+\end{LTXexample}
\caption{Demonstration of \texttt{\textbackslash dataplotThreeD} with \texttt{Alpha=-30} and \texttt{Beta=30}}\label{fig:fileplot}
\end{figure}
@@ -1593,13 +1798,13 @@ The syntax is
\end{lstlisting}
\begin{figure}[htb]
-\begin{example}[pos=a]
+\begin{LTXexample}[pos=t]
\begin{pspicture}(-5,-4)(5,4)
\psset{xunit=0.5cm,yunit=0.5cm,Alpha=0,Beta=90}
\pstThreeDCoor[xMin=-10,xMax=10,yMin=-10,yMax=7.5,zMin=-2,zMax=10]
\listplotThreeD[plotstyle=line]{\dataThreeDDraft}
\end{pspicture}%
-\end{example}%
+\end{LTXexample}%
\caption{Demonstration of \texttt{\textbackslash listplotThreeD} with a view from above (\texttt{Alpha=0} and \texttt{Beta=90}) and some additional PostScript code}\label{fig:listplot}
\end{figure}
@@ -1742,7 +1947,7 @@ error. In this case save prevent expanding with e.g.: \verb+\psset{nameX=$\noexp
\section{Credits}
-Bruce Burton | Christophe Jorssen | Chris Kuklewicz | Thorsten Suhling
+Bruce Burlton | Christophe Jorssen | Chris Kuklewicz | Thorsten Suhling
\bibliographystyle{plain}
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.pdf b/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.pdf
index 52fcf2fdaf2..bdf3fa1cd29 100644
--- a/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.pdf
+++ b/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.tex b/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.tex
index 3112ee123c9..6b54d12fb1f 100644
--- a/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.tex
+++ b/Master/texmf-dist/doc/generic/pst-3dplot/examples/spherCoor.tex
@@ -1,41 +1,32 @@
-\documentclass[12pt,a4paper]{article}
+\documentclass[]{article}
\usepackage{pstricks}
\usepackage{pst-3dplot}
+\pagestyle{empty}
+\parindent=0pt
\begin{document}
-\begin{pspicture}(-6,-6)(6,6)
-\psset{unit=7.5cm,hiddenLine=true,drawCoor=true}
-\def\oA{%
- \pstThreeDLine[linecolor=blue,linewidth=3pt,%
- SphericalCoor=true,arrows=c-> ](0,0,0)(1,60,70)%
-}
-\def\oB{%
- \pstThreeDLine[linecolor=red,linewidth=3pt,%
- SphericalCoor=true,arrows=c->](0,0,0)(1,10,50)%
-}
-\def\oAB{%
- \pstThreeDEllipse[beginAngle=90,endAngle=122,fillcolor=green,%
- SphericalCoor=true](0,0,0)(1,140,40)(1,10,50)%
-}
-\pstThreeDCoor[drawing=true, linewidth=1pt,linecolor=black,%
+\begin{center}
+\begin{pspicture}(-4.8,-1.5)(4.8,3.5)
+\psset{unit=5cm,drawCoor,beginAngle=90,endAngle=180,linestyle=dotted}
+\def\oA{\pstThreeDLine[linecolor=blue,linewidth=3pt,arrows=c-> ](0,0,0)(1,60,70)}
+\def\oB{\pstThreeDLine[linecolor=red,linewidth=3pt,arrows=c->](0,0,0)(1,10,50)}
+\def\oAB{\pstThreeDEllipse[beginAngle=58,endAngle=90](0,0,0)(1,140,40)(1,10,50)}
+\pstThreeDCoor[drawing=true, linewidth=1pt,linecolor=black,linestyle=solid,%
xMin=0,xMax=1.1, yMin=0,yMax=1.1, zMin=0,zMax=1.1]
-\pstThreeDEllipse[beginAngle=0, endAngle=90,linestyle=dotted]%
- (0,0,0)(-1,0,0)(0,1,0)
-\pstThreeDEllipse[beginAngle=0, endAngle=90,linestyle=dotted]%
- (0,0,0)(-1,0,0)(0,0,1)
-\pstThreeDEllipse[beginAngle=180, endAngle=90,linestyle=dotted]%
- (0,0,0)(0,0,1)(0,1,0)
-
-\psset{SphericalCoor=true}
+\pstThreeDEllipse(0,0,0)(-1,0,0)(0,1,0)
+\pstThreeDEllipse(0,0,0)(-1,0,0)(0,0,1)
+\pstThreeDEllipse[beginAngle=0,endAngle=90](0,0,0)(0,0,1)(0,1,0)
+\psset{SphericalCoor,linestyle=solid}
\pstThreeDDot[dotstyle=none](1,10,50)
\pstThreeDDot[dotstyle=none](1,60,70)
-\pscustom[fillstyle=crosshatch,hatchcolor=yellow,%
- linestyle=none]{\oA\oB\oAB}
+\pscustom[fillstyle=crosshatch,hatchcolor=yellow,linestyle=none]{\oB\oAB\oA}
\oA \oB \oAB
-\pstThreeDPut[origin=lb](1,60,70){\Large $\vec\Omega_1$}
-\pstThreeDPut[origin=rb](1,10,50){\Large $\vec\Omega_2 \,$}
-\pstThreeDPut[origin=lb](1,10,65){\Large $\gamma_{12}$}
-
+\pstThreeDPut[origin=lb](1,60,70){$\vec\Omega_1$}
+\pstThreeDPut[origin=rb](1,10,50){$\vec\Omega_2 \,$}
+\pstThreeDPut[origin=lb](1,10,65){$\gamma_{12}$}
\end{pspicture}
+\end{center}
+
\end{document}
+
diff --git a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
index 23cd5be3db9..d8cffb1e8fb 100644
--- a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
+++ b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
@@ -15,9 +15,9 @@
%% `pst-3dplot' is a PSTricks package to draw 3d curves and graphical objects
%%
%%
-%% version 0.2 / 2005-01-14 Herbert Voss <voss _at_ PSTricks.de>
+%% version 0.23 / 2006-01-18 Herbert Voss <voss _at_ PSTricks.de>
%
-/tx@3DPlotDict 40 dict def
+/tx@3DPlotDict 50 dict def
tx@3DPlotDict begin
%
/saveCoor {
@@ -28,8 +28,10 @@ tx@3DPlotDict begin
%
/ConvertTo2D {
RotatePoint
- /x2D x neg Alpha cos mul y Alpha sin mul add def
- /y2D x Alpha sin mul y Alpha cos mul add neg Beta sin mul z Beta cos mul add def
+% /x2D y x Alpha sin mul sub def % |/_ co system
+% /y2D z x Alpha cos mul sub def
+ /x2D x leftHanded not { neg } if Alpha cos mul y Alpha sin mul add def
+ /y2D x leftHanded { neg } if Alpha sin mul y Alpha cos mul add neg Beta sin mul z Beta cos mul add def
} def
%
/ConvertToCartesian {
@@ -105,4 +107,134 @@ tx@3DPlotDict begin
%
/RotatePoint { RotSequence cvx exec } def
%
+/VecNorm { 0 exch { dup mul add } forall sqrt } def
+/UnitVec { % on stack is [a]; returns a vector with [a][a]/|a|=1
+ dup VecNorm /norm ED
+ { norm div } forall 3 array astore } def
+/AxB { % on the stack are the two vectors [a][b]
+ aload pop /b3 ED /b2 ED /b1 ED
+ aload pop /a3 ED /a2 ED /a1 ED
+ a2 b3 mul a3 b2 mul sub
+ a3 b1 mul a1 b3 mul sub
+ a1 b2 mul a2 b1 mul sub
+ 3 array astore } def
+/AaddB { % on the stack are the two vectors [a][b]
+ aload pop /b3 ED /b2 ED /b1 ED
+ aload pop /a3 ED /a2 ED /a1 ED
+ a1 b1 add a2 b2 add a3 b3 add
+ 3 array astore } def
+/AmulC { % on stack is [a] and c; returns [a] mul c
+ /factor ED { factor mul } forall 3 array astore } def
+%
+%
+% 3D objects
+/tx@ProjThreeD {% adopted from pst-3d
+ /z ED /y ED /x ED
+ Matrix3D aload pop
+ z mul exch y mul add exch x mul add
+ 4 1 roll
+ z mul exch y mul add exch x mul add
+ exch} def
+%
+/setColorLight { % expects 7 values on stack C M Y K xL yL zL
+% les rayons de lumière
+ /zLight exch def
+ /yLight exch def
+ /xLight exch def
+% the color values
+ /K exch def
+ /Yellow exch def
+ /Magenta exch def
+ /Cyan exch def
+%
+ /NormeLight {xLight dup mul yLight dup mul zLight dup mul add add
+ sqrt} bind def
+} def
+/facetteSphere {
+ newpath
+ /Xpoint Rsphere theta cos mul phi cos mul CX add def
+ /Ypoint Rsphere theta sin mul phi cos mul CY add def
+ /Zpoint Rsphere phi sin mul CZ add def
+ Xpoint Ypoint Zpoint tx@ProjThreeD moveto
+ theta 1 theta increment add {%
+ /theta1 exch def
+ /Xpoint Rsphere theta1 cos mul phi cos mul CX add def
+ /Ypoint Rsphere theta1 sin mul phi cos mul CY add def
+ /Zpoint Rsphere phi sin mul CZ add def
+ Xpoint Ypoint Zpoint tx@ProjThreeD lineto
+ } for
+ phi 1 phi increment add {
+ /phi1 exch def
+ /Xpoint Rsphere theta increment add cos mul phi1 cos mul CX add def
+ /Ypoint Rsphere theta increment add sin mul phi1 cos mul CY add def
+ /Zpoint Rsphere phi1 sin mul CZ add def
+ Xpoint Ypoint Zpoint tx@ProjThreeD lineto
+ } for
+ theta increment add -1 theta {%
+ /theta1 exch def
+ /Xpoint Rsphere theta1 cos mul phi increment add cos mul CX add def
+ /Ypoint Rsphere theta1 sin mul phi increment add cos mul CY add def
+ /Zpoint Rsphere phi increment add sin mul CZ add def
+ Xpoint Ypoint Zpoint tx@ProjThreeD lineto
+ } for
+ phi increment add -1 phi {
+ /phi1 exch def
+ /Xpoint Rsphere theta cos mul phi1 cos mul CX add def
+ /Ypoint Rsphere theta sin mul phi1 cos mul CY add def
+ /Zpoint Rsphere phi1 sin mul CZ add def
+ Xpoint Ypoint Zpoint tx@ProjThreeD lineto
+ } for
+ closepath
+} def
+%
+/condition { PSfacette 0 ge } def
+/MaillageSphere {
+% on stack must be
+% x y z Radius increment C M Y K x y zLIGHT
+ setColorLight
+ /increment exch def
+ /Rsphere exch def
+ /CZ exch def
+ /CY exch def
+ /CX exch def
+ /StartTheta 0 def
+ -90 increment 90 increment sub {%
+ /phi exch def
+ StartTheta increment 360 StartTheta add increment sub {%
+ /theta exch def
+ % Centre de la facette
+ /Xpoint Rsphere theta increment 2 div add cos mul phi increment 2 div add cos mul CX add def
+ /Ypoint Rsphere theta increment 2 div add sin mul phi increment 2 div add cos mul CY add def
+ /Zpoint Rsphere phi increment 2 div add sin mul CZ add def
+ % normale à la facette
+ /nXfacette Xpoint CX sub def
+ /nYfacette Ypoint CY sub def
+ /nZfacette Zpoint CZ sub def
+ % test de visibilité
+ /PSfacette vX nXfacette mul
+ vY nYfacette mul add
+ vZ nZfacette mul add
+ def
+ condition {
+ gsave
+ facetteSphere
+ /cosV { 1 xLight nXfacette mul
+ yLight nYfacette mul
+ zLight nZfacette mul
+ add add
+ NormeLight
+ nXfacette dup mul
+ nYfacette dup mul
+ nZfacette dup mul
+ add add sqrt mul div sub } bind def
+ Cyan cosV mul Magenta cosV mul Yellow cosV mul K cosV mul setcmykcolor fill
+ grestore
+% 0 setgray
+ facetteSphere stroke
+ } if
+ } for
+ % /StartTheta StartTheta increment 2 div add def
+ } for
+} def
+
end
diff --git a/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex b/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex
index 990149460fe..e8812bd5102 100644
--- a/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex
+++ b/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex
@@ -22,11 +22,11 @@
\ifx\PSTnodesLoaded\endinput\else\input pst-3d.tex\fi
\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi
\ifx\PSTplotLoaded\endinput\else\input pst-plot.tex\fi% plotpoints
-\ifx\PSTVueTroisDLoaded\endinput\else\input pst-vue3d.tex\fi
+%\ifx\PSTVueTroisDLoaded\endinput\else\input pst-vue3d.tex\fi
\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
%
-\def\fileversion{1.63}
-\def\filedate{2005/02/19}
+\def\fileversion{1.72}
+\def\filedate{2006/02/07}
\message{`PST-3dplot' v\fileversion, \filedate\space (HV)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
@@ -63,12 +63,15 @@
\newif\ifPst@drawing% draw the coordinates?
\define@key[psset]{pst-3dplot}{drawing}[true]{\@nameuse{Pst@drawing#1}}
\newif\ifPst@drawCoor% draw the coordinates of a dot?
-\define@key[psset]{pst-3dplot}{drawCoor}[false]{\@nameuse{Pst@drawCoor#1}}
+\define@key[psset]{pst-3dplot}{drawCoor}[true]{\@nameuse{Pst@drawCoor#1}}
\newif\ifPst@hiddenLine% emulate hidden line surface?
-\define@key[psset]{pst-3dplot}{hiddenLine}[false]{\@nameuse{Pst@hiddenLine#1}}
+\define@key[psset]{pst-3dplot}{hiddenLine}[true]{\@nameuse{Pst@hiddenLine#1}}
\newif\ifPst@SphericalCoor% (r,phi,theta)
\define@key[psset]{pst-3dplot}{SphericalCoor}[true]{\@nameuse{Pst@SphericalCoor#1}}
-\psset{SphericalCoor=false}
+\psset[pst-3dplot]{SphericalCoor=false}
+\newif\ifPst@leftHanded% left-Handed coor?
+\define@key[psset]{pst-3dplot}{leftHanded}[true]{\@nameuse{Pst@leftHanded#1}}
+\psset[pst-3dplot]{leftHanded=false}
%
% ------- the global definitions for the pspicture frame ------
%
@@ -81,6 +84,12 @@
\define@key[psset]{pst-3dplot}{xThreeDunit}{\def\psk@ThreeDplot@xThreeDunit{#1}}
\define@key[psset]{pst-3dplot}{yThreeDunit}{\def\psk@ThreeDplot@yThreeDunit{#1}}
\define@key[psset]{pst-3dplot}{zThreeDunit}{\def\psk@ThreeDplot@zThreeDunit{#1}}
+\define@key[psset]{pst-3dplot}{deltax}{\def\psk@ThreeDplot@deltax{#1}}
+\define@key[psset]{pst-3dplot}{deltay}{\def\psk@ThreeDplot@deltay{#1}}
+\define@key[psset]{pst-3dplot}{deltaz}{\def\psk@ThreeDplot@deltaz{#1}}
+\define@key[psset]{pst-3dplot}{Deltax}{\def\psk@ThreeDplot@Deltax{#1}}
+\define@key[psset]{pst-3dplot}{Deltay}{\def\psk@ThreeDplot@Deltay{#1}}
+\define@key[psset]{pst-3dplot}{Deltaz}{\def\psk@ThreeDplot@Deltaz{#1}}
%
% -------------- the angles and the plotpoints -------------
%
@@ -90,6 +99,9 @@
\define@key[psset]{pst-3dplot}{RotY}{\def\psk@ThreeD@RotY{#1}}% y rotation
\define@key[psset]{pst-3dplot}{RotZ}{\def\psk@ThreeD@RotZ{#1}}% z
\define@key[psset]{pst-3dplot}{RotSequence}{\def\psk@ThreeD@RotS{#1}}%
+\define@key[psset]{pst-3dplot}{zCoor}{\def\psk@ThreeDplot@zCoor{#1}}
+\psset[pst-3dplot]{zCoor=0}
+%
\def\drawStyle@xLines{xLines}% 0
\def\drawStyle@yLines{yLines}% 1
\def\drawStyle@xyLines{xyLines}% 2
@@ -205,6 +217,7 @@
\psset[pst-3dplot]{%
drawing=true,hiddenLine=false,xMin=-1,xMax=4,yMin=-1,yMax=4,zMin=-1,zMax=4,%
xThreeDunit=1.0,yThreeDunit=1.0,zThreeDunit=1.0,Alpha=45,Beta=30,%
+ deltax=1,deltay=1,deltaz=1,Deltax=1,Deltay=1,Deltaz=1,%
RotX=0,RotY=0,RotZ=0,RotSequence=xyz,%
drawStyle=xLines,xPlotpoints=25,yPlotpoints=25,beginAngle=0,endAngle=360,%
linejoin=1,XO=0,YO=0,angleStep=1,posStart=0,length=2,arrowOffset=0,%
@@ -213,8 +226,10 @@
Dz=1,IIIDticks=false,IIIDxTicksPlane=xy,IIIDyTicksPlane=yz,IIIDzTicksPlane=yz,%
IIIDticksize=0.1,IIIDxticksep=-0.4,IIIDyticksep=-0.2,IIIDzticksep=0.2,
planecorr=off,%
- planeGrid=xy,planeGridOffset=0,subticks=10%
+ planeGrid=xy,planeGridOffset=0,subticks=10,
+ leftHanded=false%
}%
+ \def\pst@linetype{2}% to prevent an unknown linetyp with dash
}
\setDefaults
%
@@ -246,6 +261,7 @@
/M31 RotY sin neg def
/M32 RotX sin RotY cos mul def
/M33 RotX cos RotY cos mul def
+ /leftHanded \ifPst@leftHanded true \else false \fi def
}%
%
% (#1) -> #1 #2 #3
@@ -286,8 +302,8 @@
%
\def\pstThreeDCoor{\pst@object{pstThreeDCoor}}
\def\pstThreeDCoor@i{%
- \pst@killglue
- \begingroup
+ \pst@killglue%
+ \begingroup%
\addbefore@par{linewidth=0.5pt,linecolor=red,arrows=->,dotstyle=|}%
\use@par%
\pstThreeDNode(\psk@ThreeDplot@xMin,0,0){xMin}%
@@ -307,11 +323,15 @@
% \ifnum\psk@ThreeDplot@Alpha=90\else
\pst@dimx=\psk@ThreeDplot@xMax\p@%
\pst@dima=\psk@ThreeDplot@xThreeDunit\p@%
- \divide\pst@dimx by \pst@dima%
+ \pst@dima=\psk@ThreeDplot@deltax\pst@dima
+ \pst@dima=\pst@dima
+ \divide\pst@dimx by \pst@dima
\pst@cntx=\number\pst@dimx\advance\pst@cntx by -1%
\multido{%
+% \rA=\psk@ThreeDplot@Deltax+\psk@ThreeDplot@Deltax,% the label increment
\rA=\psk@Dx+\psk@Dx,%
- \rB=\psk@ThreeDplot@xThreeDunit+\psk@ThreeDplot@xThreeDunit}{\pst@cntx}{%
+ \rB=\psk@ThreeDplot@deltax+\psk@ThreeDplot@deltax}{\pst@cntx}{% the coor increment
+% \rB=\psk@ThreeDplot@xThreeDunit+\psk@ThreeDplot@xThreeDunit}{\pst@cntx}{%
\pstThreeDLine[arrows=-](\rB,-\psk@IIIDticksize,0)(\rB,\psk@IIIDticksize,0)%
\pstPlanePut[plane=\psk@IIIDxTicksPlane]%
(\rB,\psk@IIIDxticksep,0){\psxyzlabel{\rA}}%
@@ -369,7 +389,8 @@
\pstPlanePut[plane=\psk@IIIDzTicksPlane](0,\psk@IIIDzticksep,\rB){\psxyzlabel{\rA}}%
}%
\fi\fi%
- \endgroup\ignorespaces%
+ \endgroup%
+ \ignorespaces%
}
%
% planeGrids
@@ -400,25 +421,25 @@
\pst@cnty=\psk@ysubticks\advance\pst@cnty by \@ne
\psset{unit=1pt,planeGridOffset=\pst@dima}% we need everything in pt
\ifx\psk@planeGrid\ThreeDplot@planeXY
- \multido{\rA=#1+\strip@pt\pst@dx}{\pst@cntx}{%
+ \multido{\rA=\strip@pt\pst@dimz+\strip@pt\pst@dx}{\pst@cntx}{%
\pstThreeDLine(\rA,\strip@pt\pst@dimx,\psk@planeGridOffset)%
(\rA,\strip@pt\pst@dimy,\psk@planeGridOffset)}
- \multido{\rA=#2+\strip@pt\pst@dy}{\pst@cnty}{%
+ \multido{\rA=\strip@pt\pst@dimx+\strip@pt\pst@dy}{\pst@cnty}{%
\pstThreeDLine(\strip@pt\pst@dimz,\rA,\psk@planeGridOffset)%
(\strip@pt\pst@dimf,\rA,\psk@planeGridOffset)}
\else
\ifx\psk@planeGrid\ThreeDplot@planeXZ
- \multido{\rA=#1+\strip@pt\pst@dx}{\pst@cntx}{%
+ \multido{\rA=\strip@pt\pst@dimz+\strip@pt\pst@dx}{\pst@cntx}{%
\pstThreeDLine(\rA,\psk@planeGridOffset,\strip@pt\pst@dimx)%
(\rA,\psk@planeGridOffset,\strip@pt\pst@dimy)}
- \multido{\rA=#2+\strip@pt\pst@dy}{\pst@cnty}{%
+ \multido{\rA=\strip@pt\pst@dimx+\strip@pt\pst@dy}{\pst@cnty}{%
\pstThreeDLine(\strip@pt\pst@dimz,\psk@planeGridOffset,\rA)%
(\strip@pt\pst@dimf,\psk@planeGridOffset,\rA)}
\else
- \multido{\rA=#1+\strip@pt\pst@dx}{\pst@cntx}{%
+ \multido{\rA=\strip@pt\pst@dimz+\strip@pt\pst@dx}{\pst@cntx}{%
\pstThreeDLine(\psk@planeGridOffset,\rA,\strip@pt\pst@dimx)%
(\psk@planeGridOffset,\rA,\strip@pt\pst@dimy)}
- \multido{\rA=#2+\strip@pt\pst@dy}{\pst@cnty}{%
+ \multido{\rA=\strip@pt\pst@dimx+\strip@pt\pst@dy}{\pst@cnty}{%
\pstThreeDLine(\psk@planeGridOffset,\strip@pt\pst@dimz,\rA)%
(\psk@planeGridOffset,\strip@pt\pst@dimf,\rA)}
\fi
@@ -483,24 +504,24 @@
%
% set a 3d dot
%
-\def\pstThreeDDot{\@ifnextchar[{\pst@ThreeDDot}{\pst@ThreeDDot[]}}
-\def\pst@ThreeDDot[#1](#2,#3,#4){{%
- \pst@killglue
- \psset{linestyle=dashed,linewidth=0.5pt}% default
- \psset{#1}%
- \pstThreeDNode[#1](#2,#3,#4){A}%
+\def\pstThreeDDot{\pst@object{pst@ThreeDDot}}
+\def\pst@ThreeDDot@i(#1,#2,#3){%
+ \addbefore@par{linestyle=dashed,linewidth=0.5pt}% default
+% \typeout{\pst@par}
+ \begin@SpecialObj
+ \pstThreeDNode(#1,#2,#3){A}% we need the parameters
\ifx\psk@dotstyle\@none\else\psdots(A)\fi%
\ifPst@drawCoor%
\addto@pscode{
\pst@3ddict
\variablesIIID
\ifPst@SphericalCoor
- #2\space #3\space #4\space
+ #1\space #2\space #3\space
ConvertToCartesian
\else
- /x #2\space\psk@ThreeDplot@xThreeDunit\space mul def
- /y #3\space\psk@ThreeDplot@yThreeDunit\space mul def
- /z #4\space\psk@ThreeDplot@zThreeDunit\space mul def
+ /x #1\space\psk@ThreeDplot@xThreeDunit\space mul def
+ /y #2\space\psk@ThreeDplot@yThreeDunit\space mul def
+ /z #3\space\psk@ThreeDplot@zThreeDunit\space mul def
\fi
ConvertTo2D
x2D \pst@number\psxunit\space mul
@@ -533,9 +554,9 @@
\fi
end
}%
- \use@pscode%
- \fi%
-}\ignorespaces}
+ \fi%
+ \end@SpecialObj%
+ \ignorespaces}
%
% transform the 3d coordinates of the node (#1,#2,#3)
% into a 2d node with the name #4
@@ -578,10 +599,7 @@
%
% Trangle [options](Point1)(Point2)(Point3)
%
-\def\pstThreeDTriangle{\@ifnextchar[%
- {\do@ThreeDTriangle}%
- {\do@ThreeDTriangle[]}%
-}
+\def\pstThreeDTriangle{\@ifnextchar[{\do@ThreeDTriangle}{\do@ThreeDTriangle[]}}
\def\do@ThreeDTriangle[#1](#2)(#3)(#4){{%
\ifx#1\empty\else\psset{#1}\fi%
\ifPst@drawCoor%
@@ -624,16 +642,16 @@
\pstThreeDDot(\pst@tempa,\pst@tempb,\pst@tempc)%
}%
\fi%
- \getThreeDCoor{#1}\pst@tempa%
- \getThreeDCoor{#2}\pst@tempb%
- \getThreeDCoor{#3}\pst@tempc%
+ \getThreeDCoor{#1}\pst@tempA%
+ \getThreeDCoor{#2}\pst@tempB%
+ \getThreeDCoor{#3}\pst@tempC%
\begin@OpenObj
\addto@pscode{%
\pst@3ddict
\variablesIIID
- /P1 { \pst@tempa\space } def % x y z or Radius longitude lattitude
- /P2 { \pst@tempb\space } def %
- /P3 { \pst@tempc\space } def %
+ /P1 { \pst@tempA\space } def % x y z or Radius longitude lattitude
+ /P2 { \pst@tempB\space } def %
+ /P3 { \pst@tempC\space } def %
/SphericalCoor \ifPst@SphericalCoor true \else false \fi def %
/xUnit { \pst@number\psxunit\space mul } def
/yUnit { \pst@number\psyunit\space mul } def
@@ -692,16 +710,6 @@
\ignorespaces%
}
%
-% Sphere
-%
-\def\pstThreeDSphere{\@ifnextchar[{\pst@ThreeDSphere}{\pst@ThreeDSphere[]}}
-\def\pst@ThreeDSphere[#1](#2,#3,#4)#5{{%
- \psset{THETA=\psk@ThreeDplot@Beta,PHI=\psk@ThreeDplot@Beta,Dobs=10,Decran=10}%
- \psset{#1}%
- \pstThreeDNode(#2,#3,#4){SphereCenter}%
- \rput(SphereCenter){\SphereThreeD(0,0,0){#5}}%
-}\ignorespaces}
-%
% set a 3d ellipse/circle
%
% #1 options
@@ -713,26 +721,28 @@
\def\pstThreeDEllipse@i(#1)(#2)(#3){%
\addbefore@par{plotstyle=curve}%
\@nameuse{beginplot@\psplotstyle}%
- \getThreeDCoor{#1}\pst@tempc% center
- \getThreeDCoor{#2}\pst@tempa% a
- \getThreeDCoor{#3}\pst@tempb% b
+ \getThreeDCoor{#1}\pst@tempC% center
+ \getThreeDCoor{#2}\pst@tempA% a
+ \getThreeDCoor{#3}\pst@tempB% b
\addto@pscode{%
\pst@3ddict \variablesIIID end
\ifPst@SphericalCoor
- \pst@tempc\space \tx@ConvertToCartesian
+ \pst@tempC\space \tx@ConvertToCartesian
/zM \tx@Z def /yM \tx@Y def /xM \tx@X def % center
- \pst@tempa\space \tx@ConvertToCartesian
+ \pst@tempA\space \tx@ConvertToCartesian
/zA \tx@Z def /yA \tx@Y def /xA \tx@X def % a
- \pst@tempb\space \tx@ConvertToCartesian
+ \pst@tempB\space \tx@ConvertToCartesian
/zB \tx@Z def /yB \tx@Y def /xB \tx@X def % b
\else
- \pst@tempc\space /zM exch def /yM exch def /xM exch def % center
- \pst@tempa\space /zA exch def /yA exch def /xA exch def % a
- \pst@tempb\space /zB exch def /yB exch def /xB exch def % b
+ \pst@tempC\space /zM exch def /yM exch def /xM exch def % center
+ \pst@tempA\space /zA exch def /yA exch def /xA exch def % a
+ \pst@tempB\space /zB exch def /yB exch def /xB exch def % b
\fi
/aStart \psk@ThreeDplot@beginAngle\space def
- /aEnd \psk@ThreeDplot@endAngle\space dup aStart lt { 360 add } if def
- /da aEnd aStart sub \psk@plotpoints\space div abs def
+% /aEnd \psk@ThreeDplot@endAngle\space dup aStart lt { 360 add } if def
+% /da aEnd aStart sub \psk@plotpoints\space div abs def
+ /aEnd \psk@ThreeDplot@endAngle\space def
+ /da aEnd aStart sub \psk@plotpoints\space div def
/xyz {
xM xA angle cos mul add xB angle sin mul add
yM yA angle cos mul add yB angle sin mul add
@@ -777,6 +787,35 @@
\def\pstThreeDCircle{\pstThreeDEllipse}
\def\pstThreeDPlotFunc{\psplotThreeD}% only for compatibility
%
+%
+% cone[options](center){radius}{height}
+%
+\def\pstThreeDCone{\pst@object{pstThreeDCone}}
+\def\pstThreeDCone@i(#1)(#2)(#3)#4{{%
+ \pst@usepar
+ \pstThreeDEllipse(#1)(#2)(#3)%
+ \begin@OpenObj%
+ \getThreeDCoor{#1}\pst@tempA%
+ \getThreeDCoor{#2}\pst@tempB%
+ \getThreeDCoor{#3}\pst@tempC%
+ \addto@pscode{
+ \pst@3ddict
+ \variablesIIID
+ /xUnit { \pst@number\psxunit\space mul } def
+ /yUnit { \pst@number\psyunit\space mul } def
+ /SphericalCoor \ifPst@SphericalCoor true \else false \fi def %
+ /Center [ \pst@tempA\space SphericalCoor { ConvertToCartesian } if ] def % x y z or Radius longitude lattitude
+ Center aload pop saveCoor ConvertTo2D /xC x2D def /yC y2D def
+ /rA [ \pst@tempB \space SphericalCoor { ConvertToCartesian } if ] def
+ /rB [ \pst@tempC \space SphericalCoor { ConvertToCartesian } if ] def
+ rA rB AxB UnitVec #4 AmulC Center AaddB aload pop saveCoor ConvertTo2D /x2 x2D xUnit def /y2 y2D yUnit def
+ [ xC rA VecNorm add 90 Beta sub sin sub xUnit yC Beta sin add yUnit
+ x2 y2
+ xC rA VecNorm sub xUnit yC yUnit
+ \pst@cp\space \psline@iii\space \tx@Line\space }%
+ \end@OpenObj%
+}\ignorespaces}
+%
\def\pstRotNodeIIID{\pst@object{RotNodeIIID}}
\def\RotNodeIIID@i(#1,#2,#3)(#4,#5,#6)#7{%
\pst@killglue
@@ -801,6 +840,181 @@
\endgroup%
\ignorespaces}
%
+% Paraboloid (Idea is from Manuel ... )
+\newif\ifPstThreeDplot@showInside
+\define@key[psset]{pst-3dplot}{showInside}[true]{\@nameuse{PstThreeDplot@showInside@#1}}
+\define@key[psset]{pst-3dplot}{SegmentColor}{\pst@getcolor{#1}\psk@ThreeDplot@SegmentColor}
+\define@key[psset]{pst-3dplot}{increment}{\pst@getint{#1}\psk@ThreeDplot@increment}
+%\define@key[psset]{pst-3dplot}{CMYK}{\def\psk@ThreeDplot@CMYK{#1}}
+\define@key[psset]{pst-3dplot}{xyzLight}{\def\psk@ThreeDplot@xyzLight{#1}}
+\psset[pst-3dplot]{xyzLight=1 1 2,showInside=true,SegmentColor={[cmyk]{0.2,0.6,1,0}},increment=10}
+%
+\def\pstParaboloid{\pst@object{pstParaboloid}}
+\def\pstParaboloid@i#1#2{% #1:height #2:radius
+\addto@par{viewpoint=0 0 0}%
+\begin@SpecialObj%
+\addto@pscode{%
+ /height #1 def
+ /radius #2 #1 sqrt div def
+ /increment \psk@ThreeDplot@increment\space def
+ /cmyk {} def
+ /viewpoint {
+ \psk@viewpoint
+ \psk@ThreeDplot@Beta\space sin add 3 1 roll
+ \psk@ThreeDplot@Alpha\space cos add \psk@ThreeDplot@Beta\space cos mul 3 1 roll
+ \psk@ThreeDplot@Alpha\space sin add \psk@ThreeDplot@Beta\space cos mul 3 1 roll
+ } def
+ 0 viewpoint 0 \tx@SetMatrixThreeD
+ viewpoint /vZ ED /vY ED /vX ED
+ 1 setlinejoin
+ % les rayons de lumière
+ /xLight 1 def
+ /yLight 0.1 def
+ /zLight 0.2 def
+ % précision du tracé
+ /pas 0.5 def
+ /pas10 {pas 10 div} bind def
+%
+ /NormeLight {xLight dup mul yLight dup mul zLight dup mul add add sqrt} bind def
+% l'ellipse du plan de coupe : le contour
+ /calculate2DPoint { % four values on stack; x2D y2D are returned
+ /V0 ED /Z0 ED /U20 ED /U10 ED
+ U10 cos V0 mul radius mul \pst@number\psunit mul
+ U20 sin V0 mul radius mul \pst@number\psunit mul
+ Z0 \pst@number\psunit mul \tx@ProjThreeD
+ } def
+ /PlanCoupe {
+ /Z height store
+ /V {Z sqrt} bind def
+ /TableauxPoints [
+ 0 1 359 {
+ /U exch def [ U U Z V caclculate2DPoint ] % on décrit le cercle
+ } for
+ ] def
+ newpath
+ TableauxPoints 0 get aload pop moveto
+ 0 1 359 {
+ /compteur exch def
+ TableauxPoints compteur get aload pop
+ lineto } for
+ closepath
+ } def
+%
+ /facette {
+ newpath
+ U U Z V calculate2DPoint moveto
+ U 1 U increment add {%
+ /U1 exch def
+ U1 U1 Z V calculate2DPoint lineto
+ } for
+ Z pas10 Z pas add pas10 add{
+ /Z1 exch def
+ /V {Z1 sqrt} bind def
+ U1 U1 Z1 V calculate2DPoint lineto
+ } for
+ U increment add -1 U {%
+ /U2 exch def
+ U2 U2 Z pas add V calculate2DPoint lineto
+ } for
+ Z pas add pas10 sub pas10 neg Z pas10 sub{
+ /Z2 exch def
+ /V {Z2 abs sqrt} bind def
+ U U Z2 V calculate2DPoint lineto
+ } for
+ closepath
+ } def % facette
+%
+ /MaillageParaboloid {
+ 0 pas height pas sub{%
+ /Z ED
+ /V {Z sqrt} bind def
+ 0 increment 360 increment sub {%
+ /U exch def
+% Centre de la facette
+ /Ucentre {U increment 2 div add} bind def
+ /Vcentre {Z pas 2 div add sqrt} bind def
+% normale à la facette
+ /nXfacette {2 Vcentre dup mul mul Ucentre cos mul radius mul} bind def
+ /nYfacette {2 Vcentre dup mul mul Ucentre sin mul radius mul} bind def
+ /nZfacette {Vcentre neg radius dup mul mul} bind def
+ /NormeN {
+ nXfacette dup mul
+ nYfacette dup mul
+ nZfacette dup mul
+ add add sqrt} bind def
+ NormeN 0 eq {/NormeN 1e-10 def} if
+% test de visibilité
+ /PSfacette vX nXfacette mul
+ vY nYfacette mul add
+ vZ nZfacette mul add def
+ condition {
+ facette
+ /cosV {1 xLight nXfacette mul
+ yLight nYfacette mul
+ zLight nZfacette mul
+ add add
+ NormeLight
+ NormeN mul div sub} bind def
+ \psk@ThreeDplot@SegmentColor\space
+ cosV mul 4 1 roll cosV mul 4 1 roll cosV dup mul mul 4 1 roll cosV dup mul mul 4 1 roll
+ setcmykcolor fill
+ 0 setgray
+ facette
+ stroke
+ } if
+ } for
+ } for
+ } def
+ /conditionGE { PSfacette 0 ge } def
+ /conditionLE { PSfacette 0 le } def
+ \ifPstThreeDplot@showInside
+ /condition { conditionGE } def
+ MaillageParaboloid
+ vZ 0 ge {
+ PlanCoupe 1 0.5 0.5 setrgbcolor fill
+ PlanCoupe 0 setgray stroke } if
+ \else
+ /condition { conditionLE } def
+ MaillageParaboloid
+ /condition { conditionGE } def
+ MaillageParaboloid
+ \fi
+}%
+% fin du code ps
+ \showpointsfalse%
+ \end@SpecialObj%
+\ignorespaces}
+%
+% Sphere
+% the new one
+\def\pstThreeDSphere{\pst@object{pstSphereIIID}}
+\def\pstSphereIIID@i(#1,#2,#3)#4{% #1:origin (x,y,z) #2:radius
+\addto@par{viewpoint=0 0 0}% to make it compatible with pst-3dplot
+\begin@SpecialObj%
+\addto@pscode{%
+ /viewpoint {% to make it compatible with parallel projection
+ \psk@viewpoint
+ \psk@ThreeDplot@Beta\space sin add 3 1 roll
+ \psk@ThreeDplot@Alpha\space cos add \psk@ThreeDplot@Beta\space cos mul 3 1 roll
+ \psk@ThreeDplot@Alpha\space sin add \psk@ThreeDplot@Beta\space cos mul 3 1 roll
+ } def
+ 0 viewpoint 0 \tx@SetMatrixThreeD
+ viewpoint /vZ ED /vY ED /vX ED
+% on stack must be
+% x y z Radius increment C M Y K x y zLight
+ #1 \pst@number\psunit mul #2 \pst@number\psunit mul #3 \pst@number\psunit mul
+ #4 \pst@number\psunit mul
+ \psk@ThreeDplot@increment\space
+ /cmyk {} def % we need only the values
+ \psk@ThreeDplot@SegmentColor\space
+% \psk@ThreeDplot@CMYK\space % CMYK
+ \psk@ThreeDplot@xyzLight\space % xLight yLight zLight
+ tx@3DPlotDict begin MaillageSphere end
+}% fin du code ps
+ \showpointsfalse%
+ \end@SpecialObj%
+\ignorespaces}
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\def\psplotinit#1{\xdef\psplot@init{#1 }}
@@ -844,9 +1058,12 @@
/dy y1 y sub \psk@ThreeDplot@yPlotpoints\space dup 0 gt {div}{pop} ifelse def
/func {#5} def
/xyz {
- x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
- x Alpha sin mul y Alpha cos mul add neg Beta sin mul
- func Beta cos mul add \pst@number\psyunit mul} def
+ x neg Alpha cos mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha sin mul add \pst@number\psxunit mul
+ x Alpha sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha cos mul add neg Beta sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { \psk@ThreeDplot@zCoor }{ func } ifelse
+ Beta cos mul add \pst@number\psyunit mul} def
}%
\psplotThreeD@xLines@ii
\else% curves
@@ -864,9 +1081,15 @@
/y #3\space \n@Y\space dy mul add def
/func {#5} def
/xyz {
- x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
- x Alpha sin mul y Alpha cos mul add neg Beta sin mul
- func Beta cos mul add \pst@number\psyunit mul} def
+ x neg Alpha cos mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha sin mul add \pst@number\psxunit mul
+ x Alpha sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha cos mul add neg Beta sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { \psk@ThreeDplot@zCoor }{ func } ifelse
+ Beta cos mul add \pst@number\psyunit mul} def
+% x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
+% x Alpha sin mul y Alpha cos mul add neg Beta sin mul
+% func Beta cos mul add \pst@number\psyunit mul} def
}%
\psplotThreeD@xLines@iii%
\ifPst@hiddenLine }\fi%
@@ -932,9 +1155,15 @@
/dy y1 y sub \psk@ThreeDplot@yPlotpoints\space dup 0 gt {div}{pop} ifelse def
/func {#5} def
/xyz {
- x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
- x Alpha sin mul y Alpha cos mul add neg Beta sin mul
- func Beta cos mul add \pst@number\psyunit mul} def
+ x neg Alpha cos mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha sin mul add \pst@number\psxunit mul
+ x Alpha sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha cos mul add neg Beta sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { \psk@ThreeDplot@zCoor }{ func } ifelse
+ Beta cos mul add \pst@number\psyunit mul} def
+% x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
+% x Alpha sin mul y Alpha cos mul add neg Beta sin mul
+% func Beta cos mul add \pst@number\psyunit mul} def
}%
\psplotThreeD@yLines@ii
\else% curves
@@ -952,9 +1181,15 @@
/x #1\space \n@X\space dx mul add def
/func {#5} def
/xyz {
- x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
- x Alpha sin mul y Alpha cos mul add neg Beta sin mul
- func Beta cos mul add \pst@number\psyunit mul} def
+ x neg Alpha cos mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha sin mul add \pst@number\psxunit mul
+ x Alpha sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { func }{ y } ifelse Alpha cos mul add neg Beta sin mul
+ \psk@ThreeDplot@zCoor\space 0 gt { \psk@ThreeDplot@zCoor }{ func } ifelse
+ Beta cos mul add \pst@number\psyunit mul} def
+% x neg Alpha cos mul y Alpha sin mul add \pst@number\psxunit mul
+% x Alpha sin mul y Alpha cos mul add neg Beta sin mul
+% func Beta cos mul add \pst@number\psyunit mul} def
}%
\psplotThreeD@yLines@iii%
\ifPst@hiddenLine }\fi%
@@ -1578,16 +1813,82 @@
%
\let\pstDiv\pst@divide
%
+\chardef\nin@ty=90% stolen from the trig.sty package by David Carlisle
+\chardef\@clxx=180
+\chardef\@lxxi=71
+\mathchardef\@mmmmlxviii=4068
+\chardef\@coeffz=72
+\chardef\@coefb=42
+\mathchardef\@coefc=840
+\mathchardef\@coefd=5040
+{\catcode`t=12\catcode`p=12\gdef\noPT#1pt{#1}}
+\def\TG@rem@pt#1{\expandafter\noPT\the#1\space}
+\def\TG@term#1{%
+ \dimen@\@tempb\dimen@
+ \advance\dimen@ #1\p@}
+\def\TG@series{%
+ \dimen@\@lxxi\dimen@
+ \divide \dimen@ \@mmmmlxviii
+ \edef\@tempa{\TG@rem@pt\dimen@}%
+ \dimen@\@tempa\dimen@
+ \edef\@tempb{\TG@rem@pt\dimen@}%
+ \divide\dimen@\@coeffz
+ \advance\dimen@\m@ne\p@
+ \TG@term\@coefb
+ \TG@term{-\@coefc}%
+ \TG@term\@coefd
+ \dimen@\@tempa\dimen@
+ \divide\dimen@ \@coefd}
+\def\CalculateSin#1{{%
+ \expandafter\ifx\csname sin(\number#1)\endcsname\relax
+ \dimen@=#1\p@\TG@@sin
+ \expandafter\xdef\csname sin(\number#1)\endcsname
+ {\TG@rem@pt\dimen@}%
+ \fi}}
+\def\CalculateCos#1{{%
+ \expandafter\ifx\csname cos(\number#1)\endcsname\relax
+ \dimen@=\nin@ty\p@
+ \advance\dimen@-#1\p@
+ \TG@@sin
+ \expandafter\xdef\csname cos(\number#1)\endcsname
+ {\TG@rem@pt\dimen@}%
+ \fi}}
+\def\TG@reduce#1#2{%
+\dimen@#1#2\nin@ty\p@
+ \advance\dimen@#2-\@clxx\p@
+ \dimen@-\dimen@
+ \TG@@sin}
+\def\TG@@sin{%
+ \ifdim\TG@reduce>+%
+ \else\ifdim\TG@reduce<-%
+ \else\TG@series\fi\fi}%
+\def\UseSin#1{\csname sin(\number#1)\endcsname}
+\def\UseCos#1{\csname cos(\number#1)\endcsname}
+\chardef\z@num\z@
+\expandafter\let\csname sin(0)\endcsname\z@num
+\expandafter\let\csname cos(0)\endcsname\@ne
+\expandafter\let\csname sin(90)\endcsname\@ne
+\expandafter\let\csname cos(90)\endcsname\z@num
+\expandafter\let\csname sin(-90)\endcsname\m@ne
+\expandafter\let\csname cos(-90)\endcsname\z@num
+\expandafter\let\csname sin(180)\endcsname\z@num
+\expandafter\let\csname cos(180)\endcsname\m@ne
+
% A macro for sin cos values
% \pstSinCos{30}\SinVal\CosVal ==> \SinVal 0.5 \CosVal 0.86
%
\def\pstSinCos#1#2#3{%
-\begingroup%
- \pst@getsinandcos{#1}
- \edef\pst@values{\endgroup%
- \def\noexpand#2{\ifcase\pst@quadrant\or\or-\or-\fi\pst@sin}%
- \def\noexpand#3{\ifcase\pst@quadrant\or-\or-\or\fi\pst@cos}}\pst@values%
+%\begingroup%
+% \pst@getsinandcos{#1}
+% \edef\pst@values{\endgroup%
+% \def\noexpand#2{\ifcase\pst@quadrant\or\or-\or-\fi\pst@sin}%
+% \def\noexpand#3{\ifcase\pst@quadrant\or-\or-\or\fi\pst@cos}}\pst@values%
+ \CalculateSin#1
+ \CalculateCos#1
+ \edef#2{\UseSin#1}%
+ \edef#3{\UseCos#1}%
}
+%
\def\pstRotPointIIID{\pst@object{RotPointIIID}}% A real TeX solution
\def\RotPointIIID@i(#1,#2,#3)#4#5#6{%
\pst@killglue%
@@ -1606,11 +1907,11 @@
\pstSinCos{\psk@ThreeD@RotY}\pst@sinTheta\pst@cosTheta
\pstMul{\pst@xVala}{\pst@cosTheta}\pst@tempA
\pstMul{\pst@zVala}{\pst@sinTheta}\pst@tempB
- \pstSub{\pst@tempA}{\pst@tempB}\pst@xValb
+ \pstAdd{\pst@tempA}{\pst@tempB}\pst@xValb
\let\pst@yValb\pst@yVala
\pstMul{\pst@xVala}{\pst@sinTheta}\pst@tempA
\pstMul{\pst@zVala}{\pst@cosTheta}\pst@tempB
- \pstAdd{\pst@tempA}{\pst@tempB}\pst@zValb
+ \pstSub{\pst@tempB}{\pst@tempA}\pst@zValb
% z- axis
\pstSinCos{\psk@ThreeD@RotZ}\pst@sinTheta\pst@cosTheta
\pstMul{\pst@xValb}{\pst@cosTheta}\pst@tempA
diff --git a/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty b/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty
index 3ad092c023a..23c451d5d20 100644
--- a/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty
+++ b/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty
@@ -1,7 +1,8 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-3dplot}[2004/07/15 package wrapper for
+\ProvidesPackage{pst-3dplot}[2006/02/07 package wrapper for
pst-3dplot.tex (hv)]
\input{pst-3dplot.tex}
+\IfFileExists{pst-3dplot.pro}{\@addtofilelist{pst-3dplot.pro}}{}%
\ProvidesFile{pst-3dplot.tex}
[\filedate\space v\fileversion\space `PST-3dplot' (hv)]
\endinput
diff --git a/Master/texmf-dist/tpm/pst-3dplot.tpm b/Master/texmf-dist/tpm/pst-3dplot.tpm
index c413dce3a26..4917049176b 100644
--- a/Master/texmf-dist/tpm/pst-3dplot.tpm
+++ b/Master/texmf-dist/tpm/pst-3dplot.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/pst-3dplot.zip">
<TPM:Name>pst-3dplot</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/01/09 00:56:57</TPM:Date>
+ <TPM:Date>2006/02/07 19:15:41</TPM:Date>
<TPM:Version>1.1</TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>Draw 3d curves and graphs using PSTricks.</TPM:Title>
@@ -20,13 +20,13 @@ its command argument decoding.
<TPM:Author>Herbert Voss</TPM:Author>
<TPM:Size>2562090</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="60106">
+ <TPM:RunFiles size="75503">
texmf-dist/dvips/pst-3dplot/pst-3dplot.pro
texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex
texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty
texmf-dist/tpm/pst-3dplot.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="2501984">
+ <TPM:DocFiles size="2787236">
texmf-dist/doc/generic/pst-3dplot/Changes
texmf-dist/doc/generic/pst-3dplot/README
texmf-dist/doc/generic/pst-3dplot/doc/data3D.Roessler