From c2f8ac41e588904a397b2648a31712eae01c942f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 2 Apr 2007 18:59:04 +0000 Subject: pst-vue3d (26mar07) git-svn-id: svn://tug.org/texlive/trunk@4098 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-vue3d/Changes | 10 +- Master/texmf-dist/doc/generic/pst-vue3d/README | 48 +- .../doc/generic/pst-vue3d/examples/ChaiseDemo.pdf | Bin 4667 -> 0 bytes .../doc/generic/pst-vue3d/examples/ChaiseDemo.tex | 36 - .../doc/generic/pst-vue3d/examples/CoorDemo.pdf | Bin 3737 -> 0 bytes .../doc/generic/pst-vue3d/examples/CoorDemo.tex | 25 - .../doc/generic/pst-vue3d/examples/FrameDemo.pdf | Bin 6799 -> 0 bytes .../doc/generic/pst-vue3d/examples/FrameDemo.tex | 58 - .../doc/generic/pst-vue3d/examples/Line3d.pdf | Bin 152459 -> 0 bytes .../doc/generic/pst-vue3d/examples/Line3d.tex | 66 - .../doc/generic/pst-vue3d/examples/PontDemo.pdf | Bin 37426 -> 0 bytes .../doc/generic/pst-vue3d/examples/PontDemo.tex | 69 - .../doc/generic/pst-vue3d/examples/PontDemo2.pdf | Bin 251664 -> 0 bytes .../doc/generic/pst-vue3d/examples/PontDemo2.tex | 173 -- .../doc/generic/pst-vue3d/examples/PontDemo3.pdf | Bin 119962 -> 0 bytes .../doc/generic/pst-vue3d/examples/PontDemo3.tex | 170 -- .../doc/generic/pst-vue3d/examples/PyramidDemo.pdf | Bin 2148 -> 0 bytes .../doc/generic/pst-vue3d/examples/PyramidDemo.tex | 17 - .../doc/generic/pst-vue3d/examples/SphereDemo0.pdf | Bin 196799 -> 0 bytes .../doc/generic/pst-vue3d/examples/SphereDemo0.tex | 57 - .../doc/generic/pst-vue3d/pst-vue3d-doc.bib | 129 ++ .../doc/generic/pst-vue3d/pst-vue3d-doc.pdf | Bin 0 -> 4588365 bytes .../doc/generic/pst-vue3d/pst-vue3d-doc.tex | 1266 ++++++++++++ .../texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex | 1260 ------------ Master/texmf-dist/dvips/pst-vue3d/3D.pro | 2089 ------------------- Master/texmf-dist/dvips/pst-vue3d/pst-vue3d.pro | 2092 ++++++++++++++++++++ .../texmf-dist/source/generic/pst-vue3d/Makefile | 48 + .../texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex | 200 +- .../texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty | 7 +- Master/texmf-dist/tpm/pst-vue3d.tpm | 31 +- 30 files changed, 3783 insertions(+), 4068 deletions(-) delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex create mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.bib create mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.tex delete mode 100644 Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex delete mode 100644 Master/texmf-dist/dvips/pst-vue3d/3D.pro create mode 100644 Master/texmf-dist/dvips/pst-vue3d/pst-vue3d.pro create mode 100644 Master/texmf-dist/source/generic/pst-vue3d/Makefile (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/Changes b/Master/texmf-dist/doc/generic/pst-vue3d/Changes index 9e28d9dbd0c..350622c0f7d 100644 --- a/Master/texmf-dist/doc/generic/pst-vue3d/Changes +++ b/Master/texmf-dist/doc/generic/pst-vue3d/Changes @@ -1,10 +1,13 @@ +----- pst-vue3d.tex +1.23 2007-03-26 hv: load pst-vue3d.pro instead of 3d.pro +1.22 2005-05-10 hv: make the unit option available 1.21 2005-02-21 hv: use always pst-xkey and using \def instead of \edef for the parameter definitions 1.2 2004-09-12 hv: use always \pst@object for the definition of the 3d objects 1.1 2004-08-23 hv: use the default macro style of pstricks 1.0i 2004-06-05 hv: fixed bug -1.0h 2004-01-05 ml: added dedecaedron +1.0h 2004-01-05 ml: added dodecaedron 1.0g 2003-12-21 hv: fixed a bug in \pNodeThreeD 1.0f 2003-12-20 hv: added two eye macros, drop the options for CX,CY,CZ and Xorigine,... @@ -12,3 +15,8 @@ macros to use it 1.0e 2003-12-18 hv: edit the \AxesThreeD macro 1.0d 2003-12-18 hv: fix bug in truncated pyramid + + +----- pst-vue3d.pro +33 2007-03-26 hv: renamed to pst-vue3d.pro +32 2005-05-10 hv: make the unit option available diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/README b/Master/texmf-dist/doc/generic/pst-vue3d/README index 5fb550e90c1..12ea4dd201d 100644 --- a/Master/texmf-dist/doc/generic/pst-vue3d/README +++ b/Master/texmf-dist/doc/generic/pst-vue3d/README @@ -1,16 +1,48 @@ %% Package `pst-vue3d.tex' %% -%% 2005-02-21 +%% Herbert Voss (Germany) %% +%% 2007-03-26 +%% + +PSTricks offers excellent macros to insert more or less complex +graphics into a document. pstricks.tex itself is the base for several +other additional packages, which are mostly named pst-xxxx, +like pst-vue3d. There exists several packages for plotting three +dimensional graphical objects. pst-vue3d is similiar to the +pst-plot package for two dimensional objects and mathematical functions. + Save the files -pst-vue3.sty -pst-vue3.tex -3d.pro -> texmf/dvips/pstricks/ +pst-vue3d.sty +pst-vue3d.tex +pst-vue3d.pro in any place, where latex or any other TeX program will find it. -Pay attention, that you cannot run the documentation with -pdflatex, PSTricks is PosTScript Tricks. -Use latex->dvips->ps2pdf or have a look at -http://PSTricks.de/pdf/pdfoutput.phtml \ No newline at end of file +The pro file should go into $TEXMF$/dvips/pstricks/. + +pst-vue3d uses the extended version of the keyval package. So +be sure that you +- have installed xkeyval with the special pst-xkey + (CTAN: tex-archive/macros/latex/contrib/xkeyval/) +- do not load another package after pst-vue3d, which loads + the old keyval.sty or pst-key.tex + + +If you like to get the documentation file in another format run + +latex pst-vue3d-doc.tex +bibtex pst-vue3d.doc +latex pst-vue3d-doc.tex +dvips pst-vue3d-doc.dvi + +to get a PostScript file. But pay attention, that the pst-vue3d +files are saved in the above mentioned way, before you run +latex on the documentation file. + +The intermediate DVI file works only with viewers which can +interprete the embedded PostScript code. + +For another PDF output read the Introduction from +the documentation. diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf deleted file mode 100644 index 426b0741a34..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex deleted file mode 100644 index 8cca398d509..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex +++ /dev/null @@ -1,36 +0,0 @@ -\documentclass[a4paper]{article} -\usepackage{geometry} -\parindent=0pt -\usepackage{pstricks,pst-vue3d} -% -\definecolor{marron}{rgb}{1,0.55,0} -\def\Sol{% - \psset{normaleLongitude=90,normaleLatitude=90} - \FrameThreeD[fillcolor=lightgray,fillstyle=solid](0,0,-2)(2,-2)(-2,2) - \QuadrillageThreeD[grille=.5,linecolor=red](0,0,-2)(-2,-2)(2,2)% - \QuadrillageThreeD[grille=0.75,linecolor=cyan](0,0,-2)(-2,-2)(2,2)% -} -\def\chaise{% - \FrameThreeD[normaleLatitude=0,normaleLongitude=0,% - fillcolor=marron,fillstyle=solid](-0.8,1,2)(0.2,0)(1.8,1) - \CubeThreeD[A=.1,B=0.1,C=0.9](0.9,-0.9,-1.1) - \CubeThreeD[A=.1,B=0.1,C=0.9](0.9,0.9,-1.1) - \CubeThreeD[A=.1,B=0.1,C=2](-0.9,0.9,0) - \CubeThreeD[A=.1,B=0.1,C=2](-0.9,-0.9,0) - \CubeThreeD[A=0.9,B=1,C=0.1](0.1,0,-0.1) -} -\begin{document} - -\begin{center} - \begin{pspicture}(-5.5,-7)(5,4.5) - \psset{THETA=30,PHI=20,Dobs=10,Decran=20} - \Sol\chaise - \pNodeThreeD(-0.5,-0.3,0){littleChair} - \rput[lC](littleChair){% - \psset{THETA=30,PHI=20,Dobs=100,Decran=20} - \Sol\chaise% - } - \end{pspicture} -\end{center} - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf deleted file mode 100644 index aef6fe88b44..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex deleted file mode 100644 index 11a009fb95d..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex +++ /dev/null @@ -1,25 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{pstricks} -\usepackage{pst-vue3d} -\SpecialCoor -\makeatletter -% -\makeatother -\begin{document} - -\psset{unit=3} -\begin{pspicture}(-1.5,-0.75)(2.5,2.25) - \AxesThreeD(20) - \pNodeThreeD(15,18,15){P}% cartesian - \uput[0](P){P} - \psset{linecolor=red} - \qdisk(P){3pt} - \showCoorThreeD[linecolor=red](15,18,15) - \psset{linecolor=blue} - \pNodeThreeD(20;60;40){Q}% spherical - \uput[0](Q){Q} - \qdisk(Q){3pt} - \showCoorThreeD[linecolor=blue](20;60;40) -\end{pspicture} - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf deleted file mode 100644 index 3c64334088c..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex deleted file mode 100644 index b21e6794ccf..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex +++ /dev/null @@ -1,58 +0,0 @@ -\documentclass[12pt]{article} % Herbert Voss 2003-12-20 -\usepackage{pst-vue3d,multido} -\begin{document} - -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\FrameThreeD[% - normaleLatitude=0,% - normaleLongitude=0,% - fillcolor=green,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture}% -} -\hfill -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\FrameThreeD[% - normaleLatitude=90,% - normaleLongitude=0,% - fillcolor=green,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture}% -}% -\hfill -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\FrameThreeD[% - normaleLatitude=0,% - normaleLongitude=90,% - fillcolor=green,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture} -} - - - -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\psset{normaleLatitude=0,normaleLongitude=0,linewidth=0.5pt} -\FrameThreeD[fillcolor=cyan,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\QuadrillageThreeD[grille=2.5,linecolor=black,pas=5](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture}% -} -\hfill -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\psset{normaleLatitude=90,normaleLongitude=0,linewidth=0.5pt} -\FrameThreeD[fillcolor=cyan,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\QuadrillageThreeD[grille=2.5,linecolor=black](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture}% -}% -\hfill -\fbox{\begin{pspicture}(-1.3,-0.75)(2,1.1) -\psset{normaleLatitude=0,normaleLongitude=90,linewidth=0.5pt} -\FrameThreeD[fillcolor=cyan,fillstyle=solid](0,0,0)(-10,-5)(10,5)% -\QuadrillageThreeD[grille=2.5,linecolor=black](0,0,0)(-10,-5)(10,5)% -\AxesThreeD[linecolor=red](20,15,10) -\end{pspicture} -} - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf deleted file mode 100644 index ae2b3652466..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex deleted file mode 100644 index 1796dd659f8..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex +++ /dev/null @@ -1,66 +0,0 @@ -\documentclass[12pt,a4paper]{article} -\usepackage{pstricks} -\usepackage{pst-vue3d} -\usepackage{multido} -\usepackage{geometry} -% -\begin{document} - - \psset{unit=1cm} - \begin{pspicture}(-3,-3)(3,4) - \psset{THETA=70,PHI=30,Dobs=150,Decran=10} - \AxesThreeD[linecolor=red,linestyle=dashed](50,60,50) - \pNodeThreeD(25,-25,25){A} - \pNodeThreeD(25,25,25){B} - \pNodeThreeD(25,25,-25){C} - \pNodeThreeD(25,-25,-25){D} - \pNodeThreeD(-25,-25,25){E} - \pNodeThreeD(-25,25,25){F} - \pNodeThreeD(-25,25,-25){G} - \pNodeThreeD(-25,-25,-25){H} - \pspolygon(A)(B)(C)(D) - \pspolygon(E)(F)(G)(H) - \psline(A)(E) - \psline(B)(F) - \psline(C)(G) - \psline(D)(H) - \psset{linestyle=dashed} - \psline(A)(G) - \psline(B)(H) - \psline(C)(E) - \psline(D)(F) -% routine page 49 in "présentation de PSTricks" -% D.Girou "cahier 16 Gutengerg" - \newcounter{lettre} - \multido{\i=1+1}{8}{% - \setcounter{lettre}{\i} - \psdot[linecolor=red](\Alph{lettre}) - \uput[90](\Alph{lettre}){\Alph{lettre}} - } -\end{pspicture} - - - - \begin{pspicture}(-2.5,-3.5)(3.5,1.5) - \psset{THETA=50,PHI=50,Dobs=250,Decran=10} - \multido{\iX=-70+10}{15}{% - \pNodeThreeD(\iX,0,0){X1} - \pNodeThreeD(\iX,50,0){X2} - \psline(X1)(X2) - } - \multido{\iY=0+10}{6}{% - \pNodeThreeD(-70,\iY,0){Y1} - \pNodeThreeD(70,\iY,0){Y2} - \psline(Y1)(Y2)% - } - \psset{normaleLongitude=0,normaleLatitude=90} - \multido{\iXorigine=-65+10}{14}{% - \multido{\iYorigine=5+10}{5}{% - \CircleThreeD[linecolor=red](\iXorigine,\iYorigine,0){5}% - }% - } - \end{pspicture}% - - - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf deleted file mode 100644 index e82f795d86e..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex deleted file mode 100644 index 1e0608c2b11..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex +++ /dev/null @@ -1,69 +0,0 @@ -\documentclass[a4paper]{article} -\usepackage{geometry} -\parindent=0pt -\usepackage{pstricks,pst-grad,multido,pst-plot,pst-vue3d} -% -\input realcalc -% -\psset{dimen=middle} -\newcommand{\cables}{% - \multido{\iY=-2+4}{2}{% - \parametricplot[linewidth=3\pslinewidth]{-5}{5}{% - \variablesTroisD - /Xabscisse t def - /Yordonnee \iY\space def - /Zcote 0.1 Xabscisse dup mul mul def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \multido{\nCable=-4.5+0.5}{20}{% - \Rmul\cote\nCable\nCable - \Rmul\cote\cote{0.1} - \LineThreeD(\nCable,\iY,\cote)(\nCable,\iY,0) - }% - }% - \LineThreeD[linewidth=3\pslinewidth](-9,-2,0)(-5,-2,2.5) - \LineThreeD[linewidth=3\pslinewidth](9,-2,0)(5,-2,2.5) - \LineThreeD[linewidth=3\pslinewidth](-9,2,0)(-5,2,2.5) - \LineThreeD[linewidth=3\pslinewidth](9,2,0)(5,2,2.5) -} -\def\bridge(#1)(#2){{% -\begin{pspicture}(#1)(#2) - \FrameThreeD[normaleLongitude=90,normaleLatitude=90,% the river - linestyle=none,fillstyle=gradient,gradbegin=white,% - gradend=blue,gradangle=45](0,0,-2)(-4,-9)(4,9) - {\psset{fracHeight=0.62, fillstyle=solid, % - ColorFaceA=lightgray,ColorFaceB=gray} - \PyramideThreeD[A=.4,B=.4,C=.4](-5,-2,-2){7}% Bridge - \PyramideThreeD[A=.5,B=.5,C=.5](5,-2,-2){7}} - \CubeThreeD[normaleLongitude=90,% the street - normaleLatitude=90,fillstyle=solid,A=9,B=2,C=0.05](0,0,0) - \multido{\nL=-8.8+0.2}{89}{% - \LineThreeD[linecolor=lightgray](\nL,-2,0)(\nL,2,0) - } - \AxesThreeD[linestyle=dashed,arrowsize=0.2,linecolor=red](6) - \cables - \psset{fracHeight=0.62, fillstyle=solid, % - ColorFaceA=lightgray,ColorFaceB=gray} - \PyramideThreeD[A=.4,B=.4,C=.4](-5,2,-2){7}% Bridge - \PyramideThreeD[A=.5,B=.5,C=.5](5,2,-2){7} -\end{pspicture} -}} - -\begin{document} -\begin{center} -\psset{PHI=30,THETA=45,Dobs=15,Decran=10} -\bridge(-7.5,-8.5)(7.5,4.5) - -\clearpage -\makebox[\linewidth]{ -\psset{PHI=0,THETA=0,Dobs=15} -\bridge(-8,-2.5)(8,4.25) -} - -\psset{PHI=90,THETA=0,Dobs=15} -\bridge(-5,-6)(5,6) -\end{center} -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf deleted file mode 100644 index 51d99979148..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex deleted file mode 100644 index 8e59c4abcb2..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex +++ /dev/null @@ -1,173 +0,0 @@ -\documentclass[a4paper]{article} -% Manuel Luque -% Herbert Voss - 2003/12/20 -\usepackage{pstricks} -\usepackage{pst-node} -\usepackage{pst-plot} -\usepackage{pst-grad} -\usepackage{pst-vue3d} - -\input random - -\definecolor{pelouse}{cmyk}{0.14,0.42,0.56,0} -\definecolor{base}{rgb}{1,0.8,0} -\newpsstyle{surface}{fillstyle=vlines,hatchcolor=marron,% - hatchwidth=0.2\pslinewidth,hatchsep=1\pslinewidth} -\newpsstyle{sol}{fillstyle=vlines,hatchcolor=lightgray,% - hatchwidth=0.2\pslinewidth,hatchsep=1\pslinewidth} -\SpecialCoor - -\def\fleuve{% - \FrameThreeD[normaleLatitude=90,normaleLongitude=90,% - linestyle=none,fillstyle=gradient,% - gradbegin=blue,gradend=white](0,0,-2.5)(-12,-14)(12,14) -} -\newcommand{\tablier}{% - \FrameThreeD[normaleLatitude=90,normaleLongitude=90,% - linestyle=none,fillstyle=gradient,% - gradbegin=blue,gradend=white](0,0,0)(-\Xcinf,-2)(\Xcinf,2)% - \multido{\nL=-\Xcinf+0.2}{196}{% - \LineThreeD[linecolor=lightgray](\nL,-2,0)(\nL,2,0)% - }% -} -\newcommand\rembardes{% - \multido{\iY=-2+4}{2}{% - \LineThreeD[linecolor=red](-\Xcinf,\iY,0.5)(\Xcinf,\iY,0.5) - \multido{\rX=-\Xcinf+0.4}{98}{% - \LineThreeD[linecolor=red](\rX,\iY,0)(\rX,\iY,0.5)% - }% - }% -} -\newcommand\bases{% - \multido{\iYpos=-2+4}{2}{% - \multido{\rXpos=-\Xc+\twoXc}{2}{% - \parametricplot[fillstyle=solid,fillcolor=base]{0}{360}{% - /Xabscisse t cos 1.5 mul \rXpos\space add def - /Zcote -2.5 def - /Yordonnee t sin 1.5 mul \iYpos\space add def - tx@3DDict begin - formulesTroisD - Xi Yi - end - }% - }% - }% -} -\newcommand\Berges{% - \pNodeThreeD(-\Xcinf,-14,-2){B1} - \pNodeThreeD(-12,-14,-2.5){B2} - \pNodeThreeD(-\Xcinf,14,-2){B4} - \pNodeThreeD(-12,14,-2.5){B3} - \pspolygon[fillstyle=solid,fillcolor=pelouse](B1)(B2)(B3)(B4) - \pNodeThreeD(\Xcinf,-14,-2){B1} - \pNodeThreeD(12,-14,-2.5){B2} - \pNodeThreeD(\Xcinf,14,-2){B4} - \pNodeThreeD(12,14,-2.5){B3} - \pspolygon[fillstyle=solid,fillcolor=pelouse](B1)(B2)(B3)(B4)% -} -\pagestyle{empty} - -\def\Radius{14} -\def\Xc{6.5} -\newdimen\tempXc -\tempXc=\Xc pt -\multiply\tempXc by 3 -\def\Xcinf{\pointless\tempXc} -\newdimen\temptwoXc -\temptwoXc=\Xc pt -\multiply\temptwoXc by 2 -\def\twoXc{\pointless\temptwoXc} - -\begin{document} - -\psset{PHI=40,THETA=-70,Dobs=30,Decran=8} - -\begin{pspicture}(-8,-10)(15,10) -\pNodeThreeD(0,0,0){fictif} -\fleuve% -\Berges\bases% -\multido{\iY=-2+4}{2}{% - \pnode(! - /Xc \Xc\space def - /Radius \Radius\space def - /radius1 Xc 2 Radius mul add Xc Radius mul Radius dup mul add - sqrt 2 mul sub def - /X1 radius1 def - /Hpile Radius 1 1 Xc 2 mul dup mul 4 Radius dup mul mul div - sub sqrt sub mul neg def - X1 radius1){PointInitial} - \LineThreeD(-\Xcinf,\iY,-2)(-\Xcinf,\iY,0) - \LineThreeD(\Xcinf,\iY,-2)(\Xcinf,\iY,0) - \LineThreeD(-19.5,\iY,0)(19.5,\iY,0) - \LineThreeD(-\Xc,\iY,-2.5)(-\Xc,\iY,0) - \LineThreeD(\Xc,\iY,0)(\Xc,\iY,-2.5) - \multido{\nX=-13+13}{3}{% - \parametricplot{62.336}{117.664}{% - /Xabscisse t cos Radius mul \nX\space add def - /Zcote t sin Radius mul Radius sub def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius1 mul radius1 add Xc sub \nX\space add def - /Zcote t sin radius1 mul radius1 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius1 mul radius1 add neg Xc 2 mul add \nX\space add Xc sub def - /Zcote t sin radius1 mul radius1 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \multido{\i=0+1}{30}{% - \pnode(! - /B Radius X1 mul Xc radius1 mul sub neg def - /A Radius radius1 sub def - /C X1 X1 mul Radius mul Xc Xc mul radius1 mul sub def - /Discriminant B B mul A C mul sub sqrt def - /X2 B neg Discriminant add A div def - /radius2 X2 X1 sub 2 exp 4 radius1 mul div def - X2 radius2){fictif1} - \multido{\nX=-13+13}{3}{% - \parametricplot{0}{360}{% - /Xabscisse t cos radius2 mul X2 add Xc sub \nX\space add def - /Zcote t sin radius2 mul radius2 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius2 mul X2 add neg Xc 2 mul add Xc sub \nX\space add def - /Zcote t sin radius2 mul radius2 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - }% - } - \pnode(! - /X1 X2 def - /radius1 radius2 def - X1 radius1){fictif2} - } - }% -} -\tablier -\rembardes -\AxesThreeD[linestyle=dashed,arrowsize=0.2](21,16,10) -\end{pspicture} - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf deleted file mode 100644 index 6b3116a610f..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex deleted file mode 100644 index ececb1d3531..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex +++ /dev/null @@ -1,170 +0,0 @@ -\documentclass[a4paper]{article} -% Manuel Luque -% Herbert Voss - 2003/12/20 -\usepackage{pstricks} -\usepackage{pst-node} -\usepackage{pst-plot} -\usepackage{pst-grad} -\usepackage{pst-vue3d} -\usepackage{multido} - -\input random - -\definecolor{pelouse}{cmyk}{0.14,0.42,0.56,0} -\definecolor{base}{rgb}{1,0.8,0} -\newpsstyle{surface}{fillstyle=vlines,hatchcolor=marron,% - hatchwidth=0.2\pslinewidth,hatchsep=1\pslinewidth} -\newpsstyle{sol}{fillstyle=vlines,hatchcolor=lightgray,% - hatchwidth=0.2\pslinewidth,hatchsep=1\pslinewidth} - -\SpecialCoor - -\def\fleuve{% - \FrameThreeD[normaleLatitude=90,normaleLongitude=90,% - linestyle=none,fillstyle=gradient,% - gradbegin=blue,gradend=white](0,0,-2.5)(-12,-14)(12,14) -} -\newcommand{\tablier}{% - \FrameThreeD[normaleLatitude=90,normaleLongitude=90,% - linestyle=none,fillstyle=gradient,% - gradbegin=gray,gradend=white](0,0,0)(-\Xcinf,-2)(\Xcinf,2)% - \multido{\nL=-\Xcinf+0.2}{196}{% - \LineThreeD[linecolor=lightgray](\nL,-2,0)(\nL,2,0)% - }% -} -\newcommand\rembardes{% - \multido{\iY=-2+4}{2}{% - \LineThreeD[linecolor=red](-\Xcinf,\iY,0.5)(\Xcinf,\iY,0.5) - \multido{\rX=-\Xcinf+0.4}{98}{% - \LineThreeD[linecolor=red](\rX,\iY,0)(\rX,\iY,0.5)% - }% - }% -} -\newcommand\bases{% - \multido{\iYpos=-2+4}{2}{% - \multido{\rXpos=-\Xc+\twoXc}{2}{% - \parametricplot[fillstyle=solid,fillcolor=base]{0}{360}{% - /Xabscisse t cos 1.5 mul \rXpos\space add def - /Zcote -2.5 def - /Yordonnee t sin 1.5 mul \iYpos\space add def - tx@3DDict begin - formulesTroisD - Xi Yi - end - }% - }% - }% -} -\newcommand\Berges{% - \pNodeThreeD(-\Xcinf,-14,-2){B1} - \pNodeThreeD(-12,-14,-2.5){B2} - \pNodeThreeD(-\Xcinf,14,-2){B4} - \pNodeThreeD(-12,14,-2.5){B3} - \pspolygon[fillstyle=solid,fillcolor=pelouse](B1)(B2)(B3)(B4) - \pNodeThreeD(\Xcinf,-14,-2){B1} - \pNodeThreeD(12,-14,-2.5){B2} - \pNodeThreeD(\Xcinf,14,-2){B4} - \pNodeThreeD(12,14,-2.5){B3} - \pspolygon[fillstyle=solid,fillcolor=pelouse](B1)(B2)(B3)(B4)% -} - -\pagestyle{empty} - -\def\Radius{14} -\def\Xc{6.5} -\newdimen\tempXc -\tempXc=\Xc pt -\multiply\tempXc by 3 -\def\Xcinf{\pointless\tempXc} -\newdimen\temptwoXc -\temptwoXc=\Xc pt -\multiply\temptwoXc by 2 -\def\twoXc{\pointless\temptwoXc} - -\begin{document} - -\begin{pspicture}(-4,-10)(15,10) -\psset{PHI=20,THETA=-30,Dobs=30,Decran=10} -\pNodeThreeD(0,0,0){fictif} -\fleuve\Berges\bases% -\multido{\iY=-2+4}{2}{% - \pnode(! - /Xc \Xc\space def - /Radius \Radius\space def - /radius1 Xc 2 Radius mul add Xc Radius mul Radius dup mul add - sqrt 2 mul sub def - /X1 radius1 def - /Hpile Radius 1 1 Xc 2 mul dup mul 4 Radius dup mul mul div - sub sqrt sub mul neg def - X1 radius1){PointInitial} - \LineThreeD(-\Xcinf,\iY,-2)(-\Xcinf,\iY,0) - \LineThreeD(\Xcinf,\iY,-2)(\Xcinf,\iY,0) - \LineThreeD(-19.5,\iY,0)(19.5,\iY,0) - \LineThreeD(-\Xc,\iY,-2.5)(-\Xc,\iY,0) - \LineThreeD(\Xc,\iY,0)(\Xc,\iY,-2.5) - \multido{\nX=-13+13}{3}{% - \parametricplot{62.336}{117.664}{% - /Xabscisse t cos Radius mul \nX\space add def - /Zcote t sin Radius mul Radius sub def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius1 mul radius1 add Xc sub \nX\space add def - /Zcote t sin radius1 mul radius1 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius1 mul radius1 add neg Xc 2 mul add \nX\space add Xc sub def - /Zcote t sin radius1 mul radius1 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - } - \multido{\i=0+1}{30}{% - \pnode(! - /B Radius X1 mul Xc radius1 mul sub neg def - /A Radius radius1 sub def - /C X1 X1 mul Radius mul Xc Xc mul radius1 mul sub def - /Discriminant B B mul A C mul sub sqrt def - /X2 B neg Discriminant add A div def - /radius2 X2 X1 sub 2 exp 4 radius1 mul div def - X2 radius2){fictif1} - \multido{\nX=-13+13}{3}{% - \parametricplot{0}{360}{% - /Xabscisse t cos radius2 mul X2 add Xc sub \nX\space add def - /Zcote t sin radius2 mul radius2 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - } - \parametricplot{0}{360}{% - /Xabscisse t cos radius2 mul X2 add neg Xc 2 mul add Xc sub \nX\space add def - /Zcote t sin radius2 mul radius2 add neg def - /Yordonnee \iY\space def - tx@3DDict begin - formulesTroisD - Xi Yi - end - }% - } - \pnode(! /X1 X2 def /radius1 radius2 def X1 radius1){fictif2} - }% -} -\tablier -\rembardes -\AxesThreeD[linestyle=dashed,arrowsize=0.2](21,16,10) -\end{pspicture} -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf deleted file mode 100644 index 7dc446803ca..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex deleted file mode 100644 index b0cf19da007..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass{article} -\usepackage{pst-vue3d} -\begin{document} - \psset{THETA=30,PHI=30,Dobs=400,Decran=30,fillstyle=solid} - \begin{pspicture}(-2.5,-2)(2.5,12) - \PyramideThreeD[fracHeight=0.5,A=10](0,0,0){150}% - \psset{A=5} - \PyramideThreeD(0,0,75){5}% - \end{pspicture}% - % - \begin{pspicture}(-2.5,-2)(2.5,12) - \CubeThreeD[A=15,B=15,C=15](0,0,15)% - \PyramideThreeD[fracHeight=0.5,A=10](0,0,30){150}% - \psset{A=5} - \PyramideThreeD(0,0,105){5}% - \end{pspicture}% -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf deleted file mode 100644 index 908c16af5d2..00000000000 Binary files a/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex deleted file mode 100644 index ec86ad42a83..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex +++ /dev/null @@ -1,57 +0,0 @@ -\documentclass[12pt]{article} -\usepackage{pstricks} -\usepackage{pst-grad} -\usepackage{pst-vue3d} - -\newpsstyle{GradGrayWhite}{fillstyle=gradient,% - gradbegin=blue,gradend=white,linewidth=0.1mm}% - -\begin{document} - -\begin{pspicture}(-3.75,-3.25)(5,5.5) - \AxesThreeD(45,40,50) - \psset{PortionSphereTHETA=60,PortionSpherePHI=45,linewidth=0.1pt} - \SphereThreeD[fillstyle=solid,fillcolor=cyan,linewidth=0.1pt](0,0,0){30} - \PortionSphereThreeD[fillstyle=solid,fillcolor=red](0,0,0){30} - \LineThreeD[SphericalCoor,linestyle=dashed](0,0,0)(30,70,35) - \LineThreeD[SphericalCoor,linestyle=dashed](0,0,0)(30,50,35) - \LineThreeD[SphericalCoor,linestyle=dashed](0,0,0)(30,70,55) - \LineThreeD[SphericalCoor,linestyle=dashed](0,0,0)(30,50,55) - \LineThreeD[SphericalCoor](30,70,35)(50,70,35) - \LineThreeD[SphericalCoor](30,50,35)(50,50,35) - \LineThreeD[SphericalCoor](30,70,55)(50,70,55) - \LineThreeD[SphericalCoor](30,50,55)(50,50,55) - \PortionSphereThreeD[fillstyle=solid,fillcolor=red](0,0,0){50} - \psset{linestyle=dashed,linecolor=red,linewidth=\pslinewidth} - \LineThreeD(0,0,0)(30,0,0) - \LineThreeD(0,0,0)(0,30,0) - \LineThreeD(0,0,0)(0,0,30) -\end{pspicture} - -\begin{pspicture}(-3,-3.5)(3,5)% - \psset{THETA=30,PHI=30,Dobs=100,Decran=10}% - \SphereThreeD[fillstyle=solid,fillcolor=cyan,linewidth=0.1pt](0,0,0){20} - \AxesThreeD(25) - \PortionSphereThreeD[fillstyle=solid,fillcolor=gray](0,0,0){20}% - \pNodeThreeD(20;10;10){C1}% - \pNodeThreeD(40;10;10){D1}% - \psline(C1)(D1)% - \pNodeThreeD(20;10;-10){C2}% - \pNodeThreeD(40;10;-10){D2}% - \psline(C2)(D2)% - \pNodeThreeD(20;-10;-10){C3}% - \pNodeThreeD(40;-10;-10){D3}% - \psline(C3)(D3)% - \pNodeThreeD(20;-10;10){C4}% - \pNodeThreeD(40;-10;10){D4}% - \psline(C4)(D4)% -% - \PortionSphereThreeD[style=GradGrayWhite](0,0,0){40}% - \psset{linecolor=white,PhiCercle=45}% - \SphereCercleThreeD(0,0,0){20}% - \SphereMeridienThreeD[ThetaMeridien=45](0,0,0){20}% - \SphereCercleThreeD[PhiCercle=0](0,0,0){20}% - \SphereMeridienThreeD[THETA=30,PHI=30,ThetaMeridien=0](0,0,0){20}% -\end{pspicture} - -\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.bib b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.bib new file mode 100644 index 00000000000..3b785845e22 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.bib @@ -0,0 +1,129 @@ +@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } + +@Book{PostScript, + Author = {Kollock, Nikolai G.}, + Title = {PostScript richtig eingesetzt: vom Konzept zum + praktischen Einsatz}, + Publisher = {IWT}, + Address = {Vaterstetten}, + year = 1989, +} + +@Manual{pstricks, + Title = {PSTricks - {\PS} macros for Generic TeX}, + Author = {Timothy Van Zandt}, + Organization = {}, + Address = {\url{http://www.tug.org/application/PSTricks}}, + Note = {}, + year = 1993, +} + + +@Manual{pdftricks, + Title = {PSTricks Support for pdf}, + Author = {Herbert Voss}, + Organization = {}, + Address = {\url{http://PSTricks.de/pdf/pdfoutput.phtml}}, + Note = {}, + year = 2002, +} + +@Manual{miwi, + Title = {References for \TeX{} and Friends}, + Author = {Michael Wiedmann and Peter Karp}, + Organization = {}, + Address = {\url{http://www.miwie.org/tex-refs/}}, + Note = {}, + year = 2003, +} + + +@Manual{pstlens:2001, + Title = {PST-lens - {\PS} macros for Generic TeX}, + Author = {Denis Girou and Manuel Luque}, + Organization = {}, + Address = {\url{ftp://ftp.dante.de/tex-archive/graphics/pstricks/contrib/pst-lens/}}, + Note = {}, + year = 2001, +} + +@Manual{vue3d:2002, + Title = {Vue en 3D}, + Author = {Manuel Luque}, + Organization = {}, + Address = {\url{http://members.aol.com/Mluque5130/vue3d16112002.zip}}, + Note = {}, + year = 2002, +} + +@Article{dtk02.2:jackson.voss:plot-funktionen, + author = {Laura E. Jackson and Herbert Vo{\ss}}, + title = {Die {P}lot-{F}unktionen von {\texttt{pst-plot}}}, + journal = dtk, + year = 2002, + volume = {2/02}, + altvolume = 2, + altnumber = 14, + month = jun, + pages = {27--34}, + annote = bretter, + keywords = {}, + abstract = { Im letzten Heft wurden die mathematischen Funktionen von + \PS~im Zusammenhang mit dem {\LaTeX}-Paket + \texttt{pst-plot} zum Zeichnen von Funktionen beschrieben + und durch Beispiele erl{\"a}utert. In diesem Teil werden + die bislang nur erw{\"a}hnten Plot-Funktionen f{\"u}r + externe Daten behandelt. } +} + +@Article{dtk02.1:voss:mathematischen, + author = {Herbert Vo{\ss}}, + title = {Die mathematischen {F}unktionen von {P}ostscript}, + journal = dtk, + year = 2002, + volume = {1/02}, + altvolume = 1, + altnumber = 14, + month = mar, + pages = {40-47}, + annote = bretter, + keywords = {}, + abstract = { \PS, faktisch genauso alt wie {\TeX}, ist im + Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es + darum geht zu beurteilen, was es denn nun im eigentlichen + Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass + sich mit den \PS-Funktionen viele Dinge erledigen lassen, + bei denen sonst auf externe Programme zur{\"u}ckgegriffen + wird. Dies wird im Folgenden f{\"u}r die mathematischen + Funktionen im Zusammenhang mit dem Paket \texttt{pst-plot} + gezeigt. } +} + + +@Book{companion, + author = {Michel Goosens and Frank Mittelbach and Alexander + Samarin}, + title = {The {\LaTeX} {G}raphics {C}ompanion}, + publisher = {{Addison-Wesley Publishing Company}}, + year = {2004}, + edition = {2.}, + address = {Reading, Mass.} +} + +@Book{PSTricks2, + author = {Herbert Vo\ss}, + title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, + edition = {4.}, + publisher = {DANTE -- Lehmanns}, + year = {2007}, + address = {Heidelberg/Hamburg} +} + +@Book{voss:math, + author = {Herbert Vo\ss}, + title = {\LaTeX\ in {M}athematik und {N}aturwissenschaften}, + publisher = {{Franzis-Verlag}}, + year = {2006}, + address = {Poing} +} + diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.pdf new file mode 100644 index 00000000000..8f43cdafea1 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.tex b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.tex new file mode 100644 index 00000000000..e0808473fc1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.tex @@ -0,0 +1,1266 @@ +\listfiles +\documentclass[english]{article} +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\usepackage{lmodern}% only for PDF output +%\usepackage[scaled=0.9]{luximono} +\usepackage[a4paper,bmargin=2cm,tmargin=2cm]{geometry} +\usepackage{url} +\usepackage{morefloats} +\setcounter{totalnumber}{10} +\setcounter{dbltopnumber}{10} +\renewcommand{\textfraction}{0} +\usepackage{subfig} +% Mluque5130@aol.com +% 17 octobre 2003 +% Herbert Voss +% March 2007 +\def\UrlFont{\small\ttfamily} +\makeatletter +\def\verbatim@font{\small\normalfont\ttfamily} +\makeatother +\usepackage[colorlinks,linktocpage]{hyperref} +\usepackage[english]{babel} +\usepackage{pstricks,multido,pst-grad} +\usepackage{pst-vue3d} +\let\VueFversion\fileversion +\usepackage{showexpl} +\def\PS{PostScript} +% +\definecolor{GrisClair} {rgb}{0.6,0.7,0.8} +\definecolor{GrisTresClair} {rgb}{0.8,0.9,0.7} +\definecolor{GrayA} {rgb}{0.35,0.95,0.95} +\definecolor{GrayB} {rgb}{0.85,0.85,0.35} +\definecolor{GrayC} {rgb}{0.75,0.35,0.55} +\definecolor{GrayD} {rgb}{0.65,0.65,0.65} +\definecolor{GrayE} {rgb}{0.7,0.9,0.65} +\definecolor{LightBlue}{rgb}{.68,.85,.9} +% +\newcommand\tapis{% + \psset{normaleLatitude=90,normaleLongitude=0} + \FrameThreeD[fillcolor=green,fillstyle=solid](0,0,-5)(-20,-20)(20,20) + \QuadrillageThreeD[grille=10](0,0,-5)(-20,-20)(20,20)% +} +% +\def\Table{{% + \CubeThreeD[A=30,B=30,C=2,CubeColorFaceOne={.7 .6 .5}](0,0,-2) + \psset{normaleLongitude=0,normaleLatitude=90} + \QuadrillageThreeD[linewidth=0.2mm,linecolor=white,% + grille=5](0,0,0)(-30,-30)(30,30) +}} +% +\def\DessusTable{{% + \psset{normaleLongitude=0,normaleLatitude=90} + \QuadrillageThreeD[linewidth=0.2mm,linecolor=gray,% + grille=5](0,0,0)(-30,-30)(30,30)% +}} +\def\PlansOXYZ{{% + \psset{normaleLongitude=0,normaleLatitude=90} + \FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(0,50) + \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(-50,0)(0,50)% + \psset{normaleLongitude=90,normaleLatitude=0} + \FrameThreeD[fillstyle=solid,fillcolor=GrisTresClair](0,0,0)(0,0)(50,-50) + \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(0,-50)(50,0)% + \psset{normaleLongitude=0,normaleLatitude=0} + \FrameThreeD[fillstyle=solid,fillcolor=GrisTresClair](0,0,0)(-50,0)(0,-50) + \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(-50,-50)(0,0)% + }} +\psset{CubeColorFaceOne=1 1 1,% + CubeColorFaceTwo=1 0 0,% + CubeColorFaceThree=0 1 0,% + CubeColorFaceFour=0 0 1,% + CubeColorFaceFive=1 1 0,% + CubeColorFaceSix=0 1 1} +% +\def\hexagon{% +\begin{pspicture}(-2.2,-2.2)(2.2,2) + \Table + \pNodeThreeD(-8.66,-5,0){A6} + \pNodeThreeD(-8.66,5,0){A1} + \pNodeThreeD(0,10,0){A2} + \pNodeThreeD(8.66,5,0){A3} + \pNodeThreeD(8.66,-5,0){A4} + \pNodeThreeD(0,-10,0){A5}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} + \DessusTable + \endpsclip + \psset{A=5,B=5,C=5} + \CubeThreeD[RotZ=60](-6.83,-11.830,5)%6 + \CubeThreeD[RotZ=120](6.83,-11.830,5)%5 + \CubeThreeD(-13.86,0,5)%1 + \CubeThreeD[RotZ=-60](-6.83,11.830,5)%2 + \CubeThreeD[RotZ=-120](6.83,11.830,5)%3 + \CubeThreeD[RotZ=180](13.86,0,5)%4 +\end{pspicture}% +} +% +\def\stardodecagon{% + \begin{pspicture}(-2.2,-2)(2.2,2.2) + \Table + \pNodeThreeD(-6.83,-11.83,0){A6}% + \pNodeThreeD(-13.86,0,0){A1}% + \pNodeThreeD(-6.83,11.83,0){A2}% + \pNodeThreeD(6.83,11.83,0){A3}% + \pNodeThreeD(13.86,0,0){A4}% + \pNodeThreeD(6.83,-11.83,0){A5}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} + \DessusTable + \endpsclip% + \psset{A=5,B=5,C=5} + \CubeThreeD[RotZ=105](-10.6066,6.12372,5)%2 + \CubeThreeD[RotZ=45](0,12.2474,5)%1 + \CubeThreeD[RotZ=345](10.6066,6.12372,5)%6 + \CubeThreeD[RotZ=165](-10.6066,-6.12372,5)%3 + \CubeThreeD[RotZ=225](0,-12.2474,5)%4 + \CubeThreeD[RotZ=285](10.6066,-6.12372,5)%5 +\end{pspicture}} +% +\def\pentagon{% + \begin{pspicture}(-2.2,-2.2)(2.2,2.2) + \Table + \pNodeThreeD(8.5065,0,0){A1}% + \pNodeThreeD(2.6287,8.09,0){A2}% + \pNodeThreeD(-6.882,5,0){A3}% + \pNodeThreeD(-6.882,-5,0){A4}% + \pNodeThreeD(2.6287,-8.09,0){A5}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)} + \DessusTable + \endpsclip% + \psset{A=5,B=5,C=5} + \CubeThreeD(-11.88,0,5)%1 + \CubeThreeD[RotZ=72](-3.617,-11.3,5)%5 + \CubeThreeD[RotZ=-72](-3.617,11.3,5)%2 + \CubeThreeD[RotZ=-144](9.61267,6.984,5)%3 + \CubeThreeD[RotZ=144](9.61267,-6.984,5)%4 +\end{pspicture}} +% +\def\stardecagon{% + \begin{pspicture}*(-2.2,-1.75)(2.2,2.2) + \Table + \pNodeThreeD(-12.03,0,0){A1}% + \pNodeThreeD(-3.7178,-11.44,0){A2}% + \pNodeThreeD(9.7325,-7.071,0){A3}% + \pNodeThreeD(9.7325,7.071,0){A4}% + \pNodeThreeD(-3.7178,11.44,0){A5}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)} + \DessusTable + \endpsclip% + \psset{A=5,B=5,C=5} + \CubeThreeD[RotZ=81](-7.87375,-5.72061,5)%4 + \CubeThreeD[RotZ=9](-7.87375,5.72061,5)%3 + \CubeThreeD[RotZ=153](3.0075,-9.2561,5)%5 + \CubeThreeD[RotZ=-63](3.0075,9.25615,5)%2 + \CubeThreeD[RotZ=-135](9.73249,0,5)%1 +\end{pspicture}% +} +\def\octogon{% + \begin{pspicture}(-2.2,-2.2)(2.2,2.2) + \Table + \pNodeThreeD(12.07,5,0){A1}% + \pNodeThreeD(5,12.07,0){A2}% + \pNodeThreeD(-5,12.07,0){A3}% + \pNodeThreeD(-12.07,5,0){A4}% + \pNodeThreeD(-12.07,-5,0){A5}% + \pNodeThreeD(-5,-12.071,0){A6}% + \pNodeThreeD(5,-12.07,0){A7}% + \pNodeThreeD(12.07,-5,0){A8}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)(A7)(A8)} + \DessusTable + \endpsclip% + \psset{A=5,B=5,C=5} + \CubeThreeD(-17.07,0,5)%5 + \CubeThreeD[RotZ=45](-12.07,-12.07,5)%6 + \CubeThreeD[RotZ=90](0,-17.07,5)%7 + \CubeThreeD[RotZ=135](12.07,-12.07,5)%8 + \CubeThreeD[RotZ=-45](-12.07,12.07,5)%4 + \CubeThreeD[RotZ=-90](0,17.07,5)%3 + \CubeThreeD[RotZ=-135](12.07,12.07,5)%2 + \CubeThreeD[RotZ=180](17.07,0,5)%1 +\end{pspicture}% +} +% +\def\starhexadecagon{% + \begin{pspicture}(-2.2,-2)(2.2,2.2) + \Table + \pNodeThreeD(17.07,7.07,0){A1}% + \pNodeThreeD(7.07,17.07,0){A2}% + \pNodeThreeD(-7.07,17.07,0){A3}% + \pNodeThreeD(-17.07,7.07,0){A4}% + \pNodeThreeD(-17.07,-7.07,0){A5}% + \pNodeThreeD(-7.07,-17.07,0){A6}% + \pNodeThreeD(7.07,-17.07,0){A7}% + \pNodeThreeD(17.07,-7.07,0){A8}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)(A7)(A8)} + \DessusTable + \endpsclip% + \psset{A=5,B=5,C=5} + \CubeThreeD[RotZ=225](-17.07,0,5)%5 + \CubeThreeD[RotZ=-90](-12.07,-12.07,5)%6 + \CubeThreeD[RotZ=-45](0,-17.07,5)%7 + \CubeThreeD(12.07,-12.07,5)%8 + \CubeThreeD[RotZ=180](-12.07,12.07,5)%4 + \CubeThreeD[RotZ=135](0,17.07,5)%3 + \CubeThreeD[RotZ=90](12.07,12.07,5)%2 + \CubeThreeD[RotZ=45](17.07,0,5)%1 +\end{pspicture}} +% +\def\DecorSable{% + \FrameThreeD[normaleLongitude=0,normaleLatitude=90,% + fillstyle=solid,fillcolor=GrayE](0,0,0)(-60,-60)(60,60) + \QuadrillageThreeD[normaleLongitude=0,normaleLatitude=90,% + linecolor=GrayA,linewidth=0.2mm,grille=10](0,0,0)(-60,-60)(60,60)% +} +\newpsstyle{GradGrayWhite}{fillstyle=gradient,% + gradbegin=blue,gradend=white,linewidth=0.1mm}% + +\begin{document} + +\title{3D views with \texttt{pst-vue3d}\\[3ex] + \normalsize (v. \VueFversion)} +\author{Manuel Luque\thanks{\url{mluque5130 _at_ aol.com}}\ +and Herbert Vo\ss\thanks{\url{voss _at_ pstricks.de}}} + +\maketitle +\tableofcontents +\clearpage + +\section{Presentation} +The 3D representation of an object or a landscape is one of the +most interesting subject in computer science and have many +industrial applications (car and plane design, video game +etc\ldots). In a smaller way, one can obtain very didactic +realizations using PSTricks with two peculiarities: +\begin{itemize} + \item using PostScript; + \item being manageable through \LaTeX. +\end{itemize} +Package \texttt{pst-key} of David \textsc{Carlisle} allows to +write commands with parameters. Using this as an interface, one +can observe the result of little modifications of some parameters. +Our parameters being here: the position of the watcher, the choice +of an solid (cube, sphere etc\ldots) and many other things. I want +to signal that +\begin{itemize} +\item +Regarding 3D representation, one does not forget the package pst-3d by Timothy Van Zandt +who has used the best part of Post\-Script. Althrought limited to parallel projections, +this package allows to draw very interesting 3D figure.\footnote{A lot of different examples +for 3D images are available at: \url{http://members.aol.com/Mluque5130/}} +\item Thanks to Denis \textsc{Girou}, i have discovered the +package \texttt{pst-xkey} and I have learned it. +\item I have written another package for drawing picture reflecting +in spherical mirrors.% +\footnote{\url{http://melusine.eu.org/syracuse/mluque/BouleMiroir/boulemiroir.html}} + +It is a french paper which illustrate a study of Pr. Henri +\textsc{Bouasse} from this book \textit{Optique sup\'erieure}, edited in $1917$ by Delagrave. +\end{itemize} + + +\section{Aims} +First, we want to draw the 3D representation with elimination of +the hidden parts of some objects. + +The position of the watcher will be defined by its spherical +coordinates: the distances from the origin, the longitude $\theta$ +and the latitude $\phi$. We will choose, too, the distance of the +projection screen from this point. + +Second, we want to define some $3D$ elements of the scene: the bricks. + +The following bricks are already defined +\begin{itemize} +\item A box given by its three dimensions \verb+A,B,C+: it could +be turn into a cube or a dice. +\item A point which can be defined it two ways +\begin{itemize} +\item By cartesian coordinates $(x,y,z)$ +\item Or by spherical coordinates $(R,\theta,\phi)$ + ($\theta$, $\phi$ are, respectively, longitude and latitude). +\end{itemize} +\item A rectangle. +\item A circle defined by the normal line to its plane, its center +and its radius. An arc is defined as the circle with two limit +angles. +\item A tetrahedron given by the coordinates of the center of its +base and the radius of the circle containing the vertex of each +faces. We can make it rotate. +\item A square pyramid given by the half of the length of the side +of its base and its height. We can make it rotate and move. +\item A sphere given by the coordinates of its center \verb+\SphereThreeD(x,y,z){Radius}+ +and its radius. We can make it rotate with the parameters +\verb+RotX=...+, \verb+RotY=...+, \verb+RotZ=...+ We can choose to +draw only some meridians and parallel circles. + \item A solid or empty half-sphere (same parameters than a sphere) + \item A vertical cylinder defined by its radius and its height. We + can make it rotate using the parameters \verb+RotX=...+, \verb+RotY=...+, \verb+RotZ=...+ + An we can choose the center of its base in the same way than the Sphere. +\item A cone and a truncated cone defined by the radius of their +base, the height and the height of the truncature. +\end{itemize} + +\vspace*{1cm} +To construct a scene, one may choose himself the order of the +objects. For example, if an object 1 is partially hidden by an +object 2, we write, in the list of commands, first object 1 and +second object 2. + +\section{Rotating in the 3D space} + +A 3D object can be rotated around every axes with the \verb+RotX+, \verb+RotY+ and +\verb+RotZ+ option. They can be mixed in every combination. Figure~\ref{fig:rot} shows +how a rotation around the z-axes works. + +\begin{figure}[!htb] +\multido{\iRotZ=0+45}{8}{% + \begin{pspicture}(-1.5,-1.5)(1.5,1.5) + \psset{THETA=70,PHI=30,Dobs=200,Decran=10} + \psset{A=5,B=5,C=A,fillstyle=solid,fillcolor=GrisClair,% + linecolor=red, RotZ=\iRotZ} + \tapis\DieThreeD(0,0,0)% + \LineThreeD[linecolor=red,linestyle=dashed,arrows=->](0,0,0)(0,0,25) + \pNodeThreeD(0,0,12.5){Z'} + \uput[180](Z'){\texttt{RotZ=\iRotZ}} + \end{pspicture}\hfill % +} + +\psset{THETA=-10,PHI=20,Dobs=200,Decran=10} +\multido{\iCX=0+30}{8}{% + \begin{pspicture}(-1.5,-1.5)(1.5,1.5) + \AxesThreeD{->}(50,20,20) + \psset{A=20,B=5,C=10,fillstyle=solid,fillcolor=LightBlue,linecolor=gray} + \psset{RotZ=0,RotY=0,RotX=\iCX} + \CubeThreeD(0,0,0)% + \psset{linestyle=dashed} + \end{pspicture}\hfill% +}% +\caption{Diffenerent views of a die and a cube\label{fig:rot}} +\end{figure} + + +\section{Location of the cube in the space} +Suppose that one wants to place a 10-units edge cube at the point +$(x=40,y=40,z=35)$. First, the half edge of the cube will be +define by the parameters : \verb+A=5,B=5,C=5+, and next the +coordinates of its center by \texttt{(40,40,35)}. On the +figure, the period of the grid is 10~units +(figure~\ref{coordinates}). + +\begin{figure}[!htb] +\centering +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=30,PHI=30,Dobs=200,Decran=12} +\begin{pspicture}(-2.8,-3)(3.5,3.5) + \PlansOXYZ + \pNodeThreeD(40,40,35){G} + \pNodeThreeD(40,40,0){G_XY} + \pNodeThreeD(40,0,0){G_X} + \pNodeThreeD(0,40,0){G_Y} + \pNodeThreeD(0,0,35){G_Z} + \pNodeThreeD(0,40,35){G_YZ} + \pNodeThreeD(40,0,35){G_XZ} + \psdots(G)(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z) + \psline(G)(G_XY) + \psline(G)(G_XZ) + \psline(G)(G_YZ) + \psline(G_Z)(G_XZ) + \psline(G_Z)(G_YZ) + \AxesThreeD{->}(55) +\end{pspicture} +\end{LTXexample} +\caption{\label{coordinates}Origin \texttt{(40,40,35)}} +\end{figure} + +\begin{figure}[!ht] +\centering +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=30,PHI=30,Dobs=200,Decran=12} +\begin{pspicture}(-2.8,-3)(3.5,3.5) + \PlansOXYZ + \pNodeThreeD(40,40,35){G} + \pNodeThreeD(40,40,0){G_XY} + \pNodeThreeD(40,0,0){G_X} + \pNodeThreeD(0,40,0){G_Y} + \pNodeThreeD(0,0,35){G_Z} + \pNodeThreeD(0,40,35){G_YZ} + \pNodeThreeD(40,0,35){G_XZ} + \psdots(G)(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z) + \psline(G)(G_XY) + \psline(G)(G_XZ) + \psline(G)(G_YZ) + \psline(G_Z)(G_XZ) + \psline(G_Z)(G_YZ) + \psset{A=5,B=5,C=5} + \DieThreeD(40,40,35)% + \AxesThreeD{->}(55) +\end{pspicture} +\end{LTXexample} +\caption{\label{CubeOne}The placed cube.} +\end{figure} + + +To make it rotate of around $OX$ , one adds the parameter \verb+RotX=90+(figure~\ref{RotX}). + +\begin{figure}[!ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=30,PHI=30,Dobs=200,Decran=12} +\begin{pspicture}(-2.8,-3)(3.5,3.5) + \PlansOXYZ + \AxesThreeD{->}(55) + \psset{A=5,B=5,C=5,RotX=90} + % projections sur les plaans + \DieThreeD(40,40,5)% + \DieThreeD(5,40,35)% + \DieThreeD(40,5,35)% + \pNodeThreeD(40,40,35){G} + \pNodeThreeD(40,40,10){G_XY} + \pNodeThreeD(10,40,35){G_YZ} + \pNodeThreeD(40,10,35){G_XZ} + \psline(G)(G_XY) + \psline(G)(G_XZ) + \psline(G)(G_YZ) + \DieThreeD(40,40,35)% +\end{pspicture} +\end{LTXexample} +\caption{\label{RotX} 90\textsuperscript{o} rotation around $OX$ and plane projections.} +\end{figure} + + +Three successive rotations around three axes with: \verb+RotX=60,RotY=20,RotZ=110+, are illustrate in figure~\ref{RotXYZ}. + +\begin{figure}[!ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=30,PHI=30,Dobs=200,Decran=12} +\begin{pspicture}(-2.8,-3)(3.5,3.5) + \PlansOXYZ + \AxesThreeD(55) + \DieThreeD[A=5,B=5,C=5,RotX=30,RotY=20,RotZ=150](40,40,35)% +\end{pspicture} +\end{LTXexample} +\caption{\label{RotXYZ}rotations around $OX$, $OY$ et $OZ$: \texttt{RotX=60,RotY=20,RotZ=110}.} +\end{figure} + +\section{Constructions using cubes} +This section was done after a book first published in 1873 and +titled: + +\begin{figure}[!ht] +\centering +\psframebox{% +\begin{pspicture}(-3.1,-3.8)(3.1,3) +\rput(0,2.6){M\'ETHODE INTUITIVE} +\rput(0,2){\Large EXERCICES ET TRAVAUX} +\rput(0,1.5){POUR LES ENFANTS} +\rput(0,1){\tiny SELON LA M\'ETHODE ET LES PROC\'ED\'ES} +\rput(0,0){de \textbf{PESTALOZZI et FR\OE{}BEL}} +\rput(0,-1){M\textsuperscript{me} FANNY DELON} +\rput(0,-1.5){\tiny Directrice d'une \'Ecole professionnelle \`a Paris} +\rput(0,-2){M. CH. DELON} +\rput(0,-2.5){\tiny Licenci\'e \`es sciences} +\rput(0,-3){PARIS} +\rput(0,-3.5){1873} +\end{pspicture}} +\end{figure} + +for children at infant school! One can not be surprised that +theses kinds of pedagogue gave rise to the generation of Eintein, +Maxwell, Bohr etc. + + + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=15,PHI=50,Dobs=200,Decran=15} +\hexagon +\end{LTXexample} +\caption{\label{hexagone}hexagon.} +\end{figure} + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=15,PHI=50,Dobs=200,Decran=15}% +\stardodecagon +\end{LTXexample} +\caption{\label{dodecagone}star dodecagon.} +\end{figure} + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=-15,PHI=50,Dobs=200,Decran=15} +\pentagon +\end{LTXexample} +\caption{\label{pentagone}pentagon.} +\end{figure} + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=-15,Decran=10,Dobs=100,PHI=75} +\stardecagon +\end{LTXexample} +\caption{\label{decagone}star decagon.} +\end{figure} + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=20,PHI=75,Decran=10,Dobs=100} +\begin{pspicture*}(-2.5,-2.5)(2.5,2) +\Table +\psset{A=5,B=5,C=5} +\CubeThreeD(-7.88675,0,5)%1 +\CubeThreeD[RotZ=-120](3.94338,6.83,5)%2 +\CubeThreeD[RotZ=120](3.94338,-6.83,5)%3 +\end{pspicture*} +\end{LTXexample} +\caption{\label{triangle}triangle.} +\end{figure} + + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=-15,PHI=50,Decran=10,Dobs=150} +\octogon +\end{LTXexample} +\caption{\label{octogone}octogon.} +\end{figure} + + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=-15,Decran=10,Dobs=150,PHI=75} +\starhexadecagon +\end{LTXexample} +\caption{\label{hexadecagon}star hexadecagon.} +\end{figure} + +\begin{figure}[ht] +\begin{LTXexample}[width=0.45\linewidth] +\psset{THETA=-15,Decran=10,Dobs=150,PHI=75} +\begin{pspicture}(-2.2,-1.75)(2.2,2.2) + \Table + \pNodeThreeD(-8.66,-5,0){A6} + \pNodeThreeD(-8.66,5,0){A1} + \pNodeThreeD(0,10,0){A2} + \pNodeThreeD(8.66,5,0){A3} + \pNodeThreeD(8.66,-5,0){A4} + \pNodeThreeD(0,-10,0){A5}% + \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% + linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} + \DessusTable + \endpsclip + \psset{A=5,B=5,C=5} + \DieThreeD[RotZ=60,RotX=-90](-6.83,-11.83,5)% + \DieThreeD[RotZ=120,RotY=-90](6.83,-11.83,5)% + \DieThreeD[RotX=90](-13.86,0,5)% + \DieThreeD[RotZ=-60,RotY=90](-6.83,11.83,5)% + \DieThreeD[RotZ=-120,RotY=180](6.83,11.83,5)% + \DieThreeD[RotZ=180](13.86,0,5)% +\end{pspicture} +\end{LTXexample} +\caption{\label{pentagoneDie}hexagon with dices.} +\end{figure} + +Observing figure from off : +\begin{verbatim} +\psset{PHI=90,THETA=0} +\end{verbatim} + one obtains classical geometric +figures : + +(\ref{hexagonePlan}) (\ref{dodecagonePlan}) (\ref{pentagonePlan}) (\ref{decagonePlanStar}) +(\ref{trianglePlan}) (\ref{octogonePlan}) (\ref{hexadecagonePlan}) (\ref{hexagonePlanDie}). + +\begin{figure}[ht] +\centering +\psset{THETA=0,Decran=10,Dobs=125,PHI=90} +\hexagon +\caption{\label{hexagonePlan}``flat'' hexagon.} +\end{figure} + + +\begin{figure}[ht] +\centering +\psset{Decran=10,Dobs=100} +\psset{PHI=90,THETA=0} +\stardecagon +\caption{\label{dodecagonePlan}``flat'' star dodecagone.} +\end{figure} +% +\begin{figure}[ht] +\centering +\psset{Decran=10,Dobs=125} +\psset{PHI=90,THETA=0} +\pentagon +\caption{\label{pentagonePlan}``flat'' pentagon.} +\end{figure} + + +\begin{figure}[ht] +\centering +\psset{THETA=0,Decran=10,Dobs=125,PHI=90} +\stardecagon +\caption{\label{decagonePlanStar}``flat'' star decagon.} +\end{figure} +% + + +% +\begin{figure}[ht] +\centering +\psset{PHI=90,THETA=0,Decran=10,Dobs=100} +\begin{pspicture}*(-2.2,-2.2)(2.2,2.2) +\Table +\psset{A=5,B=5,C=5} +\CubeThreeD(-7.88675,0,5)%1 +\CubeThreeD[RotZ=-120](3.94338,6.83,5)%2 +\CubeThreeD[RotZ=120](3.94338,-6.83,5)%3 +\end{pspicture} +\caption{\label{trianglePlan}``flat'' triangle.} +\end{figure} + + +\begin{figure}[ht] +\centering +\psset{PHI=90,THETA=0,Decran=10,Dobs=125} +\octogon +\caption{\label{octogonePlan}``flat'' octogon.} +\end{figure} + + + +\begin{figure}[ht] +\centering +\psset{PHI=90,THETA=0,Decran=10,Dobs=125} +\starhexadecagon +\caption{\label{hexadecagonePlan}``flat'' star hexadecagon.} +\end{figure} + +\begin{figure}[ht] +\centering +\psset{PHI=90,THETA=0,Decran=10,Dobs=125} +\begin{pspicture}(-2.2,-2.2)(2.2,2.2) +\Table +\pNodeThreeD(-8.66,-5,0){A6} +\pNodeThreeD(-8.66,5,0){A1} +\pNodeThreeD(0,10,0){A2} +\pNodeThreeD(8.66,5,0){A3} +\pNodeThreeD(8.66,-5,0){A4} +\pNodeThreeD(0,-10,0){A5}% +\psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} +\DessusTable +\endpsclip +\psset{A=5,B=5,C=5} +\DieThreeD[RotZ=60,RotX=-90](-6.83,-11.83,5)% +\DieThreeD[RotZ=120,RotY=-90](6.83,-11.83,5)% +\DieThreeD[RotX=90](-13.86,0,5)% +\DieThreeD[RotZ=-60,RotY=90](-6.83,11.83,5)% +\DieThreeD[RotZ=-120,RotY=180](6.83,11.83,5)% +\DieThreeD[RotZ=180](13.86,0,5)% +\end{pspicture} +\caption{\label{hexagonePlanDie}``flat'' hexagon with dices.} +\end{figure} + + + + +\clearpage + + +\section{Sphere, part of sphere, half-sphere, parallels and meridians} + +Beside \verb+sphereThreeD+ there exist several macro for spheres: + +\begin{itemize} +\item \verb|SphereInverseThreeD| +\item \verb|\SphereCercleThreeD| +\item \verb|\SphereMeridienThreeD| +\item \verb|\DemiSphereThreeDThreeD| +\item \verb|\SphereCreuseThreeD| +\item \verb|\PortionSphereThreeD| +\end{itemize} + + +The macro: +\begin{verbatim} +\SphereThreeD(10,30,20){20} +\end{verbatim} +draws the sphere defined by the coordinates of its centre and its radius which is shown in +figure~\ref{sphere} together with the macro +\begin{verbatim} +\PortionSphereThreeD(0,0,0){20} +\end{verbatim} +and some more additional lines. + +\begin{verbatim} +\begin{pspicture}(-3,-3.5)(3,5) +\psset{THETA=30,PHI=30,Dobs=100,Decran=10} +{\psset{style=GradGrayWhite}% +\SphereThreeD(0,0,0){20} +\psset{fillstyle=solid,fillcolor=gray} +\PortionSphereThreeD(0,0,0){20} +\pNodeThreeD(20;10;10){C1} +\pNodeThreeD(40;10;10){D1} +\psline(C1)(D1) +\pNodeThreeD(20;10;-10){C2} +\pNodeThreeD(40;10;-10){D2} +\psline(C2)(D2) +\pNodeThreeD(20;-10;-10){C3} +\pNodeThreeD(40;-10;-10){D3} +\psline(C3)(D3) +\pNodeThreeD(20;-10;10){C4} +\pNodeThreeD(40;-10;10){D4} +\psline(C4)(D4) +\PortionSphereThreeD% + [style=GradGrayWhite](0,0,0){40}} +% PhiCercle=latitude of the cercle +% \SphereCercle[PhiCercle=...]{radius} +\psset{linecolor=white,PhiCercle=45} +\SphereCercleThreeD(0,0,0){20} +% ThetaMeridien=longitude of the meridian +% \SphereMeridien[ThetaMeridien=...]{radius} +\SphereMeridienThreeD% + [ThetaMeridien=45](0,0,0){20} +\pNodeThreeD(20;45;45){A} +\pNodeThreeD(50;45;45){B} +\psline[linecolor=black]{->}(A)(B) +\pNodeThreeD(20;0;90){Nord} +\pNodeThreeD(40;0;90){Nord1} +\psline[linecolor=black]{->}(Nord)(Nord1) +\SphereCercleThreeD[PhiCercle=0](0,0,0){20} +\SphereMeridienThreeD% + [ThetaMeridien=0](0,0,0){20} +\end{pspicture} +\end{verbatim} + + + +\begin{figure}[!htb] +\begin{pspicture}(-3,-3.5)(3,5) +\psset{THETA=30,PHI=30,Dobs=100,Decran=10} +\bgroup + \psset{style=GradGrayWhite}% + \SphereThreeD(0,0,0){20} + \psset{fillstyle=solid,fillcolor=gray} + \PortionSphereThreeD(0,0,0){20} + \pNodeThreeD(20;10;10){C1} + \pNodeThreeD(40;10;10){D1} + \psline(C1)(D1) + \pNodeThreeD(20;10;-10){C2} + \pNodeThreeD(40;10;-10){D2} + \psline(C2)(D2) + \pNodeThreeD(20;-10;-10){C3} + \pNodeThreeD(40;-10;-10){D3} + \psline(C3)(D3) + \pNodeThreeD(20;-10;10){C4} + \pNodeThreeD(40;-10;10){D4} + \psline(C4)(D4) + \PortionSphereThreeD[style=GradGrayWhite](0,0,0){40} +\egroup +% PhiCercle=latitude of the cercle +% \SphereCercle[PhiCercle=...]{radius} + \psset{linecolor=white,PhiCercle=45} + \SphereCercleThreeD(0,0,0){20} +% ThetaMeridien=longitude of the meridian +% \SphereMeridien[ThetaMeridien=...]{radius} + \SphereMeridienThreeD[ThetaMeridien=45](0,0,0){20} +% \pNodeThreeD(radius}{longitude}{latitude}{name of the point} + \pNodeThreeD(20;45;45){A} + \pNodeThreeD(50;45;45){B} + \psline[linecolor=black]{->}(A)(B) + \pNodeThreeD(20;0;90){Nord} + \pNodeThreeD(40;0;90){Nord1} + \psline[linecolor=black]{->}(Nord)(Nord1) + \SphereCercleThreeD[PhiCercle=0](0,0,0){20} + \SphereMeridienThreeD[ThetaMeridien=0](0,0,0){20} +\end{pspicture} +\caption{\label{sphere}A Sphere.} +\end{figure} + + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3,-2)(3,5) + \psset{THETA=60,PHI=30,Dobs=100,Decran=10} +% \DemiSphereThreeD(x,y,z){radius} + \DemiSphereThreeD[RotX=180,style=GradGrayWhite](0,0,0){20} + \SphereCreuseThreeD[RotX=180,linecolor=white,style=GradGrayWhite](0,0,0){20} + \AxesThreeD[linestyle=dashed](30,30,40) +\end{pspicture} +\caption{\label{halfsphere}half-sphere.} +\end{figure} + + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3,-2)(3,2) +\psset{THETA=60,PHI=20,Dobs=100,Decran=10} +\psset{style=GradGrayWhite}% +\SphereThreeD(0,0,0){10}% +\DemiSphereThreeD[RotX=180](0,0,0){20}% +\begin{psclip}{% +\SphereCreuseThreeD[RotX=180,linecolor=white](0,0,0){20}}% +\SphereThreeD(0,0,0){10} +\end{psclip}% +\end{pspicture} +\caption{\label{egg} levitation} +\end{figure} + + +\section{A Hole in a sphere} + +\begin{figure}[!htb] +\centering +\psset{THETA=10,PHI=30,Dobs=100,Decran=10} +\begin{pspicture}*(-3,-3)(3,3) + \SphereThreeD[style=GradGrayWhite,gradmidpoint=0.2](0,0,0){40}% + \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=40,% + DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){40}}% + \SphereInverseThreeD[style=GradGrayWhite](0,0,0){40}% + \SphereThreeD[style=GradGrayWhite](0,0,0){30}% + \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=30,% + DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){30}}% + \SphereInverseThreeD[style=GradGrayWhite](0,0,0){30}% + \SphereThreeD[style=GradGrayWhite](0,0,0){20}% + \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=30,% + DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){20}}% + \SphereInverseThreeD[style=GradGrayWhite](0,0,0){20}% + \SphereThreeD[style=GradGrayWhite](0,0,0){10}% + \begin{psclip}{% + \PortionSphereThreeD[PortionSpherePHI=30,% + DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){10}}% + \SphereInverseThreeD[style=GradGrayWhite](0,0,0){10}% + \SphereThreeD[style=GradGrayWhite](0,0,0){5}% + \end{psclip}% + \end{psclip}% + \end{psclip}% + \end{psclip}% +\end{pspicture} +\caption{\label{Holeinasphere}A Hole in a sphere.} +\end{figure} + +It is a rectangular hole whose the size are meridian and parallels +arcs (figure~\ref{Holeinasphere}). + +We define the part of the sphere setting its radius, the center +of the sphere and the $\Delta\phi$ and $\Delta\theta$. +\begin{verbatim} +\PortionSphereThreeD[PortionSpherePHI=45,% + PortionSphereTHETA=0,% + DeltaPHI=45,% + DeltaTHETA=20](0,0,0){20} +\end{verbatim} + +There are the parameters of the first hole. The radius is +\texttt{20}. +\begin{verbatim} +{\psset{fillstyle=gradient,% + gradbegin=white,% + gradend=blue,% + gradmidpoint=0.2,% + linecolor=cyan,% + linewidth=0.1mm} +\SphereThreeD(0,0,0){20}}% +\begin{psclip}{% +\PortionSphereThreeD[PortionSpherePHI=45,% + DeltaPHI=45,DeltaTHETA=20](0,0,0){20}} +\SphereInverseThreeD[fillstyle=solid,% + fillcolor=red,% + linecolor=blue](0,0,0){20}% +\end{psclip}% +\end{verbatim} + +This is the tricks to see the inner of the sphere. + +\verb+\SphereInverse+ define the hidden part of the sphere. + + +\section{Drawing a cylinder} +A cylinder is defined by the radius of its base and its height. +The center of the base is set in the usual way, and +\textsf{RotX,RotY,RotZ} make it rotate around the axes. + +\verb+\CylindreThreeD(x,y,z){radius}{hauteur}+ + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3.5,-2)(3,4.5) +\psset{THETA=5,PHI=40,Dobs=150,Decran=6.5,fillstyle=solid,linewidth=0.1mm} +% plan horizontal +{\psset{normaleLongitude=0, normaleLatitude=90} +\FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(50,50) +\FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(50,-50) +\QuadrillageThreeD(0,0,0)(-50,-50)(50,50)} +\multido{\iCY=-45+90}{2}{% + \CylindreThreeD(-45,\iCY,0){5}{50} + \DemiSphereThreeD(-45,\iCY,50){5}% +} +\CylindreThreeD(0,0,0){10}{15} +\CylindreThreeD(0,0,15){20}{5} +\DemiSphereThreeD[RotX=180](0,0,35){20} +\SphereCreuseThreeD[RotX=180](0,0,35){20} +{\psset{RotY=90,RotX=0,RotZ=30} +\CylindreThreeD(15,15,5){5}{20}} +\multido{\iCY=-45+90}{2}{% +\CylindreThreeD(45,\iCY,0){5}{50} +\DemiSphereThreeD(45,\iCY,50){5}} +\end{pspicture} +\caption{\label{cylinder}cylinders.} +\end{figure} + +\begin{verbatim} +\CylindreThreeD(0,0,-5){10}{15}} +\psset{RotY=90} +\CylindreThreeD(15,15,-5){5}{20} +\end{verbatim} + + +\section{Tetrahedron, cone and square pyramid} +\subsection{square pyramid} +\begin{verbatim} +\psset{A=...,Hpyramide=...} +\Pyramide +\end{verbatim} + +See the examples of figures~(\ref{Pyramid})~(\ref{Obelisque}). + +\begin{figure}[!htb] +\centering +\psset{ColorFaceD=GrayD,ColorFaceA=GrayA,% + ColorFaceB=GrayB,ColorFaceC=GrayC,ColorFaceE=GrayE} +\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% +\begin{pspicture}*(-3,-4)(3,4) +\psset{THETA=-70,PHI=60,Dobs=200,Decran=15} +\DecorSable +\psset{RotZ=45,fillstyle=solid,linecolor=black,A=9} +\PyramideThreeD(5,35,0){10} +\psset{A=10} +\PyramideThreeD(0,0,0){13} +\psset{A=7} +\PyramideThreeD(10,-35,0){8.7} +\end{pspicture}} +\caption{\label{Pyramid}Pyramids of Egypt.} +\end{figure} + + +\begin{figure}[!htb] +\centering +\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% + \begin{pspicture}*(-2.5,-2)(2.5,5.5) + \psset{THETA=30,PHI=30,Dobs=400,Decran=12} + \DecorSable + \CubeThreeD[A=15,B=15,C=15](0,0,15)% + \psset{A=10,fillstyle=solid} + \PyramideThreeD[fracHeight=0.8](0,0,30){150}% + \psset{A=2} + \PyramideThreeD(0,0,150){5}% + \end{pspicture}% +} +\caption{\label{Obelisque}Obelisk of Egypt.} +\end{figure} + + +\subsection{Cone} +\begin{verbatim} +\ConeThreeD[fracHeight=...] + (x,y,z){radius}{Height} +\end{verbatim} +by default \verb+fracHeight=1+ : figure~\ref{Cone}. + +\begin{figure}[!htb] +\centering +\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% +\begin{pspicture}*(-3,-5)(3,4) +\psset{THETA=30,PHI=40,Dobs=200,Decran=12,fillstyle=solid,% + fillcolor=GrisClair,linewidth=0.25\pslinewidth} +\DecorSable +\CylindreThreeD(0,0,0){10}{50} +\ConeThreeD[fillcolor=GrayB](0,0,50){10}{10} +\CylindreThreeD[RotY=90,RotZ=150](40,20,10){10}{50} +\ConeThreeD[fracHeight=0.5](20,-20,0){10}{10} +\CylindreThreeD(20,-20,5){5}{50} +\ConeThreeD[fracHeight=0.5](50,50,0){10}{10} +\CylindreThreeD(50,50,5){5}{50} +\end{pspicture}} +\caption{\label{Cone}Cones and cylinders.} +\end{figure} + +\section{Points and lines} +The command allowing to mark points and thus to draw lines +and polygons can be used of two manners, either with the Cartesian coordinates + \begin{verbatim} +\pNodeThreeD(x,y,z){name} +\end{verbatim} + or with the spherical coordinates : +\begin{verbatim} +\pNodeThreeD(radius;longitude;latitude)% + {name of the point} +\end{verbatim} + +For example \verb+\pNodeThreeD(25,-25,25){A}+, the point $A(25,25,25)$ places. +Points being positioned, just to write \verb+\psline(A)(B)+, to draw the segment $AB$. + + On the figure~\ref {points}, one drew a cube with its diagonals. +\begin{figure}[!htb] +\centering +\psset{unit=1cm} + \psset{THETA=70,PHI=30,Dobs=150,Decran=10} + \begin{pspicture}(-3,-3)(3,4) + \AxesThreeD[linecolor=red,linestyle=dashed](50,60,50) + \pNodeThreeD(25,-25,25){A} + \pNodeThreeD(25,25,25){B} + \pNodeThreeD(25,25,-25){C} + \pNodeThreeD(25,-25,-25){D} + \pNodeThreeD(-25,-25,25){E} + \pNodeThreeD(-25,25,25){F} + \pNodeThreeD(-25,25,-25){G} + \pNodeThreeD(-25,-25,-25){H} + \pspolygon(A)(B)(C)(D) + \pspolygon(E)(F)(G)(H) + \psline(A)(E) + \psline(B)(F) + \psline(C)(G) + \psline(D)(H) + \psset{linestyle=dashed} + \psline(A)(G) + \psline(B)(H) + \psline(C)(E) + \psline(D)(F) +% routine page 49 in "présentation de PSTricks" +% D.Girou "cahier 16 Gutengerg" + \newcounter{lettre} + \multido{\i=1+1}{8}{% + \setcounter{lettre}{\i} + \psdot[linecolor=red](\Alph{lettre}) + \uput[90](\Alph{lettre}){\Alph{lettre}} + } +\end{pspicture} +\caption{\label{points}Points and lines.} +\end{figure} + + +\section{Circles} +A circle is defined by a vector normal for its plan by $(\theta,\varphi)$, with the following parameters for example: +\begin{verbatim} +normaleLongitude=60,normaleLatitude=90 +\end{verbatim} +The coordinates of his centre as well as his radius. +\begin{verbatim} +\CircleThreeD(x,y,z){radius} +\end{verbatim} + +The circles of the figure~\ref{circles}, were drawn with the following +commands: + +\begin{figure}[!htb] +\centering +\psframebox{% + \begin{pspicture}(-2.5,-3.5)(3.5,1.5) + \psset{THETA=50,PHI=50,Dobs=250,Decran=10} + \multido{\iX=-70+10}{15}{% + \pNodeThreeD(\iX,0,0){X1} + \pNodeThreeD(\iX,50,0){X2} + \psline(X1)(X2) + } + \multido{\iY=0+10}{6}{% + \pNodeThreeD(-70,\iY,0){Y1} + \pNodeThreeD(70,\iY,0){Y2} + \psline(Y1)(Y2)% + } + \psset{normaleLongitude=0,normaleLatitude=90} + \multido{\iXorigine=-65+10}{14}{% + \multido{\iYorigine=5+10}{5}{% + \CircleThreeD[linecolor=red](\iXorigine,\iYorigine,0){5}% + }% + } + \end{pspicture}% +} +\caption{\label{circles}circles.} +\end{figure} + +\begin{verbatim} +\psset{normaleLongitude=0,% + normaleLatitude=90} +\multido{\iXorigine=-65+10}{14}{% + \multido{\iYorigine=5+10}{5}{% + \CircleThreeD[linecolor=red]% + (\iXorigine,\iYorigine,0){5}}} +\end{verbatim} + +\section{The macros and the options} +\subsection{The colors of the cube, the pyramid and tetraedre} + +The predefined colors for the different sides of a cube are +always set in the \verb+rgb+ mode : +\begin{verbatim} +CubeColorFaceOne=1 1 0,% +CubeColorFaceTwo=0.9 0.9 0,% +CubeColorFaceThree=0.8 0.8 0,% +CubeColorFaceFour=0.7 0.7 0,% +CubeColorFaceFive=0.65 0.65 0,% +CubeColorFaceSix=0.75 0.75 0 +\end{verbatim} + +The colors for the pyramid and the tetraedre are taken from the predefined ones: +\begin{verbatim} +ColorFaceD=cyan, +ColorFaceA=magenta, +ColorFaceB=red, +ColorFaceC=blue, +ColorFaceE=yellow +\end{verbatim} + +They can be changed in the usual way with the \verb+\psset+ macro. + + +\subsection{Common parameters} +\verb+RotX=, RotY=, RotZ=+ + +The predefined value is zero, means no rotation. + +\subsection{Cube} +The following command places a parallelepiped with a length of $a=40$, $b=20$ and $c=10$ units +and it is placed with its center at the point $x=25$, $y=25$ and $z=25$ + +\begin{verbatim} +\CubeThreeD[A=20,B=10,C=5](25,25,25) +\end{verbatim} + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3,-3)(3,3.5) +\psset{PHI=30,THETA=45,Dobs=200} +\PlansOXYZ\AxesThreeD(55) +\FrameThreeD[normaleLongitude=0,% + normaleLatitude=90,% + fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-10,-15)(10,15) +\FrameThreeD[normaleLongitude=0,% + normaleLatitude=0,% + fillstyle=vlines,hatchsep=0.4mm](0,25,25)(-10,-5)(10,5) +\FrameThreeD[normaleLongitude=90,% + normaleLatitude=0,% + fillstyle=vlines,hatchsep=0.4mm](25,0,25)(-15,-5)(15,5) +\CubeThreeD[A=15,B=10,C=5](25,25,25)% +\end{pspicture} +\caption{\label{Prisme}Parallelepiped} +\end{figure} + +In other words: the length of the sides is \verb+2A,2B,2C+ (see figure~\ref{Prisme}). + +For rotations, let us consider the result of a rotation around one of the axes, while knowing that it is possible to combine them. The corresponding rotation of projection on the horizontal level is obtained with the parameter: \verb+normaleLongitude=+ (figure~\ref{PrismeRotZ}). + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3,-3)(3,3.5) +\psset{PHI=30,THETA=45,Dobs=200,RotZ=60} +\PlansOXYZ\AxesThreeD(55) +% la projection sur le plan Oxy +\FrameThreeD[normaleLongitude=60,% + normaleLatitude=90,% + fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-10,-15)(10,15) +\CubeThreeD[A=15,B=10,C=5](25,25,25)% +\end{pspicture} +\caption{\label{PrismeRotZ}The same parallelepiped rotated with \texttt{RotZ=60}.} +\end{figure} + +There is no difference to a die, except that all sides have the same length. + + +\begin{figure}[!htb] +\centering +\begin{pspicture}(-3,-3)(3,3.5) +\psset{PHI=30,THETA=45,Dobs=200,RotZ=60,,RotX=90} +\PlansOXYZ\AxesThreeD(55) +% la projection sur le plan Oxy +\FrameThreeD[normaleLongitude=60,% + normaleLatitude=90,% + fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-5,-15)(5,15) +\CubeThreeD[A=15,B=10,C=5](25,25,25)% +\end{pspicture} +\caption{\label{PrismeRotXRotZ}The same parallelepiped, rotated with the values \texttt{RotX=90,RotZ=60}} +\end{figure} + + +\subsection{Cylinder and circle} +In addition to the already quoted optional parameters the cylinder requires the obligatory parameters: +\begin{verbatim} +\CylindreThreeD[...](x,y,z){radius}{height} +\end{verbatim} + +Projection on the horizontal level is obtained with the following values: + +\begin{verbatim} +\CircleThreeD[normaleLongitude=0,% + normaleLatitude=90,% + fillstyle=vlines,% + hatchsep=0.4mm](30,30,0){10} +\end{verbatim} + +The circle macro needs the following parameters: + +\begin{verbatim} +\CircleThreeD[...](x,y,z){radius} +\end{verbatim} + +Figure~\ref{CylindreDemo} shows an example of the above macros. + +\begin{figure}[!ht] +\centering +\begin{pspicture}(-3,-3)(3,3.5) +\psset{PHI=30,THETA=45,Dobs=200} +\PlansOXYZ\AxesThreeD(55) +% la projection sur le plan Oxy +\CircleThreeD[normaleLongitude=0,% + normaleLatitude=90,% + fillstyle=vlines,% + hatchsep=0.4mm](30,30,0){10} +\CylindreThreeD[fillstyle=solid,fillcolor=yellow,% + linewidth=0.1mm](30,30,20){10}{30}% +\end{pspicture} +\caption{\label{CylindreDemo}A cylinder with a radius of $10$ units and a + height of $50$ units + with its base center at \texttt{(30,30,20)}.% +} +\end{figure} + + +\section{See the interior of a cube} +The following option makes it possible to visualize the interior of the box, the result is seen in the figure~\ref{Cube inside} : + +\begin{verbatim} +\DieThreeD(0,0,0)% +\begin{psclip}{% +\FrameThreeD[normaleLongitude=0,% + normaleLatitude=90]% + (0,0,10)(-10,-10)(10,10)}% +\DieThreeD[CubeInside=true](0,0,0)% +\end{psclip}% +\end{verbatim} + +\begin{figure} +\centering +\begin{pspicture}(-2,-2)(2,3.5) + \psset{A=10,B=10,C=10,PHI=60,THETA=-60} + \DieThreeD(0,0,0)% + \begin{psclip}{% + \FrameThreeD[normaleLongitude=0,% + normaleLatitude=90](0,0,10)(-10,-10)(10,10)}% + \DieThreeD[CubeInside=true](0,0,0)% + \end{psclip}% + \FrameThreeD[normaleLongitude=0,% + normaleLatitude=90,linewidth=1mm](0,0,10)(-10,-10)(10,10)% +\end{pspicture} +\caption{\label{Cube inside}An empty box.} +\end{figure} + + +\nocite{*} + +\bibliographystyle{plain} +\bibliography{pst-vue3d-doc} + +\end{document} diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex b/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex deleted file mode 100644 index 12862908874..00000000000 --- a/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex +++ /dev/null @@ -1,1260 +0,0 @@ -\listfiles -\documentclass[english]{article} -\usepackage[T1]{fontenc} -\usepackage[latin1]{inputenc} -\usepackage{lmodern}% only for PDF output -\usepackage[a4paper,bmargin=2cm,tmargin=2cm]{geometry} -\usepackage{url} -\usepackage{morefloats} -\setcounter{totalnumber}{10} -\setcounter{dbltopnumber}{10} -\renewcommand{\textfraction}{0} -\usepackage{subfigure} -% Mluque5130@aol.com -% 17 octobre 2003 -% Herbert Voss -% September 2004 -\def\UrlFont{\small\ttfamily} -\makeatletter -\def\verbatim@font{\footnotesize\normalfont\ttfamily} -\makeatother -\usepackage[colorlinks,linktocpage]{hyperref} -\usepackage[english]{babel} -\usepackage{pstricks,multido,pst-grad} -\usepackage{pst-vue3d} -\let\VueFversion\fileversion -\usepackage{pst-example} -% -\definecolor{GrisClair} {rgb}{0.6,0.7,0.8} -\definecolor{GrisTresClair} {rgb}{0.8,0.9,0.7} -\definecolor{GrayA} {rgb}{0.35,0.95,0.95} -\definecolor{GrayB} {rgb}{0.85,0.85,0.35} -\definecolor{GrayC} {rgb}{0.75,0.35,0.55} -\definecolor{GrayD} {rgb}{0.65,0.65,0.65} -\definecolor{GrayE} {rgb}{0.7,0.9,0.65} -\definecolor{LightBlue}{rgb}{.68,.85,.9} -% -\newcommand\tapis{% - \psset{normaleLatitude=90,normaleLongitude=0} - \FrameThreeD[fillcolor=green,fillstyle=solid](0,0,-5)(-20,-20)(20,20) - \QuadrillageThreeD[grille=10](0,0,-5)(-20,-20)(20,20)% -} -% -\def\Table{{% - \CubeThreeD[A=30,B=30,C=2,CubeColorFaceOne={.7 .6 .5}](0,0,-2) - \psset{normaleLongitude=0,normaleLatitude=90} - \QuadrillageThreeD[linewidth=0.2mm,linecolor=white,% - grille=5](0,0,0)(-30,-30)(30,30) -}} -% -\def\DessusTable{{% - \psset{normaleLongitude=0,normaleLatitude=90} - \QuadrillageThreeD[linewidth=0.2mm,linecolor=gray,% - grille=5](0,0,0)(-30,-30)(30,30)% -}} -\def\PlansOXYZ{{% - \psset{normaleLongitude=0,normaleLatitude=90} - \FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(0,50) - \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(-50,0)(0,50)% - \psset{normaleLongitude=90,normaleLatitude=0} - \FrameThreeD[fillstyle=solid,fillcolor=GrisTresClair](0,0,0)(0,0)(50,-50) - \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(0,-50)(50,0)% - \psset{normaleLongitude=0,normaleLatitude=0} - \FrameThreeD[fillstyle=solid,fillcolor=GrisTresClair](0,0,0)(-50,0)(0,-50) - \QuadrillageThreeD[linewidth=0.2mm,grille=10](0,0,0)(-50,-50)(0,0)% - }} -\psset{CubeColorFaceOne=1 1 1,% - CubeColorFaceTwo=1 0 0,% - CubeColorFaceThree=0 1 0,% - CubeColorFaceFour=0 0 1,% - CubeColorFaceFive=1 1 0,% - CubeColorFaceSix=0 1 1} -% -\def\hexagon{% -\begin{pspicture}(-2.2,-2.2)(2.2,2) - \Table - \pNodeThreeD(-8.66,-5,0){A6} - \pNodeThreeD(-8.66,5,0){A1} - \pNodeThreeD(0,10,0){A2} - \pNodeThreeD(8.66,5,0){A3} - \pNodeThreeD(8.66,-5,0){A4} - \pNodeThreeD(0,-10,0){A5}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} - \DessusTable - \endpsclip - \psset{A=5,B=5,C=5} - \CubeThreeD[RotZ=60](-6.83,-11.830,5)%6 - \CubeThreeD[RotZ=120](6.83,-11.830,5)%5 - \CubeThreeD(-13.86,0,5)%1 - \CubeThreeD[RotZ=-60](-6.83,11.830,5)%2 - \CubeThreeD[RotZ=-120](6.83,11.830,5)%3 - \CubeThreeD[RotZ=180](13.86,0,5)%4 -\end{pspicture}% -} -% -\def\stardodecagon{% - \begin{pspicture}(-2.2,-2)(2.2,2.2) - \Table - \pNodeThreeD(-6.83,-11.83,0){A6}% - \pNodeThreeD(-13.86,0,0){A1}% - \pNodeThreeD(-6.83,11.83,0){A2}% - \pNodeThreeD(6.83,11.83,0){A3}% - \pNodeThreeD(13.86,0,0){A4}% - \pNodeThreeD(6.83,-11.83,0){A5}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} - \DessusTable - \endpsclip% - \psset{A=5,B=5,C=5} - \CubeThreeD[RotZ=105](-10.6066,6.12372,5)%2 - \CubeThreeD[RotZ=45](0,12.2474,5)%1 - \CubeThreeD[RotZ=345](10.6066,6.12372,5)%6 - \CubeThreeD[RotZ=165](-10.6066,-6.12372,5)%3 - \CubeThreeD[RotZ=225](0,-12.2474,5)%4 - \CubeThreeD[RotZ=285](10.6066,-6.12372,5)%5 -\end{pspicture}} -% -\def\pentagon{% - \begin{pspicture}(-2.2,-2.2)(2.2,2.2) - \Table - \pNodeThreeD(8.5065,0,0){A1}% - \pNodeThreeD(2.6287,8.09,0){A2}% - \pNodeThreeD(-6.882,5,0){A3}% - \pNodeThreeD(-6.882,-5,0){A4}% - \pNodeThreeD(2.6287,-8.09,0){A5}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)} - \DessusTable - \endpsclip% - \psset{A=5,B=5,C=5} - \CubeThreeD(-11.88,0,5)%1 - \CubeThreeD[RotZ=72](-3.617,-11.3,5)%5 - \CubeThreeD[RotZ=-72](-3.617,11.3,5)%2 - \CubeThreeD[RotZ=-144](9.61267,6.984,5)%3 - \CubeThreeD[RotZ=144](9.61267,-6.984,5)%4 -\end{pspicture}} -% -\def\stardecagon{% - \begin{pspicture}*(-2.2,-1.75)(2.2,2.2) - \Table - \pNodeThreeD(-12.03,0,0){A1}% - \pNodeThreeD(-3.7178,-11.44,0){A2}% - \pNodeThreeD(9.7325,-7.071,0){A3}% - \pNodeThreeD(9.7325,7.071,0){A4}% - \pNodeThreeD(-3.7178,11.44,0){A5}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)} - \DessusTable - \endpsclip% - \psset{A=5,B=5,C=5} - \CubeThreeD[RotZ=81](-7.87375,-5.72061,5)%4 - \CubeThreeD[RotZ=9](-7.87375,5.72061,5)%3 - \CubeThreeD[RotZ=153](3.0075,-9.2561,5)%5 - \CubeThreeD[RotZ=-63](3.0075,9.25615,5)%2 - \CubeThreeD[RotZ=-135](9.73249,0,5)%1 -\end{pspicture}% -} -\def\octogon{% - \begin{pspicture}(-2.2,-2.2)(2.2,2.2) - \Table - \pNodeThreeD(12.07,5,0){A1}% - \pNodeThreeD(5,12.07,0){A2}% - \pNodeThreeD(-5,12.07,0){A3}% - \pNodeThreeD(-12.07,5,0){A4}% - \pNodeThreeD(-12.07,-5,0){A5}% - \pNodeThreeD(-5,-12.071,0){A6}% - \pNodeThreeD(5,-12.07,0){A7}% - \pNodeThreeD(12.07,-5,0){A8}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)(A7)(A8)} - \DessusTable - \endpsclip% - \psset{A=5,B=5,C=5} - \CubeThreeD(-17.07,0,5)%5 - \CubeThreeD[RotZ=45](-12.07,-12.07,5)%6 - \CubeThreeD[RotZ=90](0,-17.07,5)%7 - \CubeThreeD[RotZ=135](12.07,-12.07,5)%8 - \CubeThreeD[RotZ=-45](-12.07,12.07,5)%4 - \CubeThreeD[RotZ=-90](0,17.07,5)%3 - \CubeThreeD[RotZ=-135](12.07,12.07,5)%2 - \CubeThreeD[RotZ=180](17.07,0,5)%1 -\end{pspicture}% -} -% -\def\starhexadecagon{% - \begin{pspicture}(-2.2,-2)(2.2,2.2) - \Table - \pNodeThreeD(17.07,7.07,0){A1}% - \pNodeThreeD(7.07,17.07,0){A2}% - \pNodeThreeD(-7.07,17.07,0){A3}% - \pNodeThreeD(-17.07,7.07,0){A4}% - \pNodeThreeD(-17.07,-7.07,0){A5}% - \pNodeThreeD(-7.07,-17.07,0){A6}% - \pNodeThreeD(7.07,-17.07,0){A7}% - \pNodeThreeD(17.07,-7.07,0){A8}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)(A7)(A8)} - \DessusTable - \endpsclip% - \psset{A=5,B=5,C=5} - \CubeThreeD[RotZ=225](-17.07,0,5)%5 - \CubeThreeD[RotZ=-90](-12.07,-12.07,5)%6 - \CubeThreeD[RotZ=-45](0,-17.07,5)%7 - \CubeThreeD(12.07,-12.07,5)%8 - \CubeThreeD[RotZ=180](-12.07,12.07,5)%4 - \CubeThreeD[RotZ=135](0,17.07,5)%3 - \CubeThreeD[RotZ=90](12.07,12.07,5)%2 - \CubeThreeD[RotZ=45](17.07,0,5)%1 -\end{pspicture}} -% -\def\DecorSable{% - \FrameThreeD[normaleLongitude=0,normaleLatitude=90,% - fillstyle=solid,fillcolor=GrayE](0,0,0)(-60,-60)(60,60) - \QuadrillageThreeD[normaleLongitude=0,normaleLatitude=90,% - linecolor=GrayA,linewidth=0.2mm,grille=10](0,0,0)(-60,-60)(60,60)% -} -\newpsstyle{GradGrayWhite}{fillstyle=gradient,% - gradbegin=blue,gradend=white,linewidth=0.1mm}% - -\begin{document} - -\title{3D views with \texttt{pst-vue3d}\\[3ex] - \normalsize (v. \VueFversion)} -\author{Manuel Luque\thanks{\url{mluque5130 _at_ aol.com}}\ -and Herbert Vo\ss\thanks{\url{voss _at_ pstricks.de}}} - -\maketitle -\tableofcontents -\clearpage - -\section{Presentation} -The 3D representation of an object or a landscape is one of the -most interesting subject in computer science and have many -industrial applications (car and plane design, video game -etc\ldots). In a smaller way, one can obtain very didactic -realizations using PSTricks with two peculiarities: -\begin{itemize} - \item using PostScript; - \item being manageable through \LaTeX. -\end{itemize} -Package \texttt{pst-key} of David \textsc{Carlisle} allows to -write commands with parameters. Using this as an interface, one -can observe the result of little modifications of some parameters. -Our parameters being here: the position of the watcher, the choice -of an solid (cube, sphere etc\ldots) and many other things. I want -to signal that -\begin{itemize} -\item -Regarding 3D representation, one does not forget the package pst-3d by Timothy Van Zandt -who has used the best part of Post\-Script. Althrought limited to parallel projections, -this package allows to draw very interesting 3D figure.\footnote{A lot of different examples -for 3D images are available at: \url{http://members.aol.com/Mluque5130/}} -\item Thanks to Denis \textsc{Girou}, i have discovered the -package \texttt{pst-xkey} and I have learned it. -\item I have written another package for drawing picture reflecting -in spherical mirrors.% -\footnote{\url{http://melusine.eu.org/syracuse/mluque/BouleMiroir/boulemiroir.html}} - -It is a french paper which illustrate a study of Pr. Henri -\textsc{Bouasse} from this book \textit{Optique sup\'erieure}, edited in $1917$ by Delagrave. -\end{itemize} - - -\section{Aims} -First, we want to draw the 3D representation with elimination of -the hidden parts of some objects. - -The position of the watcher will be defined by its spherical -coordinates: the distances from the origin, the longitude $\theta$ -and the latitude $\phi$. We will choose, too, the distance of the -projection screen from this point. - -Second, we want to define some $3D$ elements of the scene: the bricks. - -The following bricks are already defined -\begin{itemize} -\item A box given by its three dimensions \verb+A,B,C+: it could -be turn into a cube or a dice. -\item A point which can be defined it two ways -\begin{itemize} -\item By cartesian coordinates $(x,y,z)$ -\item Or by spherical coordinates $(R,\theta,\phi)$ - ($\theta$, $\phi$ are, respectively, longitude and latitude). -\end{itemize} -\item A rectangle. -\item A circle defined by the normal line to its plane, its center -and its radius. An arc is defined as the circle with two limit -angles. -\item A tetrahedron given by the coordinates of the center of its -base and the radius of the circle containing the vertex of each -faces. We can make it rotate. -\item A square pyramid given by the half of the length of the side -of its base and its height. We can make it rotate and move. -\item A sphere given by the coordinates of its center \verb+\SphereThreeD(x,y,z){Radius}+ -and its radius. We can make it rotate with the parameters -\verb+RotX=...+, \verb+RotY=...+, \verb+RotZ=...+ We can choose to -draw only some meridians and parallel circles. - \item A solid or empty half-sphere (same parameters than a sphere) - \item A vertical cylinder defined by its radius and its height. We - can make it rotate using the parameters \verb+RotX=...+, \verb+RotY=...+, \verb+RotZ=...+ - An we can choose the center of its base in the same way than the Sphere. -\item A cone and a truncated cone defined by the radius of their -base, the height and the height of the truncature. -\end{itemize} - -\vspace*{1cm} -To construct a scene, one may choose himself the order of the -objects. For example, if an object 1 is partially hidden by an -object 2, we write, in the list of commands, first object 1 and -second object 2. - -\section{Rotating in the 3D space} - -A 3D object can be rotated around every axes with the \verb+RotX+, \verb+RotY+ and -\verb+RotZ+ option. They can be mixed in every combination. Figure~\ref{fig:rot} shows -how a rotation around the z-axes works. - -\begin{figure}[!htb] -\multido{\iRotZ=0+45}{8}{% - \begin{pspicture}(-1.5,-1.5)(1.5,1.5) - \psset{THETA=70,PHI=30,Dobs=200,Decran=10} - \psset{A=5,B=5,C=A,fillstyle=solid,fillcolor=GrisClair,% - linecolor=red, RotZ=\iRotZ} - \tapis\DieThreeD(0,0,0)% - \LineThreeD[linecolor=red,linestyle=dashed,arrows=->](0,0,0)(0,0,25) - \pNodeThreeD(0,0,12.5){Z'} - \uput[180](Z'){\texttt{RotZ=\iRotZ}} - \end{pspicture}\hfill % -} - -\psset{THETA=-10,PHI=20,Dobs=200,Decran=10} -\multido{\iCX=0+30}{8}{% - \begin{pspicture}(-1.5,-1.5)(1.5,1.5) - \AxesThreeD{->}(50,20,20) - \psset{A=20,B=5,C=10,fillstyle=solid,fillcolor=LightBlue,linecolor=gray} - \psset{RotZ=0,RotY=0,RotX=\iCX} - \CubeThreeD(0,0,0)% - \psset{linestyle=dashed} - \end{pspicture}\hfill% -}% -\caption{Diffenerent views of a die and a cube\label{fig:rot}} -\end{figure} - - -\section{Location of the cube in the space} -Suppose that one wants to place a 10-units edge cube at the point -$(x=40,y=40,z=35)$. First, the half edge of the cube will be -define by the parameters : \verb+A=5,B=5,C=5+, and next the -coordinates of its center by \texttt{(40,40,35)}. On the -figure, the period of the grid is 10~units -(figure~\ref{coordinates}). - -\begin{figure}[!htb] -\centering -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=30,PHI=30,Dobs=200,Decran=12} -\begin{pspicture}(-2.8,-3)(3.5,3.5) - \PlansOXYZ - \pNodeThreeD(40,40,35){G} - \pNodeThreeD(40,40,0){G_XY} - \pNodeThreeD(40,0,0){G_X} - \pNodeThreeD(0,40,0){G_Y} - \pNodeThreeD(0,0,35){G_Z} - \pNodeThreeD(0,40,35){G_YZ} - \pNodeThreeD(40,0,35){G_XZ} - \psdots(G)(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z) - \psline(G)(G_XY) - \psline(G)(G_XZ) - \psline(G)(G_YZ) - \psline(G_Z)(G_XZ) - \psline(G_Z)(G_YZ) - \AxesThreeD{->}(55) -\end{pspicture} -\end{Beispiel} -\caption{\label{coordinates}Origin \texttt{(40,40,35)}} -\end{figure} - -\begin{figure}[!ht] -\centering -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=30,PHI=30,Dobs=200,Decran=12} -\begin{pspicture}(-2.8,-3)(3.5,3.5) - \PlansOXYZ - \pNodeThreeD(40,40,35){G} - \pNodeThreeD(40,40,0){G_XY} - \pNodeThreeD(40,0,0){G_X} - \pNodeThreeD(0,40,0){G_Y} - \pNodeThreeD(0,0,35){G_Z} - \pNodeThreeD(0,40,35){G_YZ} - \pNodeThreeD(40,0,35){G_XZ} - \psdots(G)(G_XY)(G_XZ)(G_YZ)(G_X)(G_Y)(G_Z) - \psline(G)(G_XY) - \psline(G)(G_XZ) - \psline(G)(G_YZ) - \psline(G_Z)(G_XZ) - \psline(G_Z)(G_YZ) - \psset{A=5,B=5,C=5} - \DieThreeD(40,40,35)% - \AxesThreeD{->}(55) -\end{pspicture} -\end{Beispiel} -\caption{\label{CubeOne}The placed cube.} -\end{figure} - - -To make it rotate of around $OX$ , one adds the parameter \verb+RotX=90+(figure~\ref{RotX}). - -\begin{figure}[!ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=30,PHI=30,Dobs=200,Decran=12} -\begin{pspicture}(-2.8,-3)(3.5,3.5) - \PlansOXYZ - \AxesThreeD{->}(55) - \psset{A=5,B=5,C=5,RotX=90} - % projections sur les plaans - \DieThreeD(40,40,5)% - \DieThreeD(5,40,35)% - \DieThreeD(40,5,35)% - \pNodeThreeD(40,40,35){G} - \pNodeThreeD(40,40,10){G_XY} - \pNodeThreeD(10,40,35){G_YZ} - \pNodeThreeD(40,10,35){G_XZ} - \psline(G)(G_XY) - \psline(G)(G_XZ) - \psline(G)(G_YZ) - \DieThreeD(40,40,35)% -\end{pspicture} -\end{Beispiel} -\caption{\label{RotX} 90\textsuperscript{o} rotation around $OX$ and plane projections.} -\end{figure} - - -Three successive rotations around three axes with: \verb+RotX=60,RotY=20,RotZ=110+, are illustrate in figure~\ref{RotXYZ}. - -\begin{figure}[!ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=30,PHI=30,Dobs=200,Decran=12} -\begin{pspicture}(-2.8,-3)(3.5,3.5) - \PlansOXYZ - \AxesThreeD(55) - \DieThreeD[A=5,B=5,C=5,RotX=30,RotY=20,RotZ=150](40,40,35)% -\end{pspicture} -\end{Beispiel} -\caption{\label{RotXYZ}rotations around $OX$, $OY$ et $OZ$: \texttt{RotX=60,RotY=20,RotZ=110}.} -\end{figure} - -\section{Constructions using cubes} -This section was done after a book first published in 1873 and -titled: - -\begin{figure}[!ht] -\centering -\psframebox{% -\begin{pspicture}(-3.1,-3.8)(3.1,3) -\rput(0,2.6){M\'ETHODE INTUITIVE} -\rput(0,2){\Large EXERCICES ET TRAVAUX} -\rput(0,1.5){POUR LES ENFANTS} -\rput(0,1){\tiny SELON LA M\'ETHODE ET LES PROC\'ED\'ES} -\rput(0,0){de \textbf{PESTALOZZI et FR\OE{}BEL}} -\rput(0,-1){M\textsuperscript{me} FANNY DELON} -\rput(0,-1.5){\tiny Directrice d'une \'Ecole professionnelle \`a Paris} -\rput(0,-2){M. CH. DELON} -\rput(0,-2.5){\tiny Licenci\'e \`es sciences} -\rput(0,-3){PARIS} -\rput(0,-3.5){1873} -\end{pspicture}} -\end{figure} - -for children at infant school! One can not be surprised that -theses kinds of pedagogue gave rise to the generation of Eintein, -Maxwell, Bohr etc. - - - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=15,PHI=50,Dobs=200,Decran=15} -\hexagon -\end{Beispiel} -\caption{\label{hexagone}hexagon.} -\end{figure} - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=15,PHI=50,Dobs=200,Decran=15}% -\stardodecagon -\end{Beispiel} -\caption{\label{dodecagone}star dodecagon.} -\end{figure} - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=-15,PHI=50,Dobs=200,Decran=15} -\pentagon -\end{Beispiel} -\caption{\label{pentagone}pentagon.} -\end{figure} - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=-15,Decran=10,Dobs=100,PHI=75} -\stardecagon -\end{Beispiel} -\caption{\label{decagone}star decagon.} -\end{figure} - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=20,PHI=75,Decran=10,Dobs=100} -\begin{pspicture*}(-2.5,-2.5)(2.5,2) -\Table -\psset{A=5,B=5,C=5} -\CubeThreeD(-7.88675,0,5)%1 -\CubeThreeD[RotZ=-120](3.94338,6.83,5)%2 -\CubeThreeD[RotZ=120](3.94338,-6.83,5)%3 -\end{pspicture*} -\end{Beispiel} -\caption{\label{triangle}triangle.} -\end{figure} - - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=-15,PHI=50,Decran=10,Dobs=150} -\octogon -\end{Beispiel} -\caption{\label{octogone}octogon.} -\end{figure} - - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=-15,Decran=10,Dobs=150,PHI=75} -\starhexadecagon -\end{Beispiel} -\caption{\label{hexadecagon}star hexadecagon.} -\end{figure} - -\begin{figure}[ht] -\begin{Beispiel}[colwidth=0.45\linewidth] -\psset{THETA=-15,Decran=10,Dobs=150,PHI=75} -\begin{pspicture}(-2.2,-1.75)(2.2,2.2) - \Table - \pNodeThreeD(-8.66,-5,0){A6} - \pNodeThreeD(-8.66,5,0){A1} - \pNodeThreeD(0,10,0){A2} - \pNodeThreeD(8.66,5,0){A3} - \pNodeThreeD(8.66,-5,0){A4} - \pNodeThreeD(0,-10,0){A5}% - \psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,% - linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} - \DessusTable - \endpsclip - \psset{A=5,B=5,C=5} - \DieThreeD[RotZ=60,RotX=-90](-6.83,-11.83,5)% - \DieThreeD[RotZ=120,RotY=-90](6.83,-11.83,5)% - \DieThreeD[RotX=90](-13.86,0,5)% - \DieThreeD[RotZ=-60,RotY=90](-6.83,11.83,5)% - \DieThreeD[RotZ=-120,RotY=180](6.83,11.83,5)% - \DieThreeD[RotZ=180](13.86,0,5)% -\end{pspicture} -\end{Beispiel} -\caption{\label{pentagoneDie}hexagon with dices.} -\end{figure} - -Observing figure from off : -\begin{verbatim} -\psset{PHI=90,THETA=0} -\end{verbatim} - one obtains classical geometric -figures : - -(\ref{hexagonePlan}) (\ref{dodecagonePlan}) (\ref{pentagonePlan}) (\ref{decagonePlanStar}) -(\ref{trianglePlan}) (\ref{octogonePlan}) (\ref{hexadecagonePlan}) (\ref{hexagonePlanDie}). - -\begin{figure}[ht] -\centering -\psset{THETA=0,Decran=10,Dobs=125,PHI=90} -\hexagon -\caption{\label{hexagonePlan}``flat'' hexagon.} -\end{figure} - - -\begin{figure}[ht] -\centering -\psset{Decran=10,Dobs=100} -\psset{PHI=90,THETA=0} -\stardecagon -\caption{\label{dodecagonePlan}``flat'' star dodecagone.} -\end{figure} -% -\begin{figure}[ht] -\centering -\psset{Decran=10,Dobs=125} -\psset{PHI=90,THETA=0} -\pentagon -\caption{\label{pentagonePlan}``flat'' pentagon.} -\end{figure} - - -\begin{figure}[ht] -\centering -\psset{THETA=0,Decran=10,Dobs=125,PHI=90} -\stardecagon -\caption{\label{decagonePlanStar}``flat'' star decagon.} -\end{figure} -% - - -% -\begin{figure}[ht] -\centering -\psset{PHI=90,THETA=0,Decran=10,Dobs=100} -\begin{pspicture}*(-2.2,-2.2)(2.2,2.2) -\Table -\psset{A=5,B=5,C=5} -\CubeThreeD(-7.88675,0,5)%1 -\CubeThreeD[RotZ=-120](3.94338,6.83,5)%2 -\CubeThreeD[RotZ=120](3.94338,-6.83,5)%3 -\end{pspicture} -\caption{\label{trianglePlan}``flat'' triangle.} -\end{figure} - - -\begin{figure}[ht] -\centering -\psset{PHI=90,THETA=0,Decran=10,Dobs=125} -\octogon -\caption{\label{octogonePlan}``flat'' octogon.} -\end{figure} - - - -\begin{figure}[ht] -\centering -\psset{PHI=90,THETA=0,Decran=10,Dobs=125} -\starhexadecagon -\caption{\label{hexadecagonePlan}``flat'' star hexadecagon.} -\end{figure} - -\begin{figure}[ht] -\centering -\psset{PHI=90,THETA=0,Decran=10,Dobs=125} -\begin{pspicture}(-2.2,-2.2)(2.2,2.2) -\Table -\pNodeThreeD(-8.66,-5,0){A6} -\pNodeThreeD(-8.66,5,0){A1} -\pNodeThreeD(0,10,0){A2} -\pNodeThreeD(8.66,5,0){A3} -\pNodeThreeD(8.66,-5,0){A4} -\pNodeThreeD(0,-10,0){A5}% -\psclip{\pspolygon[fillstyle=solid,fillcolor=GrisClair,linestyle=none](A1)(A2)(A3)(A4)(A5)(A6)} -\DessusTable -\endpsclip -\psset{A=5,B=5,C=5} -\DieThreeD[RotZ=60,RotX=-90](-6.83,-11.83,5)% -\DieThreeD[RotZ=120,RotY=-90](6.83,-11.83,5)% -\DieThreeD[RotX=90](-13.86,0,5)% -\DieThreeD[RotZ=-60,RotY=90](-6.83,11.83,5)% -\DieThreeD[RotZ=-120,RotY=180](6.83,11.83,5)% -\DieThreeD[RotZ=180](13.86,0,5)% -\end{pspicture} -\caption{\label{hexagonePlanDie}``flat'' hexagon with dices.} -\end{figure} - - - - -\clearpage - - -\section{Sphere, part of sphere, half-sphere, parallels and meridians} - -Beside \verb+sphereThreeD+ there exist several macro for spheres: - -\begin{itemize} -\item \verb|SphereInverseThreeD| -\item \verb|\SphereCercleThreeD| -\item \verb|\SphereMeridienThreeD| -\item \verb|\DemiSphereThreeDThreeD| -\item \verb|\SphereCreuseThreeD| -\item \verb|\PortionSphereThreeD| -\end{itemize} - - -The macro: -\begin{verbatim} -\SphereThreeD(10,30,20){20} -\end{verbatim} -draws the sphere defined by the coordinates of its centre and its radius which is shown in -figure~\ref{sphere} together with the macro -\begin{verbatim} -\PortionSphereThreeD(0,0,0){20} -\end{verbatim} -and some more additional lines. - -\begin{verbatim} -\begin{pspicture}(-3,-3.5)(3,5) -\psset{THETA=30,PHI=30,Dobs=100,Decran=10} -{\psset{style=GradGrayWhite}% -\SphereThreeD(0,0,0){20} -\psset{fillstyle=solid,fillcolor=gray} -\PortionSphereThreeD(0,0,0){20} -\pNodeThreeD(20;10;10){C1} -\pNodeThreeD(40;10;10){D1} -\psline(C1)(D1) -\pNodeThreeD(20;10;-10){C2} -\pNodeThreeD(40;10;-10){D2} -\psline(C2)(D2) -\pNodeThreeD(20;-10;-10){C3} -\pNodeThreeD(40;-10;-10){D3} -\psline(C3)(D3) -\pNodeThreeD(20;-10;10){C4} -\pNodeThreeD(40;-10;10){D4} -\psline(C4)(D4) -\PortionSphereThreeD% - [style=GradGrayWhite](0,0,0){40}} -% PhiCercle=latitude of the cercle -% \SphereCercle[PhiCercle=...]{radius} -\psset{linecolor=white,PhiCercle=45} -\SphereCercleThreeD(0,0,0){20} -% ThetaMeridien=longitude of the meridian -% \SphereMeridien[ThetaMeridien=...]{radius} -\SphereMeridienThreeD% - [ThetaMeridien=45](0,0,0){20} -\pNodeThreeD(20;45;45){A} -\pNodeThreeD(50;45;45){B} -\psline[linecolor=black]{->}(A)(B) -\pNodeThreeD(20;0;90){Nord} -\pNodeThreeD(40;0;90){Nord1} -\psline[linecolor=black]{->}(Nord)(Nord1) -\SphereCercleThreeD[PhiCercle=0](0,0,0){20} -\SphereMeridienThreeD% - [ThetaMeridien=0](0,0,0){20} -\end{pspicture} -\end{verbatim} - - - -\begin{figure}[!htb] -\begin{pspicture}(-3,-3.5)(3,5) -\psset{THETA=30,PHI=30,Dobs=100,Decran=10} -\bgroup - \psset{style=GradGrayWhite}% - \SphereThreeD(0,0,0){20} - \psset{fillstyle=solid,fillcolor=gray} - \PortionSphereThreeD(0,0,0){20} - \pNodeThreeD(20;10;10){C1} - \pNodeThreeD(40;10;10){D1} - \psline(C1)(D1) - \pNodeThreeD(20;10;-10){C2} - \pNodeThreeD(40;10;-10){D2} - \psline(C2)(D2) - \pNodeThreeD(20;-10;-10){C3} - \pNodeThreeD(40;-10;-10){D3} - \psline(C3)(D3) - \pNodeThreeD(20;-10;10){C4} - \pNodeThreeD(40;-10;10){D4} - \psline(C4)(D4) - \PortionSphereThreeD[style=GradGrayWhite](0,0,0){40} -\egroup -% PhiCercle=latitude of the cercle -% \SphereCercle[PhiCercle=...]{radius} - \psset{linecolor=white,PhiCercle=45} - \SphereCercleThreeD(0,0,0){20} -% ThetaMeridien=longitude of the meridian -% \SphereMeridien[ThetaMeridien=...]{radius} - \SphereMeridienThreeD[ThetaMeridien=45](0,0,0){20} -% \pNodeThreeD(radius}{longitude}{latitude}{name of the point} - \pNodeThreeD(20;45;45){A} - \pNodeThreeD(50;45;45){B} - \psline[linecolor=black]{->}(A)(B) - \pNodeThreeD(20;0;90){Nord} - \pNodeThreeD(40;0;90){Nord1} - \psline[linecolor=black]{->}(Nord)(Nord1) - \SphereCercleThreeD[PhiCercle=0](0,0,0){20} - \SphereMeridienThreeD[ThetaMeridien=0](0,0,0){20} -\end{pspicture} -\caption{\label{sphere}A Sphere.} -\end{figure} - - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3,-2)(3,5) - \psset{THETA=60,PHI=30,Dobs=100,Decran=10} -% \DemiSphereThreeD(x,y,z){radius} - \DemiSphereThreeD[RotX=180,style=GradGrayWhite](0,0,0){20} - \SphereCreuseThreeD[RotX=180,linecolor=white,style=GradGrayWhite](0,0,0){20} - \AxesThreeD[linestyle=dashed](30,30,40) -\end{pspicture} -\caption{\label{halfsphere}half-sphere.} -\end{figure} - - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3,-2)(3,2) -\psset{THETA=60,PHI=20,Dobs=100,Decran=10} -\psset{style=GradGrayWhite}% -\SphereThreeD(0,0,0){10}% -\DemiSphereThreeD[RotX=180](0,0,0){20}% -\begin{psclip}{% -\SphereCreuseThreeD[RotX=180,linecolor=white](0,0,0){20}}% -\SphereThreeD(0,0,0){10} -\end{psclip}% -\end{pspicture} -\caption{\label{egg} levitation} -\end{figure} - - -\section{A Hole in a sphere} - -\begin{figure}[!htb] -\centering -\psset{THETA=10,PHI=30,Dobs=100,Decran=10} -\begin{pspicture}*(-3,-3)(3,3) - \SphereThreeD[style=GradGrayWhite,gradmidpoint=0.2](0,0,0){40}% - \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=40,% - DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){40}}% - \SphereInverseThreeD[style=GradGrayWhite](0,0,0){40}% - \SphereThreeD[style=GradGrayWhite](0,0,0){30}% - \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=30,% - DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){30}}% - \SphereInverseThreeD[style=GradGrayWhite](0,0,0){30}% - \SphereThreeD[style=GradGrayWhite](0,0,0){20}% - \begin{psclip}{\PortionSphereThreeD[PortionSpherePHI=30,% - DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){20}}% - \SphereInverseThreeD[style=GradGrayWhite](0,0,0){20}% - \SphereThreeD[style=GradGrayWhite](0,0,0){10}% - \begin{psclip}{% - \PortionSphereThreeD[PortionSpherePHI=30,% - DeltaPHI=30,DeltaTHETA=30,linewidth=4\pslinewidth](0,0,0){10}}% - \SphereInverseThreeD[style=GradGrayWhite](0,0,0){10}% - \SphereThreeD[style=GradGrayWhite](0,0,0){5}% - \end{psclip}% - \end{psclip}% - \end{psclip}% - \end{psclip}% -\end{pspicture} -\caption{\label{Holeinasphere}A Hole in a sphere.} -\end{figure} - -It is a rectangular hole whose the size are meridian and parallels -arcs (figure~\ref{Holeinasphere}). - -We define the part of the sphere setting its radius, the center -of the sphere and the $\Delta\phi$ and $\Delta\theta$. -\begin{verbatim} -\PortionSphereThreeD[PortionSpherePHI=45,% - PortionSphereTHETA=0,% - DeltaPHI=45,% - DeltaTHETA=20](0,0,0){20} -\end{verbatim} - -There are the parameters of the first hole. The radius is -\texttt{20}. -\begin{verbatim} -{\psset{fillstyle=gradient,% - gradbegin=white,% - gradend=blue,% - gradmidpoint=0.2,% - linecolor=cyan,% - linewidth=0.1mm} -\SphereThreeD(0,0,0){20}}% -\begin{psclip}{% -\PortionSphereThreeD[PortionSpherePHI=45,% - DeltaPHI=45,DeltaTHETA=20](0,0,0){20}} -\SphereInverseThreeD[fillstyle=solid,% - fillcolor=red,% - linecolor=blue](0,0,0){20}% -\end{psclip}% -\end{verbatim} - -This is the tricks to see the inner of the sphere. - -\verb+\SphereInverse+ define the hidden part of the sphere. - - -\section{Drawing a cylinder} -A cylinder is defined by the radius of its base and its height. -The center of the base is set in the usual way, and -\textsf{RotX,RotY,RotZ} make it rotate around the axes. - -\verb+\CylindreThreeD(x,y,z){radius}{hauteur}+ - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3.5,-2)(3,4.5) -\psset{THETA=5,PHI=40,Dobs=150,Decran=6.5,fillstyle=solid,linewidth=0.1mm} -% plan horizontal -{\psset{normaleLongitude=0, normaleLatitude=90} -\FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(50,50) -\FrameThreeD[fillstyle=solid,fillcolor=GrisClair](0,0,0)(-50,0)(50,-50) -\QuadrillageThreeD(0,0,0)(-50,-50)(50,50)} -\multido{\iCY=-45+90}{2}{% - \CylindreThreeD(-45,\iCY,0){5}{50} - \DemiSphereThreeD(-45,\iCY,50){5}% -} -\CylindreThreeD(0,0,0){10}{15} -\CylindreThreeD(0,0,15){20}{5} -\DemiSphereThreeD[RotX=180](0,0,35){20} -\SphereCreuseThreeD[RotX=180](0,0,35){20} -{\psset{RotY=90,RotX=0,RotZ=30} -\CylindreThreeD(15,15,5){5}{20}} -\multido{\iCY=-45+90}{2}{% -\CylindreThreeD(45,\iCY,0){5}{50} -\DemiSphereThreeD(45,\iCY,50){5}} -\end{pspicture} -\caption{\label{cylinder}cylinders.} -\end{figure} - -\begin{verbatim} -\CylindreThreeD(0,0,-5){10}{15}} -\psset{RotY=90} -\CylindreThreeD(15,15,-5){5}{20} -\end{verbatim} - - -\section{Tetrahedron, cone and square pyramid} -\subsection{square pyramid} -\begin{verbatim} -\psset{A=...,Hpyramide=...} -\Pyramide -\end{verbatim} - -See the examples of figures~(\ref{Pyramid})~(\ref{Obelisque}). - -\begin{figure}[!htb] -\centering -\psset{ColorFaceD=GrayD,ColorFaceA=GrayA,% - ColorFaceB=GrayB,ColorFaceC=GrayC,ColorFaceE=GrayE} -\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% -\begin{pspicture}*(-3,-4)(3,4) -\psset{THETA=-70,PHI=60,Dobs=200,Decran=15} -\DecorSable -\psset{RotZ=45,fillstyle=solid,linecolor=black,A=9} -\PyramideThreeD(5,35,0){10} -\psset{A=10} -\PyramideThreeD(0,0,0){13} -\psset{A=7} -\PyramideThreeD(10,-35,0){8.7} -\end{pspicture}} -\caption{\label{Pyramid}Pyramids of Egypt.} -\end{figure} - - -\begin{figure}[!htb] -\centering -\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% - \begin{pspicture}*(-2.5,-2)(2.5,5.5) - \psset{THETA=30,PHI=30,Dobs=400,Decran=12} - \DecorSable - \CubeThreeD[A=15,B=15,C=15](0,0,15)% - \psset{A=10,fillstyle=solid} - \PyramideThreeD[fracHeight=0.8](0,0,30){150}% - \psset{A=2} - \PyramideThreeD(0,0,150){5}% - \end{pspicture}% -} -\caption{\label{Obelisque}Obelisk of Egypt.} -\end{figure} - - -\subsection{Cone} -\begin{verbatim} -\ConeThreeD[fracHeight=...] - (x,y,z){radius}{Height} -\end{verbatim} -by default \verb+fracHeight=1+ : figure~\ref{Cone}. - -\begin{figure}[!htb] -\centering -\psframebox[fillstyle=solid,fillcolor=GrayB,framesep=0pt]{% -\begin{pspicture}*(-3,-5)(3,4) -\psset{THETA=30,PHI=40,Dobs=200,Decran=12,fillstyle=solid,% - fillcolor=GrisClair,linewidth=0.25\pslinewidth} -\DecorSable -\CylindreThreeD(0,0,0){10}{50} -\ConeThreeD[fillcolor=GrayB](0,0,50){10}{10} -\CylindreThreeD[RotY=90,RotZ=150](40,20,10){10}{50} -\ConeThreeD[fracHeight=0.5](20,-20,0){10}{10} -\CylindreThreeD(20,-20,5){5}{50} -\ConeThreeD[fracHeight=0.5](50,50,0){10}{10} -\CylindreThreeD(50,50,5){5}{50} -\end{pspicture}} -\caption{\label{Cone}Cones and cylinders.} -\end{figure} - -\section{Points and lines} -The command allowing to mark points and thus to draw lines -and polygons can be used of two manners, either with the Cartesian coordinates - \begin{verbatim} -\pNodeThreeD(x,y,z){name} -\end{verbatim} - or with the spherical coordinates : -\begin{verbatim} -\pNodeThreeD(radius;longitude;latitude)% - {name of the point} -\end{verbatim} - -For example \verb+\pNodeThreeD(25,-25,25){A}+, the point $A(25,25,25)$ places. -Points being positioned, just to write \verb+\psline(A)(B)+, to draw the segment $AB$. - - On the figure~\ref {points}, one drew a cube with its diagonals. -\begin{figure}[!htb] -\centering -\psset{unit=1cm} - \psset{THETA=70,PHI=30,Dobs=150,Decran=10} - \begin{pspicture}(-3,-3)(3,4) - \AxesThreeD[linecolor=red,linestyle=dashed](50,60,50) - \pNodeThreeD(25,-25,25){A} - \pNodeThreeD(25,25,25){B} - \pNodeThreeD(25,25,-25){C} - \pNodeThreeD(25,-25,-25){D} - \pNodeThreeD(-25,-25,25){E} - \pNodeThreeD(-25,25,25){F} - \pNodeThreeD(-25,25,-25){G} - \pNodeThreeD(-25,-25,-25){H} - \pspolygon(A)(B)(C)(D) - \pspolygon(E)(F)(G)(H) - \psline(A)(E) - \psline(B)(F) - \psline(C)(G) - \psline(D)(H) - \psset{linestyle=dashed} - \psline(A)(G) - \psline(B)(H) - \psline(C)(E) - \psline(D)(F) -% routine page 49 in "présentation de PSTricks" -% D.Girou "cahier 16 Gutengerg" - \newcounter{lettre} - \multido{\i=1+1}{8}{% - \setcounter{lettre}{\i} - \psdot[linecolor=red](\Alph{lettre}) - \uput[90](\Alph{lettre}){\Alph{lettre}} - } -\end{pspicture} -\caption{\label{points}Points and lines.} -\end{figure} - - -\section{Circles} -A circle is defined by a vector normal for its plan by $(\theta,\varphi)$, with the following parameters for example: -\begin{verbatim} -normaleLongitude=60,normaleLatitude=90 -\end{verbatim} -The coordinates of his centre as well as his radius. -\begin{verbatim} -\CircleThreeD(x,y,z){radius} -\end{verbatim} - -The circles of the figure~\ref{circles}, were drawn with the following -commands: - -\begin{figure}[!htb] -\centering -\psframebox{% - \begin{pspicture}(-2.5,-3.5)(3.5,1.5) - \psset{THETA=50,PHI=50,Dobs=250,Decran=10} - \multido{\iX=-70+10}{15}{% - \pNodeThreeD(\iX,0,0){X1} - \pNodeThreeD(\iX,50,0){X2} - \psline(X1)(X2) - } - \multido{\iY=0+10}{6}{% - \pNodeThreeD(-70,\iY,0){Y1} - \pNodeThreeD(70,\iY,0){Y2} - \psline(Y1)(Y2)% - } - \psset{normaleLongitude=0,normaleLatitude=90} - \multido{\iXorigine=-65+10}{14}{% - \multido{\iYorigine=5+10}{5}{% - \CircleThreeD[linecolor=red](\iXorigine,\iYorigine,0){5}% - }% - } - \end{pspicture}% -} -\caption{\label{circles}circles.} -\end{figure} - -\begin{verbatim} -\psset{normaleLongitude=0,% - normaleLatitude=90} -\multido{\iXorigine=-65+10}{14}{% - \multido{\iYorigine=5+10}{5}{% - \CircleThreeD[linecolor=red]% - (\iXorigine,\iYorigine,0){5}}} -\end{verbatim} - -\section{The macros and the options} -\subsection{The colors of the cube, the pyramid and tetraedre} - -The predefined colors for the different sides of a cube are -always set in the \verb+rgb+ mode : -\begin{verbatim} -CubeColorFaceOne=1 1 0,% -CubeColorFaceTwo=0.9 0.9 0,% -CubeColorFaceThree=0.8 0.8 0,% -CubeColorFaceFour=0.7 0.7 0,% -CubeColorFaceFive=0.65 0.65 0,% -CubeColorFaceSix=0.75 0.75 0 -\end{verbatim} - -The colors for the pyramid and the tetraedre are taken from the predefined ones: -\begin{verbatim} -ColorFaceD=cyan, -ColorFaceA=magenta, -ColorFaceB=red, -ColorFaceC=blue, -ColorFaceE=yellow -\end{verbatim} - -They can be changed in the usual way with the \verb+\psset+ macro. - - -\subsection{Common parameters} -\verb+RotX=, RotY=, RotZ=+ - -The predefined value is zero, means no rotation. - -\subsection{Cube} -The following command places a parallelepiped with a length of $a=40$, $b=20$ and $c=10$ units -and it is placed with its center at the point $x=25$, $y=25$ and $z=25$ - -\begin{verbatim} -\CubeThreeD[A=20,B=10,C=5](25,25,25) -\end{verbatim} - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3,-3)(3,3.5) -\psset{PHI=30,THETA=45,Dobs=200} -\PlansOXYZ\AxesThreeD(55) -\FrameThreeD[normaleLongitude=0,% - normaleLatitude=90,% - fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-10,-15)(10,15) -\FrameThreeD[normaleLongitude=0,% - normaleLatitude=0,% - fillstyle=vlines,hatchsep=0.4mm](0,25,25)(-10,-5)(10,5) -\FrameThreeD[normaleLongitude=90,% - normaleLatitude=0,% - fillstyle=vlines,hatchsep=0.4mm](25,0,25)(-15,-5)(15,5) -\CubeThreeD[A=15,B=10,C=5](25,25,25)% -\end{pspicture} -\caption{\label{Prisme}Parallelepiped} -\end{figure} - -In other words: the length of the sides is \verb+2A,2B,2C+ (see figure~\ref{Prisme}). - -For rotations, let us consider the result of a rotation around one of the axes, while knowing that it is possible to combine them. The corresponding rotation of projection on the horizontal level is obtained with the parameter: \verb+normaleLongitude=+ (figure~\ref{PrismeRotZ}). - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3,-3)(3,3.5) -\psset{PHI=30,THETA=45,Dobs=200,RotZ=60} -\PlansOXYZ\AxesThreeD(55) -% la projection sur le plan Oxy -\FrameThreeD[normaleLongitude=60,% - normaleLatitude=90,% - fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-10,-15)(10,15) -\CubeThreeD[A=15,B=10,C=5](25,25,25)% -\end{pspicture} -\caption{\label{PrismeRotZ}The same parallelepiped rotated with \texttt{RotZ=60}.} -\end{figure} - -There is no difference to a die, except that all sides have the same length. - - -\begin{figure}[!htb] -\centering -\begin{pspicture}(-3,-3)(3,3.5) -\psset{PHI=30,THETA=45,Dobs=200,RotZ=60,,RotX=90} -\PlansOXYZ\AxesThreeD(55) -% la projection sur le plan Oxy -\FrameThreeD[normaleLongitude=60,% - normaleLatitude=90,% - fillstyle=vlines,hatchsep=0.4mm](25,25,0)(-5,-15)(5,15) -\CubeThreeD[A=15,B=10,C=5](25,25,25)% -\end{pspicture} -\caption{\label{PrismeRotXRotZ}The same parallelepiped, rotated with the values \texttt{RotX=90,RotZ=60}} -\end{figure} - - -\subsection{Cylinder and circle} -In addition to the already quoted optional parameters the cylinder requires the obligatory parameters: -\begin{verbatim} -\CylindreThreeD[...](x,y,z){radius}{height} -\end{verbatim} - -Projection on the horizontal level is obtained with the following values: - -\begin{verbatim} -\CircleThreeD[normaleLongitude=0,% - normaleLatitude=90,% - fillstyle=vlines,% - hatchsep=0.4mm](30,30,0){10} -\end{verbatim} - -The circle macro needs the following parameters: - -\begin{verbatim} -\CircleThreeD[...](x,y,z){radius} -\end{verbatim} - -Figure~\ref{CylindreDemo} shows an example of the above macros. - -\begin{figure}[!ht] -\centering -\begin{pspicture}(-3,-3)(3,3.5) -\psset{PHI=30,THETA=45,Dobs=200} -\PlansOXYZ\AxesThreeD(55) -% la projection sur le plan Oxy -\CircleThreeD[normaleLongitude=0,% - normaleLatitude=90,% - fillstyle=vlines,% - hatchsep=0.4mm](30,30,0){10} -\CylindreThreeD[fillstyle=solid,fillcolor=yellow,% - linewidth=0.1mm](30,30,20){10}{30}% -\end{pspicture} -\caption{\label{CylindreDemo}A cylinder with a radius of $10$ units and a - height of $50$ units - with its base center at \texttt{(30,30,20)}.% -} -\end{figure} - - -\section{See the interior of a cube} -The following option makes it possible to visualize the interior of the box, the result is seen in the figure~\ref{Cube inside} : - -\begin{verbatim} -\DieThreeD(0,0,0)% -\begin{psclip}{% -\FrameThreeD[normaleLongitude=0,% - normaleLatitude=90]% - (0,0,10)(-10,-10)(10,10)}% -\DieThreeD[CubeInside=true](0,0,0)% -\end{psclip}% -\end{verbatim} - -\begin{figure} -\centering -\begin{pspicture}(-2,-2)(2,3.5) - \psset{A=10,B=10,C=10,PHI=60,THETA=-60} - \DieThreeD(0,0,0)% - \begin{psclip}{% - \FrameThreeD[normaleLongitude=0,% - normaleLatitude=90](0,0,10)(-10,-10)(10,10)}% - \DieThreeD[CubeInside=true](0,0,0)% - \end{psclip}% - \FrameThreeD[normaleLongitude=0,% - normaleLatitude=90,linewidth=1mm](0,0,10)(-10,-10)(10,10)% -\end{pspicture} -\caption{\label{Cube inside}An empty box.} -\end{figure} - - - -\end{document} diff --git a/Master/texmf-dist/dvips/pst-vue3d/3D.pro b/Master/texmf-dist/dvips/pst-vue3d/3D.pro deleted file mode 100644 index dc7bf00331d..00000000000 --- a/Master/texmf-dist/dvips/pst-vue3d/3D.pro +++ /dev/null @@ -1,2089 +0,0 @@ -%version 31 octobre 2003 -% -/tx@3DDict 100 dict def -tx@3DDict begin -/Cube{% - /XA M11 A mul M12 B mul add M13 C mul add CX add def - /YA M21 A mul M22 B mul add M23 C mul add CY add def - /ZA M31 A mul M32 B mul add M33 C mul add CZ add def - /XB M11 A mul neg M12 B mul add M13 C mul add CX add def - /YB M21 A mul neg M22 B mul add M23 C mul add CY add def - /ZB M31 A mul neg M32 B mul add M33 C mul add CZ add def - /XC M11 A mul neg M12 B mul neg add M13 C mul add CX add def - /YC M21 A mul neg M22 B mul neg add M23 C mul add CY add def - /ZC M31 A mul neg M32 B mul neg add M33 C mul add CZ add def - /XD M11 A mul M12 B mul neg add M13 C mul add CX add def - /YD M21 A mul M22 B mul neg add M23 C mul add CY add def - /ZD M31 A mul M32 B mul neg add M33 C mul add CZ add def - /XE M11 A mul M12 B mul add M13 C mul sub CX add def - /YE M21 A mul M22 B mul add M23 C mul sub CY add def - /ZE M31 A mul M32 B mul add M33 C mul sub CZ add def - /XF M11 A mul neg M12 B mul add M13 C mul sub CX add def - /YF M21 A mul neg M22 B mul add M23 C mul sub CY add def - /ZF M31 A mul neg M32 B mul add M33 C mul sub CZ add def - /XG M11 A mul neg M12 B mul sub M13 C mul sub CX add def - /YG M21 A mul neg M22 B mul sub M23 C mul sub CY add def - /ZG M31 A mul neg M32 B mul sub M33 C mul sub CZ add def - /XH M11 A mul M12 B mul sub M13 C mul sub CX add def - /YH M21 A mul M22 B mul sub M23 C mul sub CY add def - /ZH M31 A mul M32 B mul sub M33 C mul sub CZ add def -% Centres des faces : condition de visibilité -% FACE 1 -% OC1 - /XC1 M13 C mul CX add def - /YC1 M23 C mul CY add def - /ZC1 M33 C mul CZ add def -% Normale à la face 1 - /NX1 M13 C mul def - /NY1 M23 C mul def - /NZ1 M33 C mul def -% rayon vers point de vue - /RXvue1 XC1 XpointVue sub def - /RYvue1 YC1 YpointVue sub def - /RZvue1 ZC1 ZpointVue sub def -% produit scalaire - /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def -% FACE 2 -% OC2 - /XC2 M11 A mul CX add def - /YC2 M21 A mul CY add def - /ZC2 M31 A mul CZ add def -% normale à la face 2 - /NX2 M11 A mul def - /NY2 M21 A mul def - /NZ2 M31 A mul def -% rayon vers point de vue - /RXvue2 XC2 XpointVue sub def - /RYvue2 YC2 YpointVue sub def - /RZvue2 ZC2 ZpointVue sub def -% produit scalaire - /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def -% FACE 3 -% OC3 - /XC3 M13 C neg mul CX add def - /YC3 M23 C neg mul CY add def - /ZC3 M33 C neg mul CZ add def -% normale à la face 3 - /NX3 M13 C neg mul def - /NY3 M23 C neg mul def - /NZ3 M33 C neg mul def -% rayon vers point de vue - /RXvue3 XC3 XpointVue sub def - /RYvue3 YC3 YpointVue sub def - /RZvue3 ZC3 ZpointVue sub def -% produit scalaire - /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def -% FACE 4 -% OC4 - /XC4 M11 A neg mul CX add def - /YC4 M21 A neg mul CY add def - /ZC4 M31 A neg mul CZ add def -% normale à la face 4 - /NX4 M11 A neg mul def - /NY4 M21 A neg mul def - /NZ4 M31 A neg mul def -% rayon vers point de vue - /RXvue4 XC4 XpointVue sub def - /RYvue4 YC4 YpointVue sub def - /RZvue4 ZC4 ZpointVue sub def -% produit scalaire - /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def -% FACE 5 -% OC5 - /XC5 M12 B neg mul CX add def - /YC5 M22 B neg mul CY add def - /ZC5 M32 B neg mul CZ add def -% normale à la face 5 - /NX5 M12 B neg mul def - /NY5 M22 B neg mul def - /NZ5 M32 B neg mul def -% rayon vers point de vue - /RXvue5 XC5 XpointVue sub def - /RYvue5 YC5 YpointVue sub def - /RZvue5 ZC5 ZpointVue sub def -% produit scalaire - /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def -% FACE 6 -% OC6 - /XC6 M12 B mul CX add def - /YC6 M22 B mul CY add def - /ZC6 M32 B mul CZ add def -% normale à la face 6 - /NX6 M12 B mul def - /NY6 M22 B mul def - /NZ6 M32 B mul def -% rayon vers point de vue - /RXvue6 XC6 XpointVue sub def - /RYvue6 YC6 YpointVue sub def - /RZvue6 ZC6 ZpointVue sub def -% produit scalaire - /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def -% faceOne -PS1 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YA def - /Zcote ZA def - /Xabscisse XA def - CalcCoordinates - moveto - /Zcote ZB def - /Xabscisse XB def - /Yordonnee YB def - CalcCoordinates - lineto - /Zcote ZC def - /Xabscisse XC def - /Yordonnee YC def - CalcCoordinates - lineto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto - /Zcote ZA def - /Xabscisse XA def - /Yordonnee YA def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceOne setrgbcolor -fill -grestore -stroke -} if -% faceTwo -PS2 0 Condition{ % -reduction reduction scale -1 setlinejoin -newpath - /Xabscisse XA def - /Yordonnee YA def - /Zcote ZA def - CalcCoordinates - moveto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto - /Zcote ZE def - /Xabscisse XE def - /Yordonnee YE def - CalcCoordinates - lineto - /Zcote ZA def - /Xabscisse XA def - /Yordonnee YA def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceTwo setrgbcolor -fill -grestore -stroke -} if -% face three -PS3 0 Condition{ % -reduction reduction scale -1 setlinejoin -newpath - /Xabscisse XE def - /Yordonnee YE def - /Zcote ZE def - CalcCoordinates - moveto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto - /Zcote ZE def - /Xabscisse XE def - /Yordonnee YE def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceThree setrgbcolor -fill -grestore -stroke -} if -% face four -PS4 0 Condition{ % -reduction reduction scale -1 setlinejoin -newpath - /Xabscisse XB def - /Yordonnee YB def - /Zcote ZB def - CalcCoordinates - moveto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto - /Zcote ZC def - /Xabscisse XC def - /Yordonnee YC def - CalcCoordinates - lineto - /Zcote ZB def - /Xabscisse XB def - /Yordonnee YB def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceFour setrgbcolor -fill -grestore -stroke -} if -% face five -PS5 0 Condition{ % -reduction reduction scale -1 setlinejoin -newpath - /Xabscisse XC def - /Yordonnee YC def - /Zcote ZC def - CalcCoordinates - moveto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto - /Zcote ZC def - /Xabscisse XC def - /Yordonnee YC def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceFive setrgbcolor -fill -grestore -stroke -} if -% face six -PS6 0 Condition{ % -reduction reduction scale -1 setlinejoin -newpath - /Xabscisse XB def - /Yordonnee YB def - /Zcote ZB def - CalcCoordinates - moveto - /Zcote ZA def - /Xabscisse XA def - /Yordonnee YA def - CalcCoordinates - lineto - /Zcote ZE def - /Xabscisse XE def - /Yordonnee YE def - CalcCoordinates - lineto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto - /Zcote ZB def - /Xabscisse XB def - /Yordonnee YB def - CalcCoordinates - lineto -closepath -gsave -CubeColorFaceSix setrgbcolor -fill -grestore -stroke -} if -} -def -% -/PointsDie{% -PS6 0 Condition{ % -reduction reduction scale -A 2 div neg A A 2 div { - /XCpoint exch def -C 2 div neg C C 2 div { - /ZCpoint exch def -newpath - /Zpoint Rpoint ZCpoint add def - /Xpoint XCpoint def - /Ypoint B def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Zpoint Rpoint Angle cos mul ZCpoint add def - /Xpoint Rpoint Angle sin mul XCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill - } for - } for - } if -PS5 0 Condition{ % -reduction reduction scale -newpath - /Ypoint B neg def - /XCpoint A 2 div neg def - /ZCpoint C 2 div def - /Xpoint Rpoint XCpoint add def - /Zpoint ZCpoint def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint Rpoint Angle cos mul XCpoint add def - /Zpoint Rpoint Angle sin mul ZCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -% -newpath - /XCpoint A 2 div def - /ZCpoint C 2 div neg def - /Xpoint Rpoint XCpoint add def - /Zpoint ZCpoint def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint Rpoint Angle cos mul XCpoint add def - /Zpoint Rpoint Angle sin mul ZCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -% -newpath - /XCpoint 0 def - /ZCpoint 0 def - /Xpoint Rpoint XCpoint add def - /Zpoint ZCpoint def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint Rpoint Angle cos mul XCpoint add def - /Zpoint Rpoint Angle sin mul ZCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -} if -PS4 0 Condition{ % -reduction reduction scale -C 2 div neg C C 2 div { - /ZCpoint exch def -B 2 div neg B B 2 div { - /YCpoint exch def -newpath - /Zpoint Rpoint ZCpoint add def - /Ypoint YCpoint def - /Xpoint A neg def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Zpoint Rpoint Angle cos mul ZCpoint add def - /Ypoint Rpoint Angle sin mul YCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill - } for - } for -% le point du milieu -newpath - /Zpoint Rpoint def - /Ypoint 0 def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Zpoint Rpoint Angle cos mul def - /Ypoint Rpoint Angle sin mul def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -} if -PS3 0 Condition{ % -reduction reduction scale -A 2 div neg A A 2 div { - /XCpoint exch def -B 2 div neg B 2 div B 2 div { - /YCpoint exch def -newpath - /Xpoint Rpoint XCpoint add def - /Ypoint YCpoint def - /Zpoint C neg def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint Rpoint Angle cos mul XCpoint add def - /Ypoint Rpoint Angle sin mul YCpoint add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill - } for - } for -} if -PS2 0 Condition{ % -reduction reduction scale -newpath - /Xpoint A def - /Ypoint Rpoint B 2 div add def - /Zpoint C 2 div neg def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Ypoint Rpoint Angle cos mul B 2 div add def - /Zpoint Rpoint Angle sin mul C 2 div sub def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -newpath - /Xpoint A def - /Ypoint Rpoint B 2 div sub def - /Zpoint C 2 div def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint A def - /Ypoint Rpoint Angle cos mul B 2 div sub def - /Zpoint Rpoint Angle sin mul A 2 div add def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -} if -PS1 0 Condition{ % -reduction reduction scale -newpath - /Xpoint Rpoint def - /Ypoint 0 def - /Zpoint C def -CalculsPointsAfterTransformations -CalcCoordinates - moveto -0 1 359 {% - /Angle exch def - /Xpoint Rpoint Angle cos mul def - /Ypoint Rpoint Angle sin mul def -CalculsPointsAfterTransformations -CalcCoordinates - lineto - } for -closepath -0 setgray -fill -} if -} def -% -/CalcCoordinates{% - formulesTroisD - Xi 28.45 mul Yi 28.45 mul - } - def -% pour la 3D conventionnelle -/formulesTroisD{% - /xObservateur Xabscisse Sin1 mul neg Yordonnee Cos1 mul add def - /yObservateur Xabscisse Cos1Sin2 mul neg Yordonnee Sin1Sin2 mul sub Zcote Cos2 mul add def - /zObservateur Xabscisse neg Cos1Cos2 mul Yordonnee Sin1Cos2 mul sub Zcote Sin2 mul sub Dobs add def - /Xi DScreen xObservateur mul zObservateur div def - /Yi DScreen yObservateur mul zObservateur div def - } -def -% -/CalculsPointsAfterTransformations{% - /Xabscisse M11 Xpoint mul M12 Ypoint mul add M13 Zpoint mul add CX add def - /Yordonnee M21 Xpoint mul M22 Ypoint mul add M23 Zpoint mul add CY add def - /Zcote M31 Xpoint mul M32 Ypoint mul add M33 Zpoint mul add CZ add def - } -def -% -/SommetsTetraedre{% - /xA RayonBaseTetraedre neg def - /yA 0 def - /zA 0 def - /xB 0.5 RayonBaseTetraedre mul def - /yB RayonBaseTetraedre 0.866 mul neg def - /zB 0 def - /xC xB def - /yC yB neg def - /zC 0 def - /xD 0 def - /yD 0 def - /zD RayonBaseTetraedre 1.414 mul def -% coordonnées centre des faces - /xFaceA xA xB xC add add 3 div def - /yFaceA yA yB yC add add 3 div def - /zFaceA zA zB zC add add 3 div def - /xFaceB xD xA xB add add 3 div def - /yFaceB yD yA yB add add 3 div def - /zFaceB zD zA zB add add 3 div def - /xFaceC xA xD xC add add 3 div def - /yFaceC yA yD yC add add 3 div def - /zFaceC zA zD zC add add 3 div def - /xFaceD xD xB xC add add 3 div def - /yFaceD yD yB yC add add 3 div def - /zFaceD zD zB zC add add 3 div def -% sommets après rotation et translation - /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def - /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def - /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def - /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def - /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def - /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def - /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def - /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def - /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def - /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def - /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def - /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def -% centres de faces après transformations - /XFaceA M11 xFaceA mul M12 yFaceA mul add M13 zFaceA mul add CX add def - /YFaceA M21 xFaceA mul M22 yFaceA mul add M23 zFaceA mul add CY add def - /ZFaceA M31 xFaceA mul M32 yFaceA mul add M33 zFaceA mul add CZ add def - /XFaceB M11 xFaceB mul M12 yFaceB mul add M13 zFaceB mul add CX add def - /YFaceB M21 xFaceB mul M22 yFaceB mul add M23 zFaceB mul add CY add def - /ZFaceB M31 xFaceB mul M32 yFaceB mul add M33 zFaceB mul add CZ add def - /XFaceC M11 xFaceC mul M12 yFaceC mul add M13 zFaceC mul add CX add def - /YFaceC M21 xFaceC mul M22 yFaceC mul add M23 zFaceC mul add CY add def - /ZFaceC M31 xFaceC mul M32 yFaceC mul add M33 zFaceC mul add CZ add def - /XFaceD M11 xFaceD mul M12 yFaceD mul add M13 zFaceD mul add CX add def - /YFaceD M21 xFaceD mul M22 yFaceD mul add M23 zFaceD mul add CY add def - /ZFaceD M31 xFaceD mul M32 yFaceD mul add M33 zFaceD mul add CZ add def -% Normales aux faces - /NxA XFaceA XD sub def - /NyA YFaceA YD sub def - /NzA ZFaceA ZD sub def - /NxB XFaceB XC sub def - /NyB YFaceB YC sub def - /NzB ZFaceB ZC sub def - /NxC XFaceC XB sub def - /NyC YFaceC YB sub def - /NzC ZFaceC ZB sub def - /NxD XFaceD XA sub def - /NyD YFaceD YA sub def - /NzD ZFaceD ZA sub def -% Conditions de visibilité -% rayon vers point de vue - /RXvueA XFaceA XpointVue sub def - /RYvueA YFaceA YpointVue sub def - /RZvueA ZFaceA ZpointVue sub def - /RXvueB XFaceB XpointVue sub def - /RYvueB YFaceB YpointVue sub def - /RZvueB ZFaceB ZpointVue sub def - /RXvueC XFaceC XpointVue sub def - /RYvueC YFaceC YpointVue sub def - /RZvueC ZFaceC ZpointVue sub def - /RXvueD XFaceD XpointVue sub def - /RYvueD YFaceD YpointVue sub def - /RZvueD ZFaceD ZpointVue sub def -% produit scalaire - /PSA RXvueA NxA mul RYvueA NyA mul add RZvueA NzA mul add def - /PSB RXvueB NxB mul RYvueB NyB mul add RZvueB NzB mul add def - /PSC RXvueC NxC mul RYvueC NyC mul add RZvueC NzC mul add def - /PSD RXvueD NxD mul RYvueD NyD mul add RZvueD NzD mul add def - } - def -/Tetraedre{% -SommetsTetraedre -% face ABC - PSA 0 le { % -reduction reduction scale -1 setlinejoin - /Xabscisse XA def - /Yordonnee YA def - /Zcote ZA def - CalcCoordinates - moveto - /Xabscisse XB def - /Yordonnee YB def - /Zcote ZB def - CalcCoordinates - lineto - /Xabscisse XC def - /Yordonnee YC def - /Zcote ZC def - CalcCoordinates - lineto - /Xabscisse XA def - /Yordonnee YA def - /Zcote ZA def - CalcCoordinates - lineto -} if -% face DAB - PSB 0 le { % -reduction reduction scale -1 setlinejoin - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - moveto - /Xabscisse XA def - /Yordonnee YA def - /Zcote ZA def - CalcCoordinates - lineto - /Xabscisse XB def - /Yordonnee YB def - /Zcote ZB def - CalcCoordinates - lineto - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - lineto -} if -% face DAC -PSC 0 le { % -reduction reduction scale -1 setlinejoin - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - moveto - /Xabscisse XA def - /Yordonnee YA def - /Zcote ZA def - CalcCoordinates - lineto - /Xabscisse XC def - /Yordonnee YC def - /Zcote ZC def - CalcCoordinates - lineto - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - lineto -} if -% face DBC - PSD 0 le { % -reduction reduction scale -1 setlinejoin - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - moveto - /Xabscisse XB def - /Yordonnee YB def - /Zcote ZB def - CalcCoordinates - lineto - /Xabscisse XC def - /Yordonnee YC def - /Zcote ZC def - CalcCoordinates - lineto - /Xabscisse XD def - /Yordonnee YD def - /Zcote ZD def - CalcCoordinates - lineto -} if -} -def -% -/SommetsPyramide{% - /xA A def - /yA A neg def - /zA 0 def - /xB A def - /yB A def - /zB 0 def - /xC A neg def - /yC A def - /zC 0 def - /xD A neg def - /yD A neg def - /zD 0 def - /xS 0 def - /yS 0 def - /zS Hpyramide def -% coordonnées centre des faces - /Alpha A Hpyramide atan def - /xFaceSAB Hpyramide Alpha dup sin exch cos mul mul def - /yFaceSAB 0 def - /zFaceSAB Hpyramide Alpha sin dup mul mul def - /xFaceSBC 0 def - /yFaceSBC xFaceSAB def - /zFaceSBC zFaceSAB fracHeight mul def - /xFaceSCD xFaceSAB neg def - /yFaceSCD 0 def - /zFaceSCD zFaceSAB fracHeight mul def - /xFaceSDA 0 def - /yFaceSDA xFaceSAB neg def - /zFaceSDA zFaceSAB fracHeight mul def -% sommets après rotation et translation - /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def - /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def - /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def - /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def - /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def - /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def - /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def - /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def - /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def - /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def - /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def - /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def - /XS M11 xS mul M12 yS mul add M13 zS mul add CX add def - /YS M21 xS mul M22 yS mul add M23 zS mul add CY add def - /ZS M31 xS mul M32 yS mul add M33 zS mul add CZ add def -% centres de faces après transformations - /XFaceSAB M11 xFaceSAB mul M12 yFaceSAB mul add M13 zFaceSAB mul add CX add def - /YFaceSAB M21 xFaceSAB mul M22 yFaceSAB mul add M23 zFaceSAB mul add CY add def - /ZFaceSAB M31 xFaceSAB mul M32 yFaceSAB mul add M33 zFaceSAB mul add CZ add def - /XFaceSBC M11 xFaceSBC mul M12 yFaceSBC mul add M13 zFaceSBC mul add CX add def - /YFaceSBC M21 xFaceSBC mul M22 yFaceSBC mul add M23 zFaceSBC mul add CY add def - /ZFaceSBC M31 xFaceSBC mul M32 yFaceSBC mul add M33 zFaceSBC mul add CZ add def - /XFaceSCD M11 xFaceSCD mul M12 yFaceSCD mul add M13 zFaceSCD mul add CX add def - /YFaceSCD M21 xFaceSCD mul M22 yFaceSCD mul add M23 zFaceSCD mul add CY add def - /ZFaceSCD M31 xFaceSCD mul M32 yFaceSCD mul add M33 zFaceSCD mul add CZ add def - /XFaceSDA M11 xFaceSDA mul M12 yFaceSDA mul add M13 zFaceSDA mul add CX add def - /YFaceSDA M21 xFaceSDA mul M22 yFaceSDA mul add M23 zFaceSDA mul add CY add def - /ZFaceSDA M31 xFaceSDA mul M32 yFaceSDA mul add M33 zFaceSDA mul add CZ add def -% Normales aux faces - /NxSAB XFaceSAB CX sub def - /NySAB YFaceSAB CY sub def - /NzSAB ZFaceSAB CZ sub def - /NxSBC XFaceSBC CX sub def - /NySBC YFaceSBC CY sub def - /NzSBC ZFaceSBC CZ sub def - /NxSCD XFaceSCD CX sub def - /NySCD YFaceSCD CY sub def - /NzSCD ZFaceSCD CZ sub def - /NxSDA XFaceSDA CX sub def - /NySDA YFaceSDA CY sub def - /NzSDA ZFaceSDA CZ sub def - /NxABCD CX XS sub def - /NyABCD CY YS sub def - /NzABCD CZ ZS sub def -% Conditions de visibilité -% rayon vers point de vue - /RXvueSAB XFaceSAB XpointVue sub def - /RYvueSAB YFaceSAB YpointVue sub def - /RZvueSAB ZFaceSAB ZpointVue sub def - /RXvueSBC XFaceSBC XpointVue sub def - /RYvueSBC YFaceSBC YpointVue sub def - /RZvueSBC ZFaceSBC ZpointVue sub def - /RXvueSCD XFaceSCD XpointVue sub def - /RYvueSCD YFaceSCD YpointVue sub def - /RZvueSCD ZFaceSCD ZpointVue sub def - /RXvueSDA XFaceSDA XpointVue sub def - /RYvueSDA YFaceSDA YpointVue sub def - /RZvueSDA ZFaceSDA ZpointVue sub def - /RXvueABCD CX XpointVue sub def - /RYvueABCD CY YpointVue sub def - /RZvueABCD CZ ZpointVue sub def - /PSAB RXvueSAB NxSAB mul RYvueSAB NySAB mul add RZvueSAB NzSAB mul add def - /PSBC RXvueSBC NxSBC mul RYvueSBC NySBC mul add RZvueSBC NzSBC mul add def - /PSCD RXvueSCD NxSCD mul RYvueSCD NySCD mul add RZvueSCD NzSCD mul add def - /PSDA RXvueSDA NxSDA mul RYvueSDA NySDA mul add RZvueSDA NzSDA mul add def - /PSABCD RXvueABCD NxABCD mul RYvueABCD NyABCD mul add RZvueABCD NzABCD mul add def - } - def -% -/MaillageSphere { -0 increment 360 increment sub {% - /theta exch def -departPhi increment 90 increment sub {% - /phi exch def -% newpath - /Xpoint Rsphere theta cos mul phi cos mul def - /Ypoint Rsphere theta sin mul phi cos mul def - /Zpoint Rsphere phi sin mul def -CalculsPointsAfterTransformations - CalcCoordinates - moveto -% Centre de la facette - /Xpoint Rsphere theta increment 2 div add cos mul phi increment 2 div add cos mul def - /Ypoint Rsphere theta increment 2 div add sin mul phi increment 2 div add cos mul def - /Zpoint Rsphere phi increment 2 div add sin mul def -CalculsPointsAfterTransformations - /xCentreFacette Xabscisse def - /yCentreFacette Yordonnee def - /zCentreFacette Zcote def -% normale à la facette - /nXfacette xCentreFacette CX sub def - /nYfacette yCentreFacette CY sub def - /nZfacette zCentreFacette CZ sub def -% rayon vers point de vue - /RXvue xCentreFacette XpointVue sub def - /RYvue yCentreFacette YpointVue sub def - /RZvue zCentreFacette ZpointVue sub def -% test de visibilité - /PSfacette RXvue nXfacette mul - RYvue nYfacette mul add - RZvue nZfacette mul add - def -condition { -theta 1 theta increment add {% - /theta1 exch def - /Xpoint Rsphere theta1 cos mul phi cos mul def - /Ypoint Rsphere theta1 sin mul phi cos mul def - /Zpoint Rsphere phi sin mul def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -phi 1 phi increment add { - /phi1 exch def - /Xpoint Rsphere theta increment add cos mul phi1 cos mul def - /Ypoint Rsphere theta increment add sin mul phi1 cos mul def - /Zpoint Rsphere phi1 sin mul def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -theta increment add -1 theta {% - /theta1 exch def - /Xpoint Rsphere theta1 cos mul phi increment add cos mul def - /Ypoint Rsphere theta1 sin mul phi increment add cos mul def - /Zpoint Rsphere phi increment add sin mul def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -phi increment add -1 phi { - /phi1 exch def - /Xpoint Rsphere theta cos mul phi1 cos mul def - /Ypoint Rsphere theta sin mul phi1 cos mul def - /Zpoint Rsphere phi1 sin mul def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -} if -} for -} for -} def -% -/CylinderThreeD{ -reduction reduction scale -1 setlinejoin -0 incrementANGLE 360 {% - /theta exch def - 0 incrementHAUTEUR Hcylindre incrementHAUTEUR sub {% - /H exch def -% newpath - /X1 Rcylindre theta cos mul def - /Y1 Rcylindre theta sin mul def - /Z1 H def - /Xpoint X1 def - /Ypoint Y1 def - /Zpoint Z1 def -CalculsPointsAfterTransformations - /Xfacette Xabscisse def - /Yfacette Yordonnee def - /Zfacette Zcote def - CalcCoordinates - moveto -% coordonnées du centre de la facette - /Xpoint Rcylindre theta incrementANGLE 2 div add cos mul def - /Ypoint Rcylindre theta incrementANGLE 2 div add sin mul def - /Zpoint H incrementHAUTEUR 2 div add def -CalculsPointsAfterTransformations -% Point sur l'axe du cylindre -% à la même hauteur que M1 - /Zpoint Z1 def - /Xpoint 0 def - /Ypoint 0 def -CalculsPointsAfterTransformations -% normale à la facette - /nXfacette Xfacette Xabscisse sub def - /nYfacette Yfacette Yordonnee sub def - /nZfacette Zfacette Zcote sub def -% rayon vers point de vue - /RXvue Xfacette XpointVue sub def - /RYvue Yfacette YpointVue sub def - /RZvue Zfacette ZpointVue sub def -% test de visibilité - /PSfacette nXfacette RXvue mul - nYfacette RYvue mul add - nZfacette RZvue mul add - def -PSfacette 0 le { -theta 1 theta incrementANGLE add {% - /theta1 exch def - /Xpoint Rcylindre theta1 cos mul def - /Ypoint Rcylindre theta1 sin mul def - /Zpoint H def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -H 1 H incrementHAUTEUR add { - /H1 exch def - /Xpoint Rcylindre theta incrementANGLE add cos mul def - /Ypoint Rcylindre theta incrementANGLE add sin mul def - /Zpoint H1 def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -theta incrementANGLE add -1 theta {% - /theta1 exch def - /Xpoint Rcylindre theta1 cos mul def - /Ypoint Rcylindre theta1 sin mul def - /Zpoint H incrementHAUTEUR add def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -H incrementHAUTEUR add -1 H { - /H1 exch def - /Xpoint Rcylindre theta cos mul def - /Ypoint Rcylindre theta sin mul def - /Zpoint H1 def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -} if -} for -} for -% Face supérieure -% centre de la face supérieure - /Xpoint 0 def - /Zpoint Hcylindre def - /Ypoint 0 def -CalculsPointsAfterTransformations - /CxFaceSup Xabscisse def - /CyFaceSup Yordonnee def - /CzFaceSup Zcote def -% centre de la face inférieure - /CxFaceInf CX def - /CyFaceInf CY def - /CzFaceInf CZ def -% Normale à la face supérieure - /nXFaceSup CxFaceSup CxFaceInf sub def - /nYFaceSup CyFaceSup CyFaceInf sub def - /nZFaceSup CzFaceSup CzFaceInf sub def -% rayon vers point de vue verd la face inférieure - /RXvueInf CxFaceInf XpointVue sub def - /RYvueInf CyFaceInf YpointVue sub def - /RZvueInf CzFaceInf ZpointVue sub def -% rayon vers point de vue verd la face supérieure - /RXvueSup CxFaceSup XpointVue sub def - /RYvueSup CyFaceSup YpointVue sub def - /RZvueSup CzFaceSup ZpointVue sub def -% Visibilité face supérieure - /PSfaceSup RXvueSup nXFaceSup mul - RYvueSup nYFaceSup mul add - RZvueSup nZFaceSup mul add def -% Visibilité face inférieure - /PSfaceInf RXvueInf nXFaceSup neg mul - RYvueInf nYFaceSup mul sub - RZvueInf nZFaceSup mul sub def -PSfaceSup 0 le { -/TableauxPoints [ -0 1 359 {% on décrit le cercle - /theta exch def [ - /Xpoint Rcylindre theta cos mul def - /Ypoint Rcylindre theta sin mul def - /Zpoint Hcylindre def -CalculsPointsAfterTransformations - CalcCoordinates ] - } for - ] def -gsave -newpath - TableauxPoints 0 get aload pop moveto -0 1 359 { - /compteur exch def - TableauxPoints compteur get aload pop - lineto } for -0.7 setgray -closepath -fill -grestore - } if -% face inférieure -PSfaceInf 0 le { -/TableauxPoints [ -0 1 359 {% on décrit le cercle - /theta exch def [ - /Xpoint Rcylindre theta cos mul def - /Ypoint Rcylindre theta sin mul def - /Zpoint 0 def -CalculsPointsAfterTransformations - CalcCoordinates ] - } for - ] def -gsave -newpath - TableauxPoints 0 get aload pop moveto - 0 1 359 { - /compteur exch def - TableauxPoints compteur get aload pop - lineto } for -0.7 setgray -closepath -fill -grestore - } if - } def -% - % -/ConeThreeD{ - /AngleCone Rcone Hcone atan def - /TanAngleCone AngleCone dup sin exch cos div def - /incrementANGLE 10 def - /incrementHAUTEUR Hcone fracHeight mul 5 div def -1 setlinejoin -newpath -0 incrementANGLE 360 {% - /theta exch def - 0 incrementHAUTEUR Hcone fracHeight mul incrementHAUTEUR sub {% - /H exch def - % normale à la facette - /nXfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add cos mul - mul def - /nYfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add sin mul - mul def - /nZfacette Hcone AngleCone sin dup mul mul def - /Xpoint nXfacette def - /Ypoint nYfacette def - /Zpoint nZfacette def -CalculsPointsAfterTransformations - /nXfacette Xabscisse CX sub def - /nYfacette Yordonnee CY sub def - /nZfacette Zcote CZ sub def -% - /OK Hcone H sub TanAngleCone mul def - /Xpoint OK theta cos mul def - /Ypoint OK theta sin mul def - /Zpoint H def -CalculsPointsAfterTransformations - /Xfacette Xabscisse def - /Yfacette Yordonnee def - /Zfacette Zcote def - CalcCoordinates - moveto -% coordonnées du centre de la facette - /OK Hcone H incrementHAUTEUR 2 div add sub TanAngleCone mul def - /Xpoint OK theta incrementANGLE 2 div add cos mul def - /Ypoint OK theta incrementANGLE 2 div add sin mul def - /Zpoint H incrementHAUTEUR 2 div add def -CalculsPointsAfterTransformations - /XcentreFacette Xabscisse def - /YcentreFacette Yordonnee def - /ZcentreFacette Zcote def -% rayon vers point de vue - /RXvue XcentreFacette XpointVue sub def - /RYvue YcentreFacette YpointVue sub def - /RZvue ZcentreFacette ZpointVue sub def -% test de visibilité - /PSfacette nXfacette RXvue mul - nYfacette RYvue mul add - nZfacette RZvue mul add - def -PSfacette 0 le { -theta 1 theta incrementANGLE add {% - /theta1 exch def - /OK Hcone H sub TanAngleCone mul def - /Xpoint OK theta1 cos mul def - /Ypoint OK theta1 sin mul def - /Zpoint H def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -H 1 H incrementHAUTEUR add { - /H1 exch def - /OK Hcone H1 sub TanAngleCone mul def - /Xpoint OK theta incrementANGLE add cos mul def - /Ypoint OK theta incrementANGLE add sin mul def - /Zpoint H1 def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -theta incrementANGLE add -1 theta {% - /theta1 exch def - /OK Hcone H incrementHAUTEUR add sub TanAngleCone mul def - /Xpoint OK theta1 cos mul def - /Ypoint OK theta1 sin mul def - /Zpoint H incrementHAUTEUR add def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -H incrementHAUTEUR add -1 H { - /H1 exch def - /OK Hcone H1 sub TanAngleCone mul def - /Xpoint OK theta cos mul def - /Ypoint OK theta sin mul def - /Zpoint H1 def -CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -} if -} for -} for -% centre de la base inférieure après transformations - /CxFaceInf CX def - /CyFaceInf CY def - /CzFaceInf CZ def -% modification du 16/11/2002 -% /Xpoint CxFaceInf def -% /Ypoint CyFaceInf def -% /Zpoint CzFaceInf def - /Xpoint 0 def - /Ypoint 0 def - /Zpoint 0 def -% fin modification du 16/11/2002 -CalculsPointsAfterTransformations - /CxBaseInf Xabscisse def - /CyBaseInf Yordonnee def - /CzBaseInf Zcote def -% centre de la base supérieure avant transformations - /CxFaceSup 0 def - /CyFaceSup 0 def - /CzFaceSup Hcone fracHeight mul def -% Sommet du cone - /Xpoint 0 def - /Ypoint 0 def - /Zpoint Hcone def -CalculsPointsAfterTransformations - /XsommetCone Xabscisse def - /YsommetCone Yordonnee def - /ZsommetCone Zcote def -% Normale extérieure à la base inférieure - /nXBaseInf CxFaceInf XsommetCone sub def - /nYBaseInf CyFaceInf YsommetCone sub def - /nZBaseInf CzFaceInf ZsommetCone sub def -% centre de la base supérieure - /Xpoint CxFaceSup def - /Ypoint CyFaceSup def - /Zpoint CzFaceSup def -CalculsPointsAfterTransformations - /CxBaseSup Xabscisse def - /CyBaseSup Yordonnee def - /CzBaseSup Zcote def -% Normale extérieure à la base supérieure - /nXBaseSup XsommetCone CxFaceSup sub def - /nYBaseSup YsommetCone CyFaceSup sub def - /nZBaseSup ZsommetCone CzFaceSup sub def -% rayon vers point de vue - /RXvueSup CxBaseSup XpointVue sub def - /RYvueSup CyBaseSup YpointVue sub def - /RZvueSup CzBaseSup ZpointVue sub def - /RXvueInf CxBaseInf XpointVue sub def - /RYvueInf CyBaseInf YpointVue sub def - /RZvueInf CzBaseInf ZpointVue sub def -% Visibilité de la base inférieure - /PSbaseInfCone nXBaseInf RXvueInf mul - nYBaseInf RYvueInf mul add - nZBaseInf RZvueInf mul add def -% Visibilité de la base supérieure - /PSbaseSupCone nXBaseSup RXvueSup mul - nYBaseSup RYvueSup mul add - nZBaseSup RZvueSup mul add def -PSbaseInfCone 0 le { -/TableauxPoints [ -0 1 359 {% on décrit le cercle - /theta exch def [ - /Xpoint Rcone theta cos mul def - /Ypoint Rcone theta sin mul def - /Zpoint 0 def -CalculsPointsAfterTransformations - CalcCoordinates ] - } for - ] def -gsave -newpath - TableauxPoints 0 get aload pop moveto -0 1 359 { - /compteur exch def - TableauxPoints compteur get aload pop - lineto } for -0.7 setgray -closepath -fill -grestore - } if -%% PSbaseSupCone 0 le { -%% modifié le 31/10/2003 -%PSbaseSupCone 0 ge { -PSbaseSupCone 0 le { -/TableauxPoints [ -0 1 359 {% on décrit le cercle - /theta exch def [ - /OK Hcone 1 fracHeight sub mul TanAngleCone mul def - /Xpoint OK theta cos mul def - /Ypoint OK theta sin mul def - /Zpoint Hcone fracHeight mul def -CalculsPointsAfterTransformations - CalcCoordinates ] - } for - ] def -gsave -newpath - TableauxPoints 0 get aload pop moveto -0 1 359 { - /compteur exch def - TableauxPoints compteur get aload pop - lineto } for -0.7 setgray -closepath -fill -grestore - } if - } def -/PortionSphere{% - /Xpoint Rsphere psTHETA dTHETA neg add cos mul psPHI dPHI sub cos mul def - /Ypoint Rsphere psTHETA dTHETA neg add sin mul psPHI dPHI sub cos mul def - /Zpoint Rsphere psPHI dPHI sub sin mul def -CalculsPointsAfterTransformations - /xCentreFacette Xabscisse def - /yCentreFacette Yordonnee def - /zCentreFacette Zcote def -% normale à la facette - /nXfacette xCentreFacette CX sub def - /nYfacette yCentreFacette CY sub def - /nZfacette zCentreFacette CZ sub def -% rayon vers point de vue - /RXvue xCentreFacette XpointVue sub def - /RYvue yCentreFacette YpointVue sub def - /RZvue zCentreFacette ZpointVue sub def -% test de visibilité - /PSfacette RXvue nXfacette mul - RYvue nYfacette mul add - RZvue nZfacette mul add - def -PSfacette 0 le { -CalcCoordinates -newpath - moveto -psTHETA dTHETA sub 1 psTHETA dTHETA add { - /Theta exch def - /Xpoint Rsphere Theta cos psPHI dPHI sub cos mul mul def - /Ypoint Rsphere Theta sin psPHI dPHI sub cos mul mul def - /Zpoint Rsphere psPHI dPHI sub sin mul def - CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -psPHI dPHI sub 1 psPHI dPHI add { - /Phi exch def - /Xpoint Rsphere psTHETA dTHETA add cos Phi cos mul mul def - /Ypoint Rsphere psTHETA dTHETA add sin Phi cos mul mul def - /Zpoint Rsphere Phi sin mul def - CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -psTHETA dTHETA add -1 psTHETA dTHETA sub { - /Theta exch def - /Xpoint Rsphere Theta cos psPHI dPHI add cos mul mul def - /Ypoint Rsphere Theta sin psPHI dPHI add cos mul mul def - /Zpoint Rsphere psPHI dPHI add sin mul def - CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -psPHI dPHI add -1 psPHI dPHI sub { - /Phi exch def - /Xpoint Rsphere psTHETA dTHETA sub cos Phi cos mul mul def - /Ypoint Rsphere psTHETA dTHETA sub sin Phi cos mul mul def - /Zpoint Rsphere Phi sin mul def - CalculsPointsAfterTransformations - CalcCoordinates - lineto - } for -closepath -} if -} def -% Dodecahedron : 31 décembre 2003 -% datas : Graphisme scientifique R.Dony -% Masson ed. page 240 -/Dodecahedron{% - /XA M11 0 mul M12 A 0.607062 mul mul add M13 A mul 0.794655 mul add CX add def - /YA M21 0 mul M22 A 0.607062 mul mul add M23 A mul 0.794655 mul add CY add def - /ZA M31 0 mul M32 A 0.607062 mul mul add M33 A mul 0.794655 mul add CZ add def - /XB M11 A mul -0.5773503 mul M12 A mul 0.1875925 mul add M13 A mul 0.7946545 mul add CX add def - /YB M21 A mul -0.5773503 mul M22 A mul 0.1875925 mul add M23 A mul 0.7946545 mul add CY add def - /ZB M31 A mul -0.5773503 mul M32 A mul 0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def - /XC M11 A mul -0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def - /YC M21 A mul -0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def - /ZC M31 A mul -0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def - /XD M11 A mul 0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def - /YD M21 A mul 0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def - /ZD M31 A mul 0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def - /XE M11 A mul 0.5773503 mul M12 A mul 0.1875925 mul add M13 A mul 0.7946545 mul add CX add def - /YE M21 A mul 0.5773503 mul M22 A mul 0.1875925 mul add M23 A mul 0.7946545 mul add CY add def - /ZE M31 A mul 0.5773503 mul M32 A mul 0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def - /XF M11 A mul 0 mul M12 A mul 0.982247 mul add M13 A mul 0.175925 mul add CX add def - /YF M21 A mul 0 mul M22 A mul 0.982247 mul add M23 A mul 0.175925 mul add CY add def - /ZF M31 A mul 0 mul M32 A mul 0.982247 mul add M33 A mul 0.175925 mul add CZ add def - /XG M11 A mul -0.9341724 mul M12 A mul 0.303531 mul add M13 A mul 0.1875925 mul add CX add def - /YG M21 A mul -0.9341724 mul M22 A mul 0.303531 mul add M23 A mul 0.1875925 mul add CY add def - /ZG M31 A mul -0.9341724 mul M32 A mul 0.303531 mul add M33 A mul 0.1875925 mul add CZ add def - /XH M11 A mul -0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def - /YH M21 A mul -0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def - /ZH M31 A mul -0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def - /XI M11 A mul 0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def - /YI M21 A mul 0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def - /ZI M31 A mul 0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def - /XJ M11 A mul 0.9341724 mul M12 A mul 0.303531 mul add M13 A mul 0.1875925 mul add CX add def - /YJ M21 A mul 0.9341724 mul M22 A mul 0.303531 mul add M23 A mul 0.1875925 mul add CY add def - /ZJ M31 A mul 0.9341724 mul M32 A mul 0.303531 mul add M33 A mul 0.1875925 mul add CZ add def - /XK M11 A mul 0 mul M12 A mul -0.982247 mul add M13 A mul -0.1875925 mul add CX add def - /YK M21 A mul 0 mul M22 A mul -0.982247 mul add M23 A mul -0.1875925 mul add CY add def - /ZK M31 A mul 0 mul M32 A mul -0.982247 mul add M33 A mul -0.1875925 mul add CZ add def - /XL M11 A mul 0.9341724 mul M12 A mul -0.303531 mul add M13 A mul -0.1875925 mul add CX add def - /YL M21 A mul 0.9341724 mul M22 A mul -0.303531 mul add M23 A mul -0.1875925 mul add CY add def - /ZL M31 A mul 0.9341724 mul M32 A mul -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def - /XM M11 A mul 0.5773503 mul M12 A mul 0.7946545 mul add M13 A mul -0.1875925 mul add CX add def - /YM M21 A mul 0.5773503 mul M22 A mul 0.7946545 mul add M23 A mul -0.1875925 mul add CY add def - /ZM M31 A mul 0.5773503 mul M32 A mul 0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def - /XN M11 A mul -0.5773503 mul M12 A mul 0.7946545 mul add M13 A mul -0.1875925 mul add CX add def - /YN M21 A mul -0.5773503 mul M22 A mul 0.7946545 mul add M23 A mul -0.1875925 mul add CY add def - /ZN M31 A mul -0.5773503 mul M32 A mul 0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def - /XO M11 A mul -0.9341724 mul M12 A mul -0.303531 mul add M13 A mul -0.1875925 mul add CX add def - /YO M21 A mul -0.9341724 mul M22 A mul -0.303531 mul add M23 A mul -0.1875925 mul add CY add def - /ZO M31 A mul -0.9341724 mul M32 A mul -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def - /XP M11 A mul -0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def - /YP M21 A mul -0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def - /ZP M31 A mul -0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def - /XQ M11 A mul -0.3568221 mul M12 A mul 0.4911235 mul add M13 A mul -0.7946545 mul add CX add def - /YQ M21 A mul -0.3568221 mul M22 A mul 0.4911235 mul add M23 A mul -0.7946545 mul add CY add def - /ZQ M31 A mul -0.3568221 mul M32 A mul 0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def - /XR M11 A mul 0.3568221 mul M12 A mul 0.4911235 mul add M13 A mul -0.7946545 mul add CX add def - /YR M21 A mul 0.3568221 mul M22 A mul 0.4911235 mul add M23 A mul -0.7946545 mul add CY add def - /ZR M31 A mul 0.3568221 mul M32 A mul 0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def - /XS M11 A mul 0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def - /YS M21 A mul 0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def - /ZS M31 A mul 0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def - /XT M11 0 mul M12 A -0.607062 mul mul add M13 A mul -0.794655 mul add CX add def - /YT M21 0 mul M22 A -0.607062 mul mul add M23 A mul -0.794655 mul add CY add def - /ZT M31 0 mul M32 A -0.607062 mul mul add M33 A mul -0.794655 mul add CZ add def -% Centres des faces : condition de visibilité -% FACE 1 pentagone régulier ABCDE -% OC1 - /XC1 XA XB add XC add XD add XE add 5 div def - /YC1 YA YB add YC add YD add YE add 5 div def - /ZC1 ZA ZB add ZC add ZD add ZE add 5 div def -% Normale à la face 1 - /NX1 XC1 CX sub def - /NY1 YC1 CY sub def - /NZ1 ZC1 CZ sub def -% rayon vers point de vue - /RXvue1 XC1 XpointVue sub def - /RYvue1 YC1 YpointVue sub def - /RZvue1 ZC1 ZpointVue sub def -% produit scalaire - /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def -% FACE 2 pentagone régulier EDILJ -% OC2 - /XC2 XE XD add XI add XL add XJ add 5 div def - /YC2 YE YD add YI add YL add YJ add 5 div def - /ZC2 ZE ZD add ZI add ZL add ZJ add 5 div def -% Normale à la face 2 - /NX2 XC2 CX sub def - /NY2 YC2 CY sub def - /NZ2 ZC2 CZ sub def -% rayon vers point de vue - /RXvue2 XC2 XpointVue sub def - /RYvue2 YC2 YpointVue sub def - /RZvue2 ZC2 ZpointVue sub def -% produit scalaire - /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def -% FACE 3 pentagone régulier EJMFA -% OC3 - /XC3 XE XJ add XM add XF add XA add 5 div def - /YC3 YE YJ add YM add YF add YA add 5 div def - /ZC3 ZE ZJ add ZM add ZF add ZA add 5 div def -% Normale à la face 2 - /NX3 XC3 CX sub def - /NY3 YC3 CY sub def - /NZ3 ZC3 CZ sub def -% rayon vers point de vue - /RXvue3 XC3 XpointVue sub def - /RYvue3 YC3 YpointVue sub def - /RZvue3 ZC3 ZpointVue sub def -% produit scalaire - /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def -% FACE 4 pentagone régulier AFNGB -% OC4 - /XC4 XA XF add XN add XG add XB add 5 div def - /YC4 YA YF add YN add YG add YB add 5 div def - /ZC4 ZA ZF add ZN add ZG add ZB add 5 div def -% Normale à la face 4 - /NX4 XC4 CX sub def - /NY4 YC4 CY sub def - /NZ4 ZC4 CZ sub def -% rayon vers point de vue - /RXvue4 XC4 XpointVue sub def - /RYvue4 YC4 YpointVue sub def - /RZvue4 ZC4 ZpointVue sub def -% produit scalaire - /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def -% FACE 5 pentagone régulier BGOHC -% OC5 - /XC5 XB XG add XO add XH add XC add 5 div def - /YC5 YB YG add YO add YH add YC add 5 div def - /ZC5 ZB ZG add ZO add ZH add ZC add 5 div def -% Normale à la face 5 - /NX5 XC5 CX sub def - /NY5 YC5 CY sub def - /NZ5 ZC5 CZ sub def -% rayon vers point de vue - /RXvue5 XC5 XpointVue sub def - /RYvue5 YC5 YpointVue sub def - /RZvue5 ZC5 ZpointVue sub def -% produit scalaire - /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def -% FACE 6 pentagone régulier CHKID -% OC6 - /XC6 XC XH add XK add XI add XD add 5 div def - /YC6 YC YH add YK add YI add YD add 5 div def - /ZC6 ZC ZH add ZK add ZI add ZD add 5 div def -% Normale à la face 6 - /NX6 XC6 CX sub def - /NY6 YC6 CY sub def - /NZ6 ZC6 CZ sub def -% rayon vers point de vue - /RXvue6 XC6 XpointVue sub def - /RYvue6 YC6 YpointVue sub def - /RZvue6 ZC6 ZpointVue sub def -% produit scalaire - /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def -% FACE 7 pentagone régulier KTSLI -% OC7 - /XC7 XK XT add XS add XL add XI add 5 div def - /YC7 YK YT add YS add YL add YI add 5 div def - /ZC7 ZK ZT add ZS add ZL add ZI add 5 div def -% Normale à la face 7 - /NX7 XC7 CX sub def - /NY7 YC7 CY sub def - /NZ7 ZC7 CZ sub def -% rayon vers point de vue - /RXvue7 XC7 XpointVue sub def - /RYvue7 YC7 YpointVue sub def - /RZvue7 ZC7 ZpointVue sub def -% produit scalaire - /PS7 RXvue7 NX7 mul RYvue7 NY7 mul add RZvue7 NZ7 mul add def -% FACE 8 pentagone régulier LSRMJ -% OC8 - /XC8 XL XS add XR add XM add XJ add 5 div def - /YC8 YL YS add YR add YM add YJ add 5 div def - /ZC8 ZL ZS add ZR add ZM add ZJ add 5 div def -% Normale à la face 8 - /NX8 XC8 CX sub def - /NY8 YC8 CY sub def - /NZ8 ZC8 CZ sub def -% rayon vers point de vue - /RXvue8 XC8 XpointVue sub def - /RYvue8 YC8 YpointVue sub def - /RZvue8 ZC8 ZpointVue sub def -% produit scalaire - /PS8 RXvue8 NX8 mul RYvue8 NY8 mul add RZvue8 NZ8 mul add def -% FACE 9 pentagone régulier MRQNF -% OC9 - /XC9 XM XR add XQ add XN add XF add 5 div def - /YC9 YM YR add YQ add YN add YF add 5 div def - /ZC9 ZM ZR add ZQ add ZN add ZF add 5 div def -% Normale à la face 6 - /NX9 XC9 CX sub def - /NY9 YC9 CY sub def - /NZ9 ZC9 CZ sub def -% rayon vers point de vue - /RXvue9 XC9 XpointVue sub def - /RYvue9 YC9 YpointVue sub def - /RZvue9 ZC9 ZpointVue sub def -% produit scalaire - /PS9 RXvue9 NX9 mul RYvue9 NY9 mul add RZvue9 NZ9 mul add def -% FACE 10 pentagone régulier NQPOG -% OC10 - /XC10 XN XQ add XP add XO add XG add 5 div def - /YC10 YN YQ add YP add YO add YG add 5 div def - /ZC10 ZN ZQ add ZP add ZO add ZG add 5 div def -% Normale à la face 6 - /NX10 XC10 CX sub def - /NY10 YC10 CY sub def - /NZ10 ZC10 CZ sub def -% rayon vers point de vue - /RXvue10 XC10 XpointVue sub def - /RYvue10 YC10 YpointVue sub def - /RZvue10 ZC10 ZpointVue sub def -% produit scalaire - /PS10 RXvue10 NX10 mul RYvue10 NY10 mul add RZvue10 NZ10 mul add def -% FACE 11 pentagone régulier OPTKH -% OC11 - /XC11 XO XP add XT add XK add XH add 5 div def - /YC11 YO YP add YT add YK add YH add 5 div def - /ZC11 ZO ZP add ZT add ZK add ZH add 5 div def -% Normale à la face 11 - /NX11 XC11 CX sub def - /NY11 YC11 CY sub def - /NZ11 ZC11 CZ sub def -% rayon vers point de vue - /RXvue11 XC11 XpointVue sub def - /RYvue11 YC11 YpointVue sub def - /RZvue11 ZC11 ZpointVue sub def -% produit scalaire - /PS11 RXvue11 NX11 mul RYvue11 NY11 mul add RZvue11 NZ11 mul add def -% FACE 12 pentagone régulier PQRST -% OC12 - /XC12 XP XQ add XR add XS add XT add 5 div def - /YC12 YP YQ add YR add YS add YT add 5 div def - /ZC12 ZP ZQ add ZR add ZS add ZT add 5 div def -% Normale à la face 12 - /NX12 XC12 CX sub def - /NY12 YC12 CY sub def - /NZ12 ZC12 CZ sub def -% rayon vers point de vue - /RXvue12 XC12 XpointVue sub def - /RYvue12 YC12 YpointVue sub def - /RZvue12 ZC12 ZpointVue sub def -% produit scalaire - /PS12 RXvue12 NX12 mul RYvue12 NY12 mul add RZvue12 NZ12 mul add def -% faceOne ABDCE -PS1 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YA def - /Zcote ZA def - /Xabscisse XA def - CalcCoordinates - moveto - /Zcote ZB def - /Xabscisse XB def - /Yordonnee YB def - CalcCoordinates - lineto - /Zcote ZC def - /Xabscisse XC def - /Yordonnee YC def - CalcCoordinates - lineto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto - /Zcote ZE def - /Xabscisse XE def - /Yordonnee YE def - CalcCoordinates - lineto -closepath -gsave -0.05 0.1 0.1 0 setcmykcolor -fill -grestore -stroke -} if -% face2 EDILJ -PS2 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YE def - /Zcote ZE def - /Xabscisse XE def - CalcCoordinates - moveto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto - /Zcote ZI def - /Xabscisse XI def - /Yordonnee YI def - CalcCoordinates - lineto - /Zcote ZL def - /Xabscisse XL def - /Yordonnee YL def - CalcCoordinates - lineto - /Zcote ZJ def - /Xabscisse XJ def - /Yordonnee YJ def - CalcCoordinates - lineto -closepath -gsave -0.05 0.15 0.15 0 setcmykcolor -fill -grestore -stroke -} if -% face3 EJMFA -PS3 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YE def - /Zcote ZE def - /Xabscisse XE def - CalcCoordinates - moveto - /Zcote ZJ def - /Xabscisse XJ def - /Yordonnee YJ def - CalcCoordinates - lineto - /Zcote ZM def - /Xabscisse XM def - /Yordonnee YM def - CalcCoordinates - lineto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto - /Zcote ZA def - /Xabscisse XA def - /Yordonnee YA def - CalcCoordinates - lineto -closepath -gsave -0.05 0.2 0.2 0 setcmykcolor -fill -grestore -stroke -} if -% face4 AFNGB -PS4 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YA def - /Zcote ZA def - /Xabscisse XA def - CalcCoordinates - moveto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto - /Zcote ZN def - /Xabscisse XN def - /Yordonnee YN def - CalcCoordinates - lineto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto - /Zcote ZB def - /Xabscisse XB def - /Yordonnee YB def - CalcCoordinates - lineto -closepath -gsave -0.05 0.25 0.25 0 setcmykcolor -fill -grestore -stroke -} if -% face5 BGOHC -PS5 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YB def - /Zcote ZB def - /Xabscisse XB def - CalcCoordinates - moveto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto - /Zcote ZO def - /Xabscisse XO def - /Yordonnee YO def - CalcCoordinates - lineto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto - /Zcote ZC def - /Xabscisse XC def - /Yordonnee YC def - CalcCoordinates - lineto -closepath -gsave -0.05 0.3 0.3 0 setcmykcolor -fill -grestore -stroke -} if -% face6 CHKID -PS6 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YC def - /Zcote ZC def - /Xabscisse XC def - CalcCoordinates - moveto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto - /Zcote ZK def - /Xabscisse XK def - /Yordonnee YK def - CalcCoordinates - lineto - /Zcote ZI def - /Xabscisse XI def - /Yordonnee YI def - CalcCoordinates - lineto - /Zcote ZD def - /Xabscisse XD def - /Yordonnee YD def - CalcCoordinates - lineto -closepath -gsave -0.05 0.35 0.35 0 setcmykcolor -fill -grestore -stroke -} if -% face7 KTSLI -PS7 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YK def - /Zcote ZK def - /Xabscisse XK def - CalcCoordinates - moveto - /Zcote ZT def - /Xabscisse XT def - /Yordonnee YT def - CalcCoordinates - lineto - /Zcote ZS def - /Xabscisse XS def - /Yordonnee YS def - CalcCoordinates - lineto - /Zcote ZL def - /Xabscisse XL def - /Yordonnee YL def - CalcCoordinates - lineto - /Zcote ZI def - /Xabscisse XI def - /Yordonnee YI def - CalcCoordinates - lineto -closepath -gsave -0.05 0.4 0.4 0 setcmykcolor -fill -grestore -stroke -} if -% face8 LSRMJ -PS8 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YL def - /Zcote ZL def - /Xabscisse XL def - CalcCoordinates - moveto - /Zcote ZS def - /Xabscisse XS def - /Yordonnee YS def - CalcCoordinates - lineto - /Zcote ZR def - /Xabscisse XR def - /Yordonnee YR def - CalcCoordinates - lineto - /Zcote ZM def - /Xabscisse XM def - /Yordonnee YM def - CalcCoordinates - lineto - /Zcote ZJ def - /Xabscisse XJ def - /Yordonnee YJ def - CalcCoordinates - lineto -closepath -gsave -0.05 0.45 0.45 0 setcmykcolor -fill -grestore -stroke -} if -% face9 MRQNF -PS9 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YM def - /Zcote ZM def - /Xabscisse XM def - CalcCoordinates - moveto - /Zcote ZR def - /Xabscisse XR def - /Yordonnee YR def - CalcCoordinates - lineto - /Zcote ZQ def - /Xabscisse XQ def - /Yordonnee YQ def - CalcCoordinates - lineto - /Zcote ZN def - /Xabscisse XN def - /Yordonnee YN def - CalcCoordinates - lineto - /Zcote ZF def - /Xabscisse XF def - /Yordonnee YF def - CalcCoordinates - lineto -closepath -gsave -0.05 0.5 0.5 0 setcmykcolor -fill -grestore -stroke -} if -% face10 NQPOG -PS10 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YN def - /Zcote ZN def - /Xabscisse XN def - CalcCoordinates - moveto - /Zcote ZQ def - /Xabscisse XQ def - /Yordonnee YQ def - CalcCoordinates - lineto - /Zcote ZP def - /Xabscisse XP def - /Yordonnee YP def - CalcCoordinates - lineto - /Zcote ZO def - /Xabscisse XO def - /Yordonnee YO def - CalcCoordinates - lineto - /Zcote ZG def - /Xabscisse XG def - /Yordonnee YG def - CalcCoordinates - lineto -closepath -gsave -0.05 0.55 0.55 0 setcmykcolor -fill -grestore -stroke -} if -% face11 OPTKH -PS11 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YO def - /Zcote ZO def - /Xabscisse XO def - CalcCoordinates - moveto - /Zcote ZP def - /Xabscisse XP def - /Yordonnee YP def - CalcCoordinates - lineto - /Zcote ZT def - /Xabscisse XT def - /Yordonnee YT def - CalcCoordinates - lineto - /Zcote ZK def - /Xabscisse XK def - /Yordonnee YK def - CalcCoordinates - lineto - /Zcote ZH def - /Xabscisse XH def - /Yordonnee YH def - CalcCoordinates - lineto -closepath -gsave -0.05 0.6 0.6 0 setcmykcolor -fill -grestore -stroke -} if -% face12 PQRST -PS12 0 Condition { % -reduction reduction scale -1 setlinejoin -newpath - /Yordonnee YP def - /Zcote ZP def - /Xabscisse XP def - CalcCoordinates - moveto - /Zcote ZQ def - /Xabscisse XQ def - /Yordonnee YQ def - CalcCoordinates - lineto - /Zcote ZR def - /Xabscisse XR def - /Yordonnee YR def - CalcCoordinates - lineto - /Zcote ZS def - /Xabscisse XS def - /Yordonnee YS def - CalcCoordinates - lineto - /Zcote ZT def - /Xabscisse XT def - /Yordonnee YT def - CalcCoordinates - lineto -closepath -gsave -0.05 0.65 0.65 0 setcmykcolor -fill -grestore -stroke -} if -} -def -end diff --git a/Master/texmf-dist/dvips/pst-vue3d/pst-vue3d.pro b/Master/texmf-dist/dvips/pst-vue3d/pst-vue3d.pro new file mode 100644 index 00000000000..b6e8d1289ab --- /dev/null +++ b/Master/texmf-dist/dvips/pst-vue3d/pst-vue3d.pro @@ -0,0 +1,2092 @@ +%version 33 march 2007 +% +/tx@3DDict 100 dict def +tx@3DDict begin +/Cube{% + /XA M11 A mul M12 B mul add M13 C mul add CX add def + /YA M21 A mul M22 B mul add M23 C mul add CY add def + /ZA M31 A mul M32 B mul add M33 C mul add CZ add def + /XB M11 A mul neg M12 B mul add M13 C mul add CX add def + /YB M21 A mul neg M22 B mul add M23 C mul add CY add def + /ZB M31 A mul neg M32 B mul add M33 C mul add CZ add def + /XC M11 A mul neg M12 B mul neg add M13 C mul add CX add def + /YC M21 A mul neg M22 B mul neg add M23 C mul add CY add def + /ZC M31 A mul neg M32 B mul neg add M33 C mul add CZ add def + /XD M11 A mul M12 B mul neg add M13 C mul add CX add def + /YD M21 A mul M22 B mul neg add M23 C mul add CY add def + /ZD M31 A mul M32 B mul neg add M33 C mul add CZ add def + /XE M11 A mul M12 B mul add M13 C mul sub CX add def + /YE M21 A mul M22 B mul add M23 C mul sub CY add def + /ZE M31 A mul M32 B mul add M33 C mul sub CZ add def + /XF M11 A mul neg M12 B mul add M13 C mul sub CX add def + /YF M21 A mul neg M22 B mul add M23 C mul sub CY add def + /ZF M31 A mul neg M32 B mul add M33 C mul sub CZ add def + /XG M11 A mul neg M12 B mul sub M13 C mul sub CX add def + /YG M21 A mul neg M22 B mul sub M23 C mul sub CY add def + /ZG M31 A mul neg M32 B mul sub M33 C mul sub CZ add def + /XH M11 A mul M12 B mul sub M13 C mul sub CX add def + /YH M21 A mul M22 B mul sub M23 C mul sub CY add def + /ZH M31 A mul M32 B mul sub M33 C mul sub CZ add def +% Centres des faces : condition de visibilité +% FACE 1 +% OC1 + /XC1 M13 C mul CX add def + /YC1 M23 C mul CY add def + /ZC1 M33 C mul CZ add def +% Normale à la face 1 + /NX1 M13 C mul def + /NY1 M23 C mul def + /NZ1 M33 C mul def +% rayon vers point de vue + /RXvue1 XC1 XpointVue sub def + /RYvue1 YC1 YpointVue sub def + /RZvue1 ZC1 ZpointVue sub def +% produit scalaire + /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def +% FACE 2 +% OC2 + /XC2 M11 A mul CX add def + /YC2 M21 A mul CY add def + /ZC2 M31 A mul CZ add def +% normale à la face 2 + /NX2 M11 A mul def + /NY2 M21 A mul def + /NZ2 M31 A mul def +% rayon vers point de vue + /RXvue2 XC2 XpointVue sub def + /RYvue2 YC2 YpointVue sub def + /RZvue2 ZC2 ZpointVue sub def +% produit scalaire + /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def +% FACE 3 +% OC3 + /XC3 M13 C neg mul CX add def + /YC3 M23 C neg mul CY add def + /ZC3 M33 C neg mul CZ add def +% normale à la face 3 + /NX3 M13 C neg mul def + /NY3 M23 C neg mul def + /NZ3 M33 C neg mul def +% rayon vers point de vue + /RXvue3 XC3 XpointVue sub def + /RYvue3 YC3 YpointVue sub def + /RZvue3 ZC3 ZpointVue sub def +% produit scalaire + /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def +% FACE 4 +% OC4 + /XC4 M11 A neg mul CX add def + /YC4 M21 A neg mul CY add def + /ZC4 M31 A neg mul CZ add def +% normale à la face 4 + /NX4 M11 A neg mul def + /NY4 M21 A neg mul def + /NZ4 M31 A neg mul def +% rayon vers point de vue + /RXvue4 XC4 XpointVue sub def + /RYvue4 YC4 YpointVue sub def + /RZvue4 ZC4 ZpointVue sub def +% produit scalaire + /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def +% FACE 5 +% OC5 + /XC5 M12 B neg mul CX add def + /YC5 M22 B neg mul CY add def + /ZC5 M32 B neg mul CZ add def +% normale à la face 5 + /NX5 M12 B neg mul def + /NY5 M22 B neg mul def + /NZ5 M32 B neg mul def +% rayon vers point de vue + /RXvue5 XC5 XpointVue sub def + /RYvue5 YC5 YpointVue sub def + /RZvue5 ZC5 ZpointVue sub def +% produit scalaire + /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def +% FACE 6 +% OC6 + /XC6 M12 B mul CX add def + /YC6 M22 B mul CY add def + /ZC6 M32 B mul CZ add def +% normale à la face 6 + /NX6 M12 B mul def + /NY6 M22 B mul def + /NZ6 M32 B mul def +% rayon vers point de vue + /RXvue6 XC6 XpointVue sub def + /RYvue6 YC6 YpointVue sub def + /RZvue6 ZC6 ZpointVue sub def +% produit scalaire + /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def +% faceOne +PS1 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YA def + /Zcote ZA def + /Xabscisse XA def + CalcCoordinates + moveto + /Zcote ZB def + /Xabscisse XB def + /Yordonnee YB def + CalcCoordinates + lineto + /Zcote ZC def + /Xabscisse XC def + /Yordonnee YC def + CalcCoordinates + lineto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto + /Zcote ZA def + /Xabscisse XA def + /Yordonnee YA def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceOne setrgbcolor +fill +grestore +stroke +} if +% faceTwo +PS2 0 Condition{ % +reduction reduction scale +1 setlinejoin +newpath + /Xabscisse XA def + /Yordonnee YA def + /Zcote ZA def + CalcCoordinates + moveto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto + /Zcote ZE def + /Xabscisse XE def + /Yordonnee YE def + CalcCoordinates + lineto + /Zcote ZA def + /Xabscisse XA def + /Yordonnee YA def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceTwo setrgbcolor +fill +grestore +stroke +} if +% face three +PS3 0 Condition{ % +reduction reduction scale +1 setlinejoin +newpath + /Xabscisse XE def + /Yordonnee YE def + /Zcote ZE def + CalcCoordinates + moveto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto + /Zcote ZE def + /Xabscisse XE def + /Yordonnee YE def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceThree setrgbcolor +fill +grestore +stroke +} if +% face four +PS4 0 Condition{ % +reduction reduction scale +1 setlinejoin +newpath + /Xabscisse XB def + /Yordonnee YB def + /Zcote ZB def + CalcCoordinates + moveto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto + /Zcote ZC def + /Xabscisse XC def + /Yordonnee YC def + CalcCoordinates + lineto + /Zcote ZB def + /Xabscisse XB def + /Yordonnee YB def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceFour setrgbcolor +fill +grestore +stroke +} if +% face five +PS5 0 Condition{ % +reduction reduction scale +1 setlinejoin +newpath + /Xabscisse XC def + /Yordonnee YC def + /Zcote ZC def + CalcCoordinates + moveto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto + /Zcote ZC def + /Xabscisse XC def + /Yordonnee YC def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceFive setrgbcolor +fill +grestore +stroke +} if +% face six +PS6 0 Condition{ % +reduction reduction scale +1 setlinejoin +newpath + /Xabscisse XB def + /Yordonnee YB def + /Zcote ZB def + CalcCoordinates + moveto + /Zcote ZA def + /Xabscisse XA def + /Yordonnee YA def + CalcCoordinates + lineto + /Zcote ZE def + /Xabscisse XE def + /Yordonnee YE def + CalcCoordinates + lineto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto + /Zcote ZB def + /Xabscisse XB def + /Yordonnee YB def + CalcCoordinates + lineto +closepath +gsave +CubeColorFaceSix setrgbcolor +fill +grestore +stroke +} if +} +def +% +/PointsDie{% +PS6 0 Condition{ % +reduction reduction scale +A 2 div neg A A 2 div { + /XCpoint exch def +C 2 div neg C C 2 div { + /ZCpoint exch def +newpath + /Zpoint Rpoint ZCpoint add def + /Xpoint XCpoint def + /Ypoint B def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Zpoint Rpoint Angle cos mul ZCpoint add def + /Xpoint Rpoint Angle sin mul XCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill + } for + } for + } if +PS5 0 Condition{ % +reduction reduction scale +newpath + /Ypoint B neg def + /XCpoint A 2 div neg def + /ZCpoint C 2 div def + /Xpoint Rpoint XCpoint add def + /Zpoint ZCpoint def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint Rpoint Angle cos mul XCpoint add def + /Zpoint Rpoint Angle sin mul ZCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +% +newpath + /XCpoint A 2 div def + /ZCpoint C 2 div neg def + /Xpoint Rpoint XCpoint add def + /Zpoint ZCpoint def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint Rpoint Angle cos mul XCpoint add def + /Zpoint Rpoint Angle sin mul ZCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +% +newpath + /XCpoint 0 def + /ZCpoint 0 def + /Xpoint Rpoint XCpoint add def + /Zpoint ZCpoint def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint Rpoint Angle cos mul XCpoint add def + /Zpoint Rpoint Angle sin mul ZCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +} if +PS4 0 Condition{ % +reduction reduction scale +C 2 div neg C C 2 div { + /ZCpoint exch def +B 2 div neg B B 2 div { + /YCpoint exch def +newpath + /Zpoint Rpoint ZCpoint add def + /Ypoint YCpoint def + /Xpoint A neg def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Zpoint Rpoint Angle cos mul ZCpoint add def + /Ypoint Rpoint Angle sin mul YCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill + } for + } for +% le point du milieu +newpath + /Zpoint Rpoint def + /Ypoint 0 def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Zpoint Rpoint Angle cos mul def + /Ypoint Rpoint Angle sin mul def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +} if +PS3 0 Condition{ % +reduction reduction scale +A 2 div neg A A 2 div { + /XCpoint exch def +B 2 div neg B 2 div B 2 div { + /YCpoint exch def +newpath + /Xpoint Rpoint XCpoint add def + /Ypoint YCpoint def + /Zpoint C neg def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint Rpoint Angle cos mul XCpoint add def + /Ypoint Rpoint Angle sin mul YCpoint add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill + } for + } for +} if +PS2 0 Condition{ % +reduction reduction scale +newpath + /Xpoint A def + /Ypoint Rpoint B 2 div add def + /Zpoint C 2 div neg def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Ypoint Rpoint Angle cos mul B 2 div add def + /Zpoint Rpoint Angle sin mul C 2 div sub def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +newpath + /Xpoint A def + /Ypoint Rpoint B 2 div sub def + /Zpoint C 2 div def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint A def + /Ypoint Rpoint Angle cos mul B 2 div sub def + /Zpoint Rpoint Angle sin mul A 2 div add def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +} if +PS1 0 Condition{ % +reduction reduction scale +newpath + /Xpoint Rpoint def + /Ypoint 0 def + /Zpoint C def +CalculsPointsAfterTransformations +CalcCoordinates + moveto +0 1 359 {% + /Angle exch def + /Xpoint Rpoint Angle cos mul def + /Ypoint Rpoint Angle sin mul def +CalculsPointsAfterTransformations +CalcCoordinates + lineto + } for +closepath +0 setgray +fill +} if +} def +% +/CalcCoordinates{% + formulesTroisD +% hv 2005-04-30 --->beg +% Xi 28.45 mul Yi 28.45 mul + Xi xUnit mul Yi yUnit mul +% hv 2005-04-30 <---beg + } + def +% pour la 3D conventionnelle +/formulesTroisD{% + /xObservateur Xabscisse Sin1 mul neg Yordonnee Cos1 mul add def + /yObservateur Xabscisse Cos1Sin2 mul neg Yordonnee Sin1Sin2 mul sub Zcote Cos2 mul add def + /zObservateur Xabscisse neg Cos1Cos2 mul Yordonnee Sin1Cos2 mul sub Zcote Sin2 mul sub Dobs add def + /Xi DScreen xObservateur mul zObservateur div def + /Yi DScreen yObservateur mul zObservateur div def + } +def +% +/CalculsPointsAfterTransformations{% + /Xabscisse M11 Xpoint mul M12 Ypoint mul add M13 Zpoint mul add CX add def + /Yordonnee M21 Xpoint mul M22 Ypoint mul add M23 Zpoint mul add CY add def + /Zcote M31 Xpoint mul M32 Ypoint mul add M33 Zpoint mul add CZ add def + } +def +% +/SommetsTetraedre{% + /xA RayonBaseTetraedre neg def + /yA 0 def + /zA 0 def + /xB 0.5 RayonBaseTetraedre mul def + /yB RayonBaseTetraedre 0.866 mul neg def + /zB 0 def + /xC xB def + /yC yB neg def + /zC 0 def + /xD 0 def + /yD 0 def + /zD RayonBaseTetraedre 1.414 mul def +% coordonnées centre des faces + /xFaceA xA xB xC add add 3 div def + /yFaceA yA yB yC add add 3 div def + /zFaceA zA zB zC add add 3 div def + /xFaceB xD xA xB add add 3 div def + /yFaceB yD yA yB add add 3 div def + /zFaceB zD zA zB add add 3 div def + /xFaceC xA xD xC add add 3 div def + /yFaceC yA yD yC add add 3 div def + /zFaceC zA zD zC add add 3 div def + /xFaceD xD xB xC add add 3 div def + /yFaceD yD yB yC add add 3 div def + /zFaceD zD zB zC add add 3 div def +% sommets après rotation et translation + /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def + /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def + /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def + /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def + /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def + /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def + /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def + /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def + /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def + /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def + /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def + /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def +% centres de faces après transformations + /XFaceA M11 xFaceA mul M12 yFaceA mul add M13 zFaceA mul add CX add def + /YFaceA M21 xFaceA mul M22 yFaceA mul add M23 zFaceA mul add CY add def + /ZFaceA M31 xFaceA mul M32 yFaceA mul add M33 zFaceA mul add CZ add def + /XFaceB M11 xFaceB mul M12 yFaceB mul add M13 zFaceB mul add CX add def + /YFaceB M21 xFaceB mul M22 yFaceB mul add M23 zFaceB mul add CY add def + /ZFaceB M31 xFaceB mul M32 yFaceB mul add M33 zFaceB mul add CZ add def + /XFaceC M11 xFaceC mul M12 yFaceC mul add M13 zFaceC mul add CX add def + /YFaceC M21 xFaceC mul M22 yFaceC mul add M23 zFaceC mul add CY add def + /ZFaceC M31 xFaceC mul M32 yFaceC mul add M33 zFaceC mul add CZ add def + /XFaceD M11 xFaceD mul M12 yFaceD mul add M13 zFaceD mul add CX add def + /YFaceD M21 xFaceD mul M22 yFaceD mul add M23 zFaceD mul add CY add def + /ZFaceD M31 xFaceD mul M32 yFaceD mul add M33 zFaceD mul add CZ add def +% Normales aux faces + /NxA XFaceA XD sub def + /NyA YFaceA YD sub def + /NzA ZFaceA ZD sub def + /NxB XFaceB XC sub def + /NyB YFaceB YC sub def + /NzB ZFaceB ZC sub def + /NxC XFaceC XB sub def + /NyC YFaceC YB sub def + /NzC ZFaceC ZB sub def + /NxD XFaceD XA sub def + /NyD YFaceD YA sub def + /NzD ZFaceD ZA sub def +% Conditions de visibilité +% rayon vers point de vue + /RXvueA XFaceA XpointVue sub def + /RYvueA YFaceA YpointVue sub def + /RZvueA ZFaceA ZpointVue sub def + /RXvueB XFaceB XpointVue sub def + /RYvueB YFaceB YpointVue sub def + /RZvueB ZFaceB ZpointVue sub def + /RXvueC XFaceC XpointVue sub def + /RYvueC YFaceC YpointVue sub def + /RZvueC ZFaceC ZpointVue sub def + /RXvueD XFaceD XpointVue sub def + /RYvueD YFaceD YpointVue sub def + /RZvueD ZFaceD ZpointVue sub def +% produit scalaire + /PSA RXvueA NxA mul RYvueA NyA mul add RZvueA NzA mul add def + /PSB RXvueB NxB mul RYvueB NyB mul add RZvueB NzB mul add def + /PSC RXvueC NxC mul RYvueC NyC mul add RZvueC NzC mul add def + /PSD RXvueD NxD mul RYvueD NyD mul add RZvueD NzD mul add def + } + def +/Tetraedre{% +SommetsTetraedre +% face ABC + PSA 0 le { % +reduction reduction scale +1 setlinejoin + /Xabscisse XA def + /Yordonnee YA def + /Zcote ZA def + CalcCoordinates + moveto + /Xabscisse XB def + /Yordonnee YB def + /Zcote ZB def + CalcCoordinates + lineto + /Xabscisse XC def + /Yordonnee YC def + /Zcote ZC def + CalcCoordinates + lineto + /Xabscisse XA def + /Yordonnee YA def + /Zcote ZA def + CalcCoordinates + lineto +} if +% face DAB + PSB 0 le { % +reduction reduction scale +1 setlinejoin + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + moveto + /Xabscisse XA def + /Yordonnee YA def + /Zcote ZA def + CalcCoordinates + lineto + /Xabscisse XB def + /Yordonnee YB def + /Zcote ZB def + CalcCoordinates + lineto + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + lineto +} if +% face DAC +PSC 0 le { % +reduction reduction scale +1 setlinejoin + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + moveto + /Xabscisse XA def + /Yordonnee YA def + /Zcote ZA def + CalcCoordinates + lineto + /Xabscisse XC def + /Yordonnee YC def + /Zcote ZC def + CalcCoordinates + lineto + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + lineto +} if +% face DBC + PSD 0 le { % +reduction reduction scale +1 setlinejoin + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + moveto + /Xabscisse XB def + /Yordonnee YB def + /Zcote ZB def + CalcCoordinates + lineto + /Xabscisse XC def + /Yordonnee YC def + /Zcote ZC def + CalcCoordinates + lineto + /Xabscisse XD def + /Yordonnee YD def + /Zcote ZD def + CalcCoordinates + lineto +} if +} +def +% +/SommetsPyramide{% + /xA A def + /yA A neg def + /zA 0 def + /xB A def + /yB A def + /zB 0 def + /xC A neg def + /yC A def + /zC 0 def + /xD A neg def + /yD A neg def + /zD 0 def + /xS 0 def + /yS 0 def + /zS Hpyramide def +% coordonnées centre des faces + /Alpha A Hpyramide atan def + /xFaceSAB Hpyramide Alpha dup sin exch cos mul mul def + /yFaceSAB 0 def + /zFaceSAB Hpyramide Alpha sin dup mul mul def + /xFaceSBC 0 def + /yFaceSBC xFaceSAB def + /zFaceSBC zFaceSAB fracHeight mul def + /xFaceSCD xFaceSAB neg def + /yFaceSCD 0 def + /zFaceSCD zFaceSAB fracHeight mul def + /xFaceSDA 0 def + /yFaceSDA xFaceSAB neg def + /zFaceSDA zFaceSAB fracHeight mul def +% sommets après rotation et translation + /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def + /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def + /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def + /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def + /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def + /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def + /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def + /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def + /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def + /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def + /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def + /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def + /XS M11 xS mul M12 yS mul add M13 zS mul add CX add def + /YS M21 xS mul M22 yS mul add M23 zS mul add CY add def + /ZS M31 xS mul M32 yS mul add M33 zS mul add CZ add def +% centres de faces après transformations + /XFaceSAB M11 xFaceSAB mul M12 yFaceSAB mul add M13 zFaceSAB mul add CX add def + /YFaceSAB M21 xFaceSAB mul M22 yFaceSAB mul add M23 zFaceSAB mul add CY add def + /ZFaceSAB M31 xFaceSAB mul M32 yFaceSAB mul add M33 zFaceSAB mul add CZ add def + /XFaceSBC M11 xFaceSBC mul M12 yFaceSBC mul add M13 zFaceSBC mul add CX add def + /YFaceSBC M21 xFaceSBC mul M22 yFaceSBC mul add M23 zFaceSBC mul add CY add def + /ZFaceSBC M31 xFaceSBC mul M32 yFaceSBC mul add M33 zFaceSBC mul add CZ add def + /XFaceSCD M11 xFaceSCD mul M12 yFaceSCD mul add M13 zFaceSCD mul add CX add def + /YFaceSCD M21 xFaceSCD mul M22 yFaceSCD mul add M23 zFaceSCD mul add CY add def + /ZFaceSCD M31 xFaceSCD mul M32 yFaceSCD mul add M33 zFaceSCD mul add CZ add def + /XFaceSDA M11 xFaceSDA mul M12 yFaceSDA mul add M13 zFaceSDA mul add CX add def + /YFaceSDA M21 xFaceSDA mul M22 yFaceSDA mul add M23 zFaceSDA mul add CY add def + /ZFaceSDA M31 xFaceSDA mul M32 yFaceSDA mul add M33 zFaceSDA mul add CZ add def +% Normales aux faces + /NxSAB XFaceSAB CX sub def + /NySAB YFaceSAB CY sub def + /NzSAB ZFaceSAB CZ sub def + /NxSBC XFaceSBC CX sub def + /NySBC YFaceSBC CY sub def + /NzSBC ZFaceSBC CZ sub def + /NxSCD XFaceSCD CX sub def + /NySCD YFaceSCD CY sub def + /NzSCD ZFaceSCD CZ sub def + /NxSDA XFaceSDA CX sub def + /NySDA YFaceSDA CY sub def + /NzSDA ZFaceSDA CZ sub def + /NxABCD CX XS sub def + /NyABCD CY YS sub def + /NzABCD CZ ZS sub def +% Conditions de visibilité +% rayon vers point de vue + /RXvueSAB XFaceSAB XpointVue sub def + /RYvueSAB YFaceSAB YpointVue sub def + /RZvueSAB ZFaceSAB ZpointVue sub def + /RXvueSBC XFaceSBC XpointVue sub def + /RYvueSBC YFaceSBC YpointVue sub def + /RZvueSBC ZFaceSBC ZpointVue sub def + /RXvueSCD XFaceSCD XpointVue sub def + /RYvueSCD YFaceSCD YpointVue sub def + /RZvueSCD ZFaceSCD ZpointVue sub def + /RXvueSDA XFaceSDA XpointVue sub def + /RYvueSDA YFaceSDA YpointVue sub def + /RZvueSDA ZFaceSDA ZpointVue sub def + /RXvueABCD CX XpointVue sub def + /RYvueABCD CY YpointVue sub def + /RZvueABCD CZ ZpointVue sub def + /PSAB RXvueSAB NxSAB mul RYvueSAB NySAB mul add RZvueSAB NzSAB mul add def + /PSBC RXvueSBC NxSBC mul RYvueSBC NySBC mul add RZvueSBC NzSBC mul add def + /PSCD RXvueSCD NxSCD mul RYvueSCD NySCD mul add RZvueSCD NzSCD mul add def + /PSDA RXvueSDA NxSDA mul RYvueSDA NySDA mul add RZvueSDA NzSDA mul add def + /PSABCD RXvueABCD NxABCD mul RYvueABCD NyABCD mul add RZvueABCD NzABCD mul add def + } + def +% +/MaillageSphere { +0 increment 360 increment sub {% + /theta exch def +departPhi increment 90 increment sub {% + /phi exch def +% newpath + /Xpoint Rsphere theta cos mul phi cos mul def + /Ypoint Rsphere theta sin mul phi cos mul def + /Zpoint Rsphere phi sin mul def +CalculsPointsAfterTransformations + CalcCoordinates + moveto +% Centre de la facette + /Xpoint Rsphere theta increment 2 div add cos mul phi increment 2 div add cos mul def + /Ypoint Rsphere theta increment 2 div add sin mul phi increment 2 div add cos mul def + /Zpoint Rsphere phi increment 2 div add sin mul def +CalculsPointsAfterTransformations + /xCentreFacette Xabscisse def + /yCentreFacette Yordonnee def + /zCentreFacette Zcote def +% normale à la facette + /nXfacette xCentreFacette CX sub def + /nYfacette yCentreFacette CY sub def + /nZfacette zCentreFacette CZ sub def +% rayon vers point de vue + /RXvue xCentreFacette XpointVue sub def + /RYvue yCentreFacette YpointVue sub def + /RZvue zCentreFacette ZpointVue sub def +% test de visibilité + /PSfacette RXvue nXfacette mul + RYvue nYfacette mul add + RZvue nZfacette mul add + def +condition { +theta 1 theta increment add {% + /theta1 exch def + /Xpoint Rsphere theta1 cos mul phi cos mul def + /Ypoint Rsphere theta1 sin mul phi cos mul def + /Zpoint Rsphere phi sin mul def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +phi 1 phi increment add { + /phi1 exch def + /Xpoint Rsphere theta increment add cos mul phi1 cos mul def + /Ypoint Rsphere theta increment add sin mul phi1 cos mul def + /Zpoint Rsphere phi1 sin mul def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +theta increment add -1 theta {% + /theta1 exch def + /Xpoint Rsphere theta1 cos mul phi increment add cos mul def + /Ypoint Rsphere theta1 sin mul phi increment add cos mul def + /Zpoint Rsphere phi increment add sin mul def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +phi increment add -1 phi { + /phi1 exch def + /Xpoint Rsphere theta cos mul phi1 cos mul def + /Ypoint Rsphere theta sin mul phi1 cos mul def + /Zpoint Rsphere phi1 sin mul def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +} if +} for +} for +} def +% +/CylinderThreeD{ +reduction reduction scale +1 setlinejoin +0 incrementANGLE 360 {% + /theta exch def + 0 incrementHAUTEUR Hcylindre incrementHAUTEUR sub {% + /H exch def +% newpath + /X1 Rcylindre theta cos mul def + /Y1 Rcylindre theta sin mul def + /Z1 H def + /Xpoint X1 def + /Ypoint Y1 def + /Zpoint Z1 def +CalculsPointsAfterTransformations + /Xfacette Xabscisse def + /Yfacette Yordonnee def + /Zfacette Zcote def + CalcCoordinates + moveto +% coordonnées du centre de la facette + /Xpoint Rcylindre theta incrementANGLE 2 div add cos mul def + /Ypoint Rcylindre theta incrementANGLE 2 div add sin mul def + /Zpoint H incrementHAUTEUR 2 div add def +CalculsPointsAfterTransformations +% Point sur l'axe du cylindre +% à la même hauteur que M1 + /Zpoint Z1 def + /Xpoint 0 def + /Ypoint 0 def +CalculsPointsAfterTransformations +% normale à la facette + /nXfacette Xfacette Xabscisse sub def + /nYfacette Yfacette Yordonnee sub def + /nZfacette Zfacette Zcote sub def +% rayon vers point de vue + /RXvue Xfacette XpointVue sub def + /RYvue Yfacette YpointVue sub def + /RZvue Zfacette ZpointVue sub def +% test de visibilité + /PSfacette nXfacette RXvue mul + nYfacette RYvue mul add + nZfacette RZvue mul add + def +PSfacette 0 le { +theta 1 theta incrementANGLE add {% + /theta1 exch def + /Xpoint Rcylindre theta1 cos mul def + /Ypoint Rcylindre theta1 sin mul def + /Zpoint H def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +H 1 H incrementHAUTEUR add { + /H1 exch def + /Xpoint Rcylindre theta incrementANGLE add cos mul def + /Ypoint Rcylindre theta incrementANGLE add sin mul def + /Zpoint H1 def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +theta incrementANGLE add -1 theta {% + /theta1 exch def + /Xpoint Rcylindre theta1 cos mul def + /Ypoint Rcylindre theta1 sin mul def + /Zpoint H incrementHAUTEUR add def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +H incrementHAUTEUR add -1 H { + /H1 exch def + /Xpoint Rcylindre theta cos mul def + /Ypoint Rcylindre theta sin mul def + /Zpoint H1 def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +} if +} for +} for +% Face supérieure +% centre de la face supérieure + /Xpoint 0 def + /Zpoint Hcylindre def + /Ypoint 0 def +CalculsPointsAfterTransformations + /CxFaceSup Xabscisse def + /CyFaceSup Yordonnee def + /CzFaceSup Zcote def +% centre de la face inférieure + /CxFaceInf CX def + /CyFaceInf CY def + /CzFaceInf CZ def +% Normale à la face supérieure + /nXFaceSup CxFaceSup CxFaceInf sub def + /nYFaceSup CyFaceSup CyFaceInf sub def + /nZFaceSup CzFaceSup CzFaceInf sub def +% rayon vers point de vue verd la face inférieure + /RXvueInf CxFaceInf XpointVue sub def + /RYvueInf CyFaceInf YpointVue sub def + /RZvueInf CzFaceInf ZpointVue sub def +% rayon vers point de vue verd la face supérieure + /RXvueSup CxFaceSup XpointVue sub def + /RYvueSup CyFaceSup YpointVue sub def + /RZvueSup CzFaceSup ZpointVue sub def +% Visibilité face supérieure + /PSfaceSup RXvueSup nXFaceSup mul + RYvueSup nYFaceSup mul add + RZvueSup nZFaceSup mul add def +% Visibilité face inférieure + /PSfaceInf RXvueInf nXFaceSup neg mul + RYvueInf nYFaceSup mul sub + RZvueInf nZFaceSup mul sub def +PSfaceSup 0 le { +/TableauxPoints [ +0 1 359 {% on décrit le cercle + /theta exch def [ + /Xpoint Rcylindre theta cos mul def + /Ypoint Rcylindre theta sin mul def + /Zpoint Hcylindre def +CalculsPointsAfterTransformations + CalcCoordinates ] + } for + ] def +gsave +newpath + TableauxPoints 0 get aload pop moveto +0 1 359 { + /compteur exch def + TableauxPoints compteur get aload pop + lineto } for +0.7 setgray +closepath +fill +grestore + } if +% face inférieure +PSfaceInf 0 le { +/TableauxPoints [ +0 1 359 {% on décrit le cercle + /theta exch def [ + /Xpoint Rcylindre theta cos mul def + /Ypoint Rcylindre theta sin mul def + /Zpoint 0 def +CalculsPointsAfterTransformations + CalcCoordinates ] + } for + ] def +gsave +newpath + TableauxPoints 0 get aload pop moveto + 0 1 359 { + /compteur exch def + TableauxPoints compteur get aload pop + lineto } for +0.7 setgray +closepath +fill +grestore + } if + } def +% + % +/ConeThreeD{ + /AngleCone Rcone Hcone atan def + /TanAngleCone AngleCone dup sin exch cos div def + /incrementANGLE 10 def + /incrementHAUTEUR Hcone fracHeight mul 5 div def +1 setlinejoin +newpath +0 incrementANGLE 360 {% + /theta exch def + 0 incrementHAUTEUR Hcone fracHeight mul incrementHAUTEUR sub {% + /H exch def + % normale à la facette + /nXfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add cos mul + mul def + /nYfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add sin mul + mul def + /nZfacette Hcone AngleCone sin dup mul mul def + /Xpoint nXfacette def + /Ypoint nYfacette def + /Zpoint nZfacette def +CalculsPointsAfterTransformations + /nXfacette Xabscisse CX sub def + /nYfacette Yordonnee CY sub def + /nZfacette Zcote CZ sub def +% + /OK Hcone H sub TanAngleCone mul def + /Xpoint OK theta cos mul def + /Ypoint OK theta sin mul def + /Zpoint H def +CalculsPointsAfterTransformations + /Xfacette Xabscisse def + /Yfacette Yordonnee def + /Zfacette Zcote def + CalcCoordinates + moveto +% coordonnées du centre de la facette + /OK Hcone H incrementHAUTEUR 2 div add sub TanAngleCone mul def + /Xpoint OK theta incrementANGLE 2 div add cos mul def + /Ypoint OK theta incrementANGLE 2 div add sin mul def + /Zpoint H incrementHAUTEUR 2 div add def +CalculsPointsAfterTransformations + /XcentreFacette Xabscisse def + /YcentreFacette Yordonnee def + /ZcentreFacette Zcote def +% rayon vers point de vue + /RXvue XcentreFacette XpointVue sub def + /RYvue YcentreFacette YpointVue sub def + /RZvue ZcentreFacette ZpointVue sub def +% test de visibilité + /PSfacette nXfacette RXvue mul + nYfacette RYvue mul add + nZfacette RZvue mul add + def +PSfacette 0 le { +theta 1 theta incrementANGLE add {% + /theta1 exch def + /OK Hcone H sub TanAngleCone mul def + /Xpoint OK theta1 cos mul def + /Ypoint OK theta1 sin mul def + /Zpoint H def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +H 1 H incrementHAUTEUR add { + /H1 exch def + /OK Hcone H1 sub TanAngleCone mul def + /Xpoint OK theta incrementANGLE add cos mul def + /Ypoint OK theta incrementANGLE add sin mul def + /Zpoint H1 def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +theta incrementANGLE add -1 theta {% + /theta1 exch def + /OK Hcone H incrementHAUTEUR add sub TanAngleCone mul def + /Xpoint OK theta1 cos mul def + /Ypoint OK theta1 sin mul def + /Zpoint H incrementHAUTEUR add def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +H incrementHAUTEUR add -1 H { + /H1 exch def + /OK Hcone H1 sub TanAngleCone mul def + /Xpoint OK theta cos mul def + /Ypoint OK theta sin mul def + /Zpoint H1 def +CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +} if +} for +} for +% centre de la base inférieure après transformations + /CxFaceInf CX def + /CyFaceInf CY def + /CzFaceInf CZ def +% modification du 16/11/2002 +% /Xpoint CxFaceInf def +% /Ypoint CyFaceInf def +% /Zpoint CzFaceInf def + /Xpoint 0 def + /Ypoint 0 def + /Zpoint 0 def +% fin modification du 16/11/2002 +CalculsPointsAfterTransformations + /CxBaseInf Xabscisse def + /CyBaseInf Yordonnee def + /CzBaseInf Zcote def +% centre de la base supérieure avant transformations + /CxFaceSup 0 def + /CyFaceSup 0 def + /CzFaceSup Hcone fracHeight mul def +% Sommet du cone + /Xpoint 0 def + /Ypoint 0 def + /Zpoint Hcone def +CalculsPointsAfterTransformations + /XsommetCone Xabscisse def + /YsommetCone Yordonnee def + /ZsommetCone Zcote def +% Normale extérieure à la base inférieure + /nXBaseInf CxFaceInf XsommetCone sub def + /nYBaseInf CyFaceInf YsommetCone sub def + /nZBaseInf CzFaceInf ZsommetCone sub def +% centre de la base supérieure + /Xpoint CxFaceSup def + /Ypoint CyFaceSup def + /Zpoint CzFaceSup def +CalculsPointsAfterTransformations + /CxBaseSup Xabscisse def + /CyBaseSup Yordonnee def + /CzBaseSup Zcote def +% Normale extérieure à la base supérieure + /nXBaseSup XsommetCone CxFaceSup sub def + /nYBaseSup YsommetCone CyFaceSup sub def + /nZBaseSup ZsommetCone CzFaceSup sub def +% rayon vers point de vue + /RXvueSup CxBaseSup XpointVue sub def + /RYvueSup CyBaseSup YpointVue sub def + /RZvueSup CzBaseSup ZpointVue sub def + /RXvueInf CxBaseInf XpointVue sub def + /RYvueInf CyBaseInf YpointVue sub def + /RZvueInf CzBaseInf ZpointVue sub def +% Visibilité de la base inférieure + /PSbaseInfCone nXBaseInf RXvueInf mul + nYBaseInf RYvueInf mul add + nZBaseInf RZvueInf mul add def +% Visibilité de la base supérieure + /PSbaseSupCone nXBaseSup RXvueSup mul + nYBaseSup RYvueSup mul add + nZBaseSup RZvueSup mul add def +PSbaseInfCone 0 le { +/TableauxPoints [ +0 1 359 {% on décrit le cercle + /theta exch def [ + /Xpoint Rcone theta cos mul def + /Ypoint Rcone theta sin mul def + /Zpoint 0 def +CalculsPointsAfterTransformations + CalcCoordinates ] + } for + ] def +gsave +newpath + TableauxPoints 0 get aload pop moveto +0 1 359 { + /compteur exch def + TableauxPoints compteur get aload pop + lineto } for +0.7 setgray +closepath +fill +grestore + } if +%% PSbaseSupCone 0 le { +%% modifié le 31/10/2003 +%PSbaseSupCone 0 ge { +PSbaseSupCone 0 le { +/TableauxPoints [ +0 1 359 {% on décrit le cercle + /theta exch def [ + /OK Hcone 1 fracHeight sub mul TanAngleCone mul def + /Xpoint OK theta cos mul def + /Ypoint OK theta sin mul def + /Zpoint Hcone fracHeight mul def +CalculsPointsAfterTransformations + CalcCoordinates ] + } for + ] def +gsave +newpath + TableauxPoints 0 get aload pop moveto +0 1 359 { + /compteur exch def + TableauxPoints compteur get aload pop + lineto } for +0.7 setgray +closepath +fill +grestore + } if + } def +/PortionSphere{% + /Xpoint Rsphere psTHETA dTHETA neg add cos mul psPHI dPHI sub cos mul def + /Ypoint Rsphere psTHETA dTHETA neg add sin mul psPHI dPHI sub cos mul def + /Zpoint Rsphere psPHI dPHI sub sin mul def +CalculsPointsAfterTransformations + /xCentreFacette Xabscisse def + /yCentreFacette Yordonnee def + /zCentreFacette Zcote def +% normale à la facette + /nXfacette xCentreFacette CX sub def + /nYfacette yCentreFacette CY sub def + /nZfacette zCentreFacette CZ sub def +% rayon vers point de vue + /RXvue xCentreFacette XpointVue sub def + /RYvue yCentreFacette YpointVue sub def + /RZvue zCentreFacette ZpointVue sub def +% test de visibilité + /PSfacette RXvue nXfacette mul + RYvue nYfacette mul add + RZvue nZfacette mul add + def +PSfacette 0 le { +CalcCoordinates +newpath + moveto +psTHETA dTHETA sub 1 psTHETA dTHETA add { + /Theta exch def + /Xpoint Rsphere Theta cos psPHI dPHI sub cos mul mul def + /Ypoint Rsphere Theta sin psPHI dPHI sub cos mul mul def + /Zpoint Rsphere psPHI dPHI sub sin mul def + CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +psPHI dPHI sub 1 psPHI dPHI add { + /Phi exch def + /Xpoint Rsphere psTHETA dTHETA add cos Phi cos mul mul def + /Ypoint Rsphere psTHETA dTHETA add sin Phi cos mul mul def + /Zpoint Rsphere Phi sin mul def + CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +psTHETA dTHETA add -1 psTHETA dTHETA sub { + /Theta exch def + /Xpoint Rsphere Theta cos psPHI dPHI add cos mul mul def + /Ypoint Rsphere Theta sin psPHI dPHI add cos mul mul def + /Zpoint Rsphere psPHI dPHI add sin mul def + CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +psPHI dPHI add -1 psPHI dPHI sub { + /Phi exch def + /Xpoint Rsphere psTHETA dTHETA sub cos Phi cos mul mul def + /Ypoint Rsphere psTHETA dTHETA sub sin Phi cos mul mul def + /Zpoint Rsphere Phi sin mul def + CalculsPointsAfterTransformations + CalcCoordinates + lineto + } for +closepath +} if +} def +% Dodecahedron : 31 décembre 2003 +% datas : Graphisme scientifique R.Dony +% Masson ed. page 240 +/Dodecahedron{% + /XA M11 0 mul M12 A 0.607062 mul mul add M13 A mul 0.794655 mul add CX add def + /YA M21 0 mul M22 A 0.607062 mul mul add M23 A mul 0.794655 mul add CY add def + /ZA M31 0 mul M32 A 0.607062 mul mul add M33 A mul 0.794655 mul add CZ add def + /XB M11 A mul -0.5773503 mul M12 A mul 0.1875925 mul add M13 A mul 0.7946545 mul add CX add def + /YB M21 A mul -0.5773503 mul M22 A mul 0.1875925 mul add M23 A mul 0.7946545 mul add CY add def + /ZB M31 A mul -0.5773503 mul M32 A mul 0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def + /XC M11 A mul -0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def + /YC M21 A mul -0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def + /ZC M31 A mul -0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def + /XD M11 A mul 0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def + /YD M21 A mul 0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def + /ZD M31 A mul 0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def + /XE M11 A mul 0.5773503 mul M12 A mul 0.1875925 mul add M13 A mul 0.7946545 mul add CX add def + /YE M21 A mul 0.5773503 mul M22 A mul 0.1875925 mul add M23 A mul 0.7946545 mul add CY add def + /ZE M31 A mul 0.5773503 mul M32 A mul 0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def + /XF M11 A mul 0 mul M12 A mul 0.982247 mul add M13 A mul 0.175925 mul add CX add def + /YF M21 A mul 0 mul M22 A mul 0.982247 mul add M23 A mul 0.175925 mul add CY add def + /ZF M31 A mul 0 mul M32 A mul 0.982247 mul add M33 A mul 0.175925 mul add CZ add def + /XG M11 A mul -0.9341724 mul M12 A mul 0.303531 mul add M13 A mul 0.1875925 mul add CX add def + /YG M21 A mul -0.9341724 mul M22 A mul 0.303531 mul add M23 A mul 0.1875925 mul add CY add def + /ZG M31 A mul -0.9341724 mul M32 A mul 0.303531 mul add M33 A mul 0.1875925 mul add CZ add def + /XH M11 A mul -0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def + /YH M21 A mul -0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def + /ZH M31 A mul -0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def + /XI M11 A mul 0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def + /YI M21 A mul 0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def + /ZI M31 A mul 0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def + /XJ M11 A mul 0.9341724 mul M12 A mul 0.303531 mul add M13 A mul 0.1875925 mul add CX add def + /YJ M21 A mul 0.9341724 mul M22 A mul 0.303531 mul add M23 A mul 0.1875925 mul add CY add def + /ZJ M31 A mul 0.9341724 mul M32 A mul 0.303531 mul add M33 A mul 0.1875925 mul add CZ add def + /XK M11 A mul 0 mul M12 A mul -0.982247 mul add M13 A mul -0.1875925 mul add CX add def + /YK M21 A mul 0 mul M22 A mul -0.982247 mul add M23 A mul -0.1875925 mul add CY add def + /ZK M31 A mul 0 mul M32 A mul -0.982247 mul add M33 A mul -0.1875925 mul add CZ add def + /XL M11 A mul 0.9341724 mul M12 A mul -0.303531 mul add M13 A mul -0.1875925 mul add CX add def + /YL M21 A mul 0.9341724 mul M22 A mul -0.303531 mul add M23 A mul -0.1875925 mul add CY add def + /ZL M31 A mul 0.9341724 mul M32 A mul -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def + /XM M11 A mul 0.5773503 mul M12 A mul 0.7946545 mul add M13 A mul -0.1875925 mul add CX add def + /YM M21 A mul 0.5773503 mul M22 A mul 0.7946545 mul add M23 A mul -0.1875925 mul add CY add def + /ZM M31 A mul 0.5773503 mul M32 A mul 0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def + /XN M11 A mul -0.5773503 mul M12 A mul 0.7946545 mul add M13 A mul -0.1875925 mul add CX add def + /YN M21 A mul -0.5773503 mul M22 A mul 0.7946545 mul add M23 A mul -0.1875925 mul add CY add def + /ZN M31 A mul -0.5773503 mul M32 A mul 0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def + /XO M11 A mul -0.9341724 mul M12 A mul -0.303531 mul add M13 A mul -0.1875925 mul add CX add def + /YO M21 A mul -0.9341724 mul M22 A mul -0.303531 mul add M23 A mul -0.1875925 mul add CY add def + /ZO M31 A mul -0.9341724 mul M32 A mul -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def + /XP M11 A mul -0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def + /YP M21 A mul -0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def + /ZP M31 A mul -0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def + /XQ M11 A mul -0.3568221 mul M12 A mul 0.4911235 mul add M13 A mul -0.7946545 mul add CX add def + /YQ M21 A mul -0.3568221 mul M22 A mul 0.4911235 mul add M23 A mul -0.7946545 mul add CY add def + /ZQ M31 A mul -0.3568221 mul M32 A mul 0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def + /XR M11 A mul 0.3568221 mul M12 A mul 0.4911235 mul add M13 A mul -0.7946545 mul add CX add def + /YR M21 A mul 0.3568221 mul M22 A mul 0.4911235 mul add M23 A mul -0.7946545 mul add CY add def + /ZR M31 A mul 0.3568221 mul M32 A mul 0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def + /XS M11 A mul 0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def + /YS M21 A mul 0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def + /ZS M31 A mul 0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def + /XT M11 0 mul M12 A -0.607062 mul mul add M13 A mul -0.794655 mul add CX add def + /YT M21 0 mul M22 A -0.607062 mul mul add M23 A mul -0.794655 mul add CY add def + /ZT M31 0 mul M32 A -0.607062 mul mul add M33 A mul -0.794655 mul add CZ add def +% Centres des faces : condition de visibilité +% FACE 1 pentagone régulier ABCDE +% OC1 + /XC1 XA XB add XC add XD add XE add 5 div def + /YC1 YA YB add YC add YD add YE add 5 div def + /ZC1 ZA ZB add ZC add ZD add ZE add 5 div def +% Normale à la face 1 + /NX1 XC1 CX sub def + /NY1 YC1 CY sub def + /NZ1 ZC1 CZ sub def +% rayon vers point de vue + /RXvue1 XC1 XpointVue sub def + /RYvue1 YC1 YpointVue sub def + /RZvue1 ZC1 ZpointVue sub def +% produit scalaire + /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def +% FACE 2 pentagone régulier EDILJ +% OC2 + /XC2 XE XD add XI add XL add XJ add 5 div def + /YC2 YE YD add YI add YL add YJ add 5 div def + /ZC2 ZE ZD add ZI add ZL add ZJ add 5 div def +% Normale à la face 2 + /NX2 XC2 CX sub def + /NY2 YC2 CY sub def + /NZ2 ZC2 CZ sub def +% rayon vers point de vue + /RXvue2 XC2 XpointVue sub def + /RYvue2 YC2 YpointVue sub def + /RZvue2 ZC2 ZpointVue sub def +% produit scalaire + /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def +% FACE 3 pentagone régulier EJMFA +% OC3 + /XC3 XE XJ add XM add XF add XA add 5 div def + /YC3 YE YJ add YM add YF add YA add 5 div def + /ZC3 ZE ZJ add ZM add ZF add ZA add 5 div def +% Normale à la face 2 + /NX3 XC3 CX sub def + /NY3 YC3 CY sub def + /NZ3 ZC3 CZ sub def +% rayon vers point de vue + /RXvue3 XC3 XpointVue sub def + /RYvue3 YC3 YpointVue sub def + /RZvue3 ZC3 ZpointVue sub def +% produit scalaire + /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def +% FACE 4 pentagone régulier AFNGB +% OC4 + /XC4 XA XF add XN add XG add XB add 5 div def + /YC4 YA YF add YN add YG add YB add 5 div def + /ZC4 ZA ZF add ZN add ZG add ZB add 5 div def +% Normale à la face 4 + /NX4 XC4 CX sub def + /NY4 YC4 CY sub def + /NZ4 ZC4 CZ sub def +% rayon vers point de vue + /RXvue4 XC4 XpointVue sub def + /RYvue4 YC4 YpointVue sub def + /RZvue4 ZC4 ZpointVue sub def +% produit scalaire + /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def +% FACE 5 pentagone régulier BGOHC +% OC5 + /XC5 XB XG add XO add XH add XC add 5 div def + /YC5 YB YG add YO add YH add YC add 5 div def + /ZC5 ZB ZG add ZO add ZH add ZC add 5 div def +% Normale à la face 5 + /NX5 XC5 CX sub def + /NY5 YC5 CY sub def + /NZ5 ZC5 CZ sub def +% rayon vers point de vue + /RXvue5 XC5 XpointVue sub def + /RYvue5 YC5 YpointVue sub def + /RZvue5 ZC5 ZpointVue sub def +% produit scalaire + /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def +% FACE 6 pentagone régulier CHKID +% OC6 + /XC6 XC XH add XK add XI add XD add 5 div def + /YC6 YC YH add YK add YI add YD add 5 div def + /ZC6 ZC ZH add ZK add ZI add ZD add 5 div def +% Normale à la face 6 + /NX6 XC6 CX sub def + /NY6 YC6 CY sub def + /NZ6 ZC6 CZ sub def +% rayon vers point de vue + /RXvue6 XC6 XpointVue sub def + /RYvue6 YC6 YpointVue sub def + /RZvue6 ZC6 ZpointVue sub def +% produit scalaire + /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def +% FACE 7 pentagone régulier KTSLI +% OC7 + /XC7 XK XT add XS add XL add XI add 5 div def + /YC7 YK YT add YS add YL add YI add 5 div def + /ZC7 ZK ZT add ZS add ZL add ZI add 5 div def +% Normale à la face 7 + /NX7 XC7 CX sub def + /NY7 YC7 CY sub def + /NZ7 ZC7 CZ sub def +% rayon vers point de vue + /RXvue7 XC7 XpointVue sub def + /RYvue7 YC7 YpointVue sub def + /RZvue7 ZC7 ZpointVue sub def +% produit scalaire + /PS7 RXvue7 NX7 mul RYvue7 NY7 mul add RZvue7 NZ7 mul add def +% FACE 8 pentagone régulier LSRMJ +% OC8 + /XC8 XL XS add XR add XM add XJ add 5 div def + /YC8 YL YS add YR add YM add YJ add 5 div def + /ZC8 ZL ZS add ZR add ZM add ZJ add 5 div def +% Normale à la face 8 + /NX8 XC8 CX sub def + /NY8 YC8 CY sub def + /NZ8 ZC8 CZ sub def +% rayon vers point de vue + /RXvue8 XC8 XpointVue sub def + /RYvue8 YC8 YpointVue sub def + /RZvue8 ZC8 ZpointVue sub def +% produit scalaire + /PS8 RXvue8 NX8 mul RYvue8 NY8 mul add RZvue8 NZ8 mul add def +% FACE 9 pentagone régulier MRQNF +% OC9 + /XC9 XM XR add XQ add XN add XF add 5 div def + /YC9 YM YR add YQ add YN add YF add 5 div def + /ZC9 ZM ZR add ZQ add ZN add ZF add 5 div def +% Normale à la face 6 + /NX9 XC9 CX sub def + /NY9 YC9 CY sub def + /NZ9 ZC9 CZ sub def +% rayon vers point de vue + /RXvue9 XC9 XpointVue sub def + /RYvue9 YC9 YpointVue sub def + /RZvue9 ZC9 ZpointVue sub def +% produit scalaire + /PS9 RXvue9 NX9 mul RYvue9 NY9 mul add RZvue9 NZ9 mul add def +% FACE 10 pentagone régulier NQPOG +% OC10 + /XC10 XN XQ add XP add XO add XG add 5 div def + /YC10 YN YQ add YP add YO add YG add 5 div def + /ZC10 ZN ZQ add ZP add ZO add ZG add 5 div def +% Normale à la face 6 + /NX10 XC10 CX sub def + /NY10 YC10 CY sub def + /NZ10 ZC10 CZ sub def +% rayon vers point de vue + /RXvue10 XC10 XpointVue sub def + /RYvue10 YC10 YpointVue sub def + /RZvue10 ZC10 ZpointVue sub def +% produit scalaire + /PS10 RXvue10 NX10 mul RYvue10 NY10 mul add RZvue10 NZ10 mul add def +% FACE 11 pentagone régulier OPTKH +% OC11 + /XC11 XO XP add XT add XK add XH add 5 div def + /YC11 YO YP add YT add YK add YH add 5 div def + /ZC11 ZO ZP add ZT add ZK add ZH add 5 div def +% Normale à la face 11 + /NX11 XC11 CX sub def + /NY11 YC11 CY sub def + /NZ11 ZC11 CZ sub def +% rayon vers point de vue + /RXvue11 XC11 XpointVue sub def + /RYvue11 YC11 YpointVue sub def + /RZvue11 ZC11 ZpointVue sub def +% produit scalaire + /PS11 RXvue11 NX11 mul RYvue11 NY11 mul add RZvue11 NZ11 mul add def +% FACE 12 pentagone régulier PQRST +% OC12 + /XC12 XP XQ add XR add XS add XT add 5 div def + /YC12 YP YQ add YR add YS add YT add 5 div def + /ZC12 ZP ZQ add ZR add ZS add ZT add 5 div def +% Normale à la face 12 + /NX12 XC12 CX sub def + /NY12 YC12 CY sub def + /NZ12 ZC12 CZ sub def +% rayon vers point de vue + /RXvue12 XC12 XpointVue sub def + /RYvue12 YC12 YpointVue sub def + /RZvue12 ZC12 ZpointVue sub def +% produit scalaire + /PS12 RXvue12 NX12 mul RYvue12 NY12 mul add RZvue12 NZ12 mul add def +% faceOne ABDCE +PS1 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YA def + /Zcote ZA def + /Xabscisse XA def + CalcCoordinates + moveto + /Zcote ZB def + /Xabscisse XB def + /Yordonnee YB def + CalcCoordinates + lineto + /Zcote ZC def + /Xabscisse XC def + /Yordonnee YC def + CalcCoordinates + lineto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto + /Zcote ZE def + /Xabscisse XE def + /Yordonnee YE def + CalcCoordinates + lineto +closepath +gsave +0.05 0.1 0.1 0 setcmykcolor +fill +grestore +stroke +} if +% face2 EDILJ +PS2 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YE def + /Zcote ZE def + /Xabscisse XE def + CalcCoordinates + moveto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto + /Zcote ZI def + /Xabscisse XI def + /Yordonnee YI def + CalcCoordinates + lineto + /Zcote ZL def + /Xabscisse XL def + /Yordonnee YL def + CalcCoordinates + lineto + /Zcote ZJ def + /Xabscisse XJ def + /Yordonnee YJ def + CalcCoordinates + lineto +closepath +gsave +0.05 0.15 0.15 0 setcmykcolor +fill +grestore +stroke +} if +% face3 EJMFA +PS3 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YE def + /Zcote ZE def + /Xabscisse XE def + CalcCoordinates + moveto + /Zcote ZJ def + /Xabscisse XJ def + /Yordonnee YJ def + CalcCoordinates + lineto + /Zcote ZM def + /Xabscisse XM def + /Yordonnee YM def + CalcCoordinates + lineto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto + /Zcote ZA def + /Xabscisse XA def + /Yordonnee YA def + CalcCoordinates + lineto +closepath +gsave +0.05 0.2 0.2 0 setcmykcolor +fill +grestore +stroke +} if +% face4 AFNGB +PS4 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YA def + /Zcote ZA def + /Xabscisse XA def + CalcCoordinates + moveto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto + /Zcote ZN def + /Xabscisse XN def + /Yordonnee YN def + CalcCoordinates + lineto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto + /Zcote ZB def + /Xabscisse XB def + /Yordonnee YB def + CalcCoordinates + lineto +closepath +gsave +0.05 0.25 0.25 0 setcmykcolor +fill +grestore +stroke +} if +% face5 BGOHC +PS5 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YB def + /Zcote ZB def + /Xabscisse XB def + CalcCoordinates + moveto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto + /Zcote ZO def + /Xabscisse XO def + /Yordonnee YO def + CalcCoordinates + lineto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto + /Zcote ZC def + /Xabscisse XC def + /Yordonnee YC def + CalcCoordinates + lineto +closepath +gsave +0.05 0.3 0.3 0 setcmykcolor +fill +grestore +stroke +} if +% face6 CHKID +PS6 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YC def + /Zcote ZC def + /Xabscisse XC def + CalcCoordinates + moveto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto + /Zcote ZK def + /Xabscisse XK def + /Yordonnee YK def + CalcCoordinates + lineto + /Zcote ZI def + /Xabscisse XI def + /Yordonnee YI def + CalcCoordinates + lineto + /Zcote ZD def + /Xabscisse XD def + /Yordonnee YD def + CalcCoordinates + lineto +closepath +gsave +0.05 0.35 0.35 0 setcmykcolor +fill +grestore +stroke +} if +% face7 KTSLI +PS7 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YK def + /Zcote ZK def + /Xabscisse XK def + CalcCoordinates + moveto + /Zcote ZT def + /Xabscisse XT def + /Yordonnee YT def + CalcCoordinates + lineto + /Zcote ZS def + /Xabscisse XS def + /Yordonnee YS def + CalcCoordinates + lineto + /Zcote ZL def + /Xabscisse XL def + /Yordonnee YL def + CalcCoordinates + lineto + /Zcote ZI def + /Xabscisse XI def + /Yordonnee YI def + CalcCoordinates + lineto +closepath +gsave +0.05 0.4 0.4 0 setcmykcolor +fill +grestore +stroke +} if +% face8 LSRMJ +PS8 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YL def + /Zcote ZL def + /Xabscisse XL def + CalcCoordinates + moveto + /Zcote ZS def + /Xabscisse XS def + /Yordonnee YS def + CalcCoordinates + lineto + /Zcote ZR def + /Xabscisse XR def + /Yordonnee YR def + CalcCoordinates + lineto + /Zcote ZM def + /Xabscisse XM def + /Yordonnee YM def + CalcCoordinates + lineto + /Zcote ZJ def + /Xabscisse XJ def + /Yordonnee YJ def + CalcCoordinates + lineto +closepath +gsave +0.05 0.45 0.45 0 setcmykcolor +fill +grestore +stroke +} if +% face9 MRQNF +PS9 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YM def + /Zcote ZM def + /Xabscisse XM def + CalcCoordinates + moveto + /Zcote ZR def + /Xabscisse XR def + /Yordonnee YR def + CalcCoordinates + lineto + /Zcote ZQ def + /Xabscisse XQ def + /Yordonnee YQ def + CalcCoordinates + lineto + /Zcote ZN def + /Xabscisse XN def + /Yordonnee YN def + CalcCoordinates + lineto + /Zcote ZF def + /Xabscisse XF def + /Yordonnee YF def + CalcCoordinates + lineto +closepath +gsave +0.05 0.5 0.5 0 setcmykcolor +fill +grestore +stroke +} if +% face10 NQPOG +PS10 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YN def + /Zcote ZN def + /Xabscisse XN def + CalcCoordinates + moveto + /Zcote ZQ def + /Xabscisse XQ def + /Yordonnee YQ def + CalcCoordinates + lineto + /Zcote ZP def + /Xabscisse XP def + /Yordonnee YP def + CalcCoordinates + lineto + /Zcote ZO def + /Xabscisse XO def + /Yordonnee YO def + CalcCoordinates + lineto + /Zcote ZG def + /Xabscisse XG def + /Yordonnee YG def + CalcCoordinates + lineto +closepath +gsave +0.05 0.55 0.55 0 setcmykcolor +fill +grestore +stroke +} if +% face11 OPTKH +PS11 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YO def + /Zcote ZO def + /Xabscisse XO def + CalcCoordinates + moveto + /Zcote ZP def + /Xabscisse XP def + /Yordonnee YP def + CalcCoordinates + lineto + /Zcote ZT def + /Xabscisse XT def + /Yordonnee YT def + CalcCoordinates + lineto + /Zcote ZK def + /Xabscisse XK def + /Yordonnee YK def + CalcCoordinates + lineto + /Zcote ZH def + /Xabscisse XH def + /Yordonnee YH def + CalcCoordinates + lineto +closepath +gsave +0.05 0.6 0.6 0 setcmykcolor +fill +grestore +stroke +} if +% face12 PQRST +PS12 0 Condition { % +reduction reduction scale +1 setlinejoin +newpath + /Yordonnee YP def + /Zcote ZP def + /Xabscisse XP def + CalcCoordinates + moveto + /Zcote ZQ def + /Xabscisse XQ def + /Yordonnee YQ def + CalcCoordinates + lineto + /Zcote ZR def + /Xabscisse XR def + /Yordonnee YR def + CalcCoordinates + lineto + /Zcote ZS def + /Xabscisse XS def + /Yordonnee YS def + CalcCoordinates + lineto + /Zcote ZT def + /Xabscisse XT def + /Yordonnee YT def + CalcCoordinates + lineto +closepath +gsave +0.05 0.65 0.65 0 setcmykcolor +fill +grestore +stroke +} if +} +def +end diff --git a/Master/texmf-dist/source/generic/pst-vue3d/Makefile b/Master/texmf-dist/source/generic/pst-vue3d/Makefile new file mode 100644 index 00000000000..1eac89064a6 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-vue3d/Makefile @@ -0,0 +1,48 @@ + +# `Makefile' for `pst-3dplot.pdf', hv, 2007/03/17 + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps + +PACKAGE = pst-vue3d + +MAIN = $(PACKAGE)-doc + +LATEX = latex + +ARCHNAME = $(MAIN)-$(shell date +%y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile + +all : doc clean +doc: $(MAIN).pdf + +$(MAIN).pdf : $(MAIN).ps + GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< + +$(MAIN).ps : $(MAIN).dvi + dvips $< + +$(MAIN).dvi : $(MAIN).tex + $(LATEX) $< + $(LATEX) $< + if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi + if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi + makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ + $(basename $<).glo + makeindex -t $(basename $<).ilg -o $(basename $<).ind \ + $(basename $<).idx + bibtex $(basename $<) + $(LATEX) $< + $(LATEX) $< + +clean : + $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .Roessler .bbl ) + $(RM) $(addprefix $(MAIN), .dvi .ps) + +veryclean : clean + $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +# EOF diff --git a/Master/texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex b/Master/texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex index 07ae96eb41e..1b23e7b75c8 100644 --- a/Master/texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex +++ b/Master/texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex @@ -1,4 +1,3 @@ - %% This is file `pst-vue3d.tex', %% %% IMPORTANT NOTICE: @@ -23,14 +22,14 @@ % Require PSTricks and pst-node packages \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi \ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi +\ifx\PSTthreeDLoaded\endinput\else\input pst-3d.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey\fi % -\def\fileversion{1.21}% -\def\filedate{2005/02/21}% -\message{`PST-VUE3D v\fileversion, \filedate\space (ML)(hv)}% -\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax +\def\fileversion{1.23}% +\def\filedate{2007/03/26}% +\message{`pst-vue3d v\fileversion, \filedate\space (ML)(hv)}% +\edef\PstAtCode{\the\catcode`\@}\catcode`\@=11\relax \pst@addfams{pst-vue3d}% for pst-xkey - %%%% \define@key[psset]{pst-vue3d}{scale}{\def\psk@TroisD@scale{#1}} % echelle \define@key[psset]{pst-vue3d}{RotX}{\def\psk@TroisD@RotX{#1}} % rotation autour de Ox en degrés @@ -107,6 +106,10 @@ % \def\variablesTroisD{% 0 0 translate +% hv 2005-04-30 --->beg + /xUnit \pst@number\psxunit def + /yUnit \pst@number\psyunit def +% hv 2005-04-30 <---end /reduction \psk@TroisD@scale\space def /RotX \psk@TroisD@RotX\space def /RotY \psk@TroisD@RotY\space def @@ -161,7 +164,7 @@ % hv 2003-12-20 % -------------- Utilities ----------------- \SpecialCoor -\pstheader{3D.pro} +\pstheader{pst-vue3d.pro} \def\face{% \pscurve(1;160)(0.8;180)(1;200) @@ -298,10 +301,10 @@ } % % -\def\CubeThreeD{\pst@object{CubeThreeD}} +\def\CubeThreeD{\def\pst@par{}\pst@object{CubeThreeD}} \def\CubeThreeD@i(#1,#2,#3){{ \begin@ClosedObj - \use@par +% \use@par \addto@pscode{% \variablesTroisD \ifPst@SphericalCoor @@ -324,7 +327,7 @@ /CubeColorFaceFour {\psk@TroisD@CubeColorFaceFour} def /CubeColorFaceSix {\psk@TroisD@CubeColorFaceSix} def tx@3DDict begin - /Condition1 {PS1 0 le } def + /Condition1 { PS1 0 le } def Cube end }% fin du code ps @@ -666,6 +669,34 @@ end){\@NodeNameThreeD}% } % + +\iffalse +% hv 2005-12-04 +\def\pnodeThreeD{\pst@object{pnodeThreeD}} +\def\pnodeThreeD@i(#1,#2,#3)#4{% + \pst@killglue + \begingroup + \use@par + \pnode(! + \psk@embedangle + \psk@viewpoint + \psk@viewangle + \tx@SetMatrixThreeD + \ifPst@SphericalCoor + /Radius #1 def + /longitude #2 def + /latitude #3 def + Radius longitude cos mul latitude cos mul % x + Radius longitude sin mul latitude cos mul % y + Radius latitude sin mul % z + \else + #1 #2 #3 + \fi + \tx@ProjThreeD){#4}% + \endgroup} +% +\let\pNodeThreeD\pnodeThreeD +\fi % \def\TetraedreThreeD{\pst@object{TetraedreThreeD}} \def\TetraedreThreeD@i(#1,#2,#3){{% @@ -1016,7 +1047,7 @@ % % \def\ConeThreeD{\pst@object{ConeThreeD}} -\def\ConeThreeD@i(#1,#2,#3)#4#5{{% +\def\ConeThreeD@i(#1,#2,#3)#4#5{% % Le centre de la base sera placé avec % (#2,#3,#4) les paramètres CX,CY et CZ % #5 rayon @@ -1047,7 +1078,7 @@ }% fin du code ps \showpointsfalse \end@ClosedObj -}\ignorespaces}% +\ignorespaces}% % \def\CircleThreeD{\pst@object{CircleThreeD}} \def\CircleThreeD@i(#1,#2,#3)#4{{% @@ -1245,6 +1276,147 @@ \end@OpenObj }\ignorespaces}% % fin de la commande PSTricks % +\newif\ifPstThreeDplot@showInside +\define@key[psset]{pst-vue3d}{showInside}[true]{\@nameuse{PstThreeDplot@showInside@#1}} +\define@key[psset]{pst-vue3d}{SegmentColor}{\pst@getcolor{#1}\psk@ThreeDplot@SegmentColor} +\define@key[psset]{pst-vue3d}{increment}{\pst@getint{#1}\psk@ThreeDplot@increment} +\psset[pst-vue3d]{showInside,SegmentColor={[cmyk]{0.2,0.6,1,0}},increment=10} +% +\def\ParaboloidThreeD{\pst@object{ParaboloidThreeD}} +\def\ParaboloidThreeD@i#1#2{% +\begin@SpecialObj% +\addto@pscode{% + \psk@embedangle + \psk@viewpoint + \psk@viewangle + \tx@SetMatrixThreeD +% Vecteur ViewPoint + \psk@viewpoint + /vZ ED + /vY ED + /vX ED + /increment \psk@ThreeDplot@increment\space def + /height #1 def + /radius #2 #1 sqrt div def + /cmyk {} def + 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} +% % % 11 novembre \def\DemiSphereThreeD{\pst@object{DemiSphereThreeD}} @@ -1463,6 +1635,8 @@ \end@ClosedObj% }\ignorespaces}% % fin de la commande PSTricks % +\catcode`\@=\PstAtCode\relax +% %% END: pst-vue3D.tex \endinput diff --git a/Master/texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty b/Master/texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty index 30875625bb8..3895513e2af 100644 --- a/Master/texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty +++ b/Master/texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty @@ -1,7 +1,8 @@ \RequirePackage{pstricks} -\ProvidesPackage{pst-vue3d}[2000/07/15 package wrapper for - pst-vue3d.tex (ML)] +\ProvidesPackage{pst-vue3d}[2007/03/26 package wrapper for + pst-vue3d.tex (hv)] \input{pst-vue3d.tex} +\IfFileExists{pst-vue3d.pro}{\@addtofilelist{pst-vue3d.pro}}{}% \ProvidesFile{pst-vue3d.tex} - [\filedate\space v\fileversion\space `PST-VUE3D' (ML)] + [\filedate\space v\fileversion\space `pst-vue3d' (ML,hv)] \endinput diff --git a/Master/texmf-dist/tpm/pst-vue3d.tpm b/Master/texmf-dist/tpm/pst-vue3d.tpm index 319a189bb45..d86372a7656 100644 --- a/Master/texmf-dist/tpm/pst-vue3d.tpm +++ b/Master/texmf-dist/tpm/pst-vue3d.tpm @@ -3,7 +3,7 @@ pst-vue3d Package - 2006/01/09 00:44:09 + 2007/03/26 14:26:10 1.0e rahtz @@ -18,35 +18,20 @@ others can be viewed from different points. 934693 - -texmf-dist/dvips/pst-vue3d/3D.pro + +texmf-dist/dvips/pst-vue3d/pst-vue3d.pro texmf-dist/tex/generic/pst-vue3d/pst-vue3d.tex texmf-dist/tex/latex/pst-vue3d/pst-vue3d.sty texmf-dist/tpm/pst-vue3d.tpm - + texmf-dist/doc/generic/pst-vue3d/Changes texmf-dist/doc/generic/pst-vue3d/README -texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf -texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex -texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf -texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex -texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf -texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex -texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf -texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf -texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex -texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf -texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex -texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf -texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex -texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex +texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.bib +texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.pdf +texmf-dist/doc/generic/pst-vue3d/pst-vue3d-doc.tex + texmf-dist/source/generic/pst-vue3d/Makefile Package/pst-vue3d -- cgit v1.2.3