diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:09 +0000 |
commit | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (patch) | |
tree | 64b660a18f1b3b95331a3c0ac2ba45c395e0bd88 /Master/texmf-dist/doc/generic/pst-vue3d | |
parent | f9ba1f4431124f48769a2666d5d9ec921345ca71 (diff) |
doc 3
git-svn-id: svn://tug.org/texlive/trunk@79 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-vue3d')
22 files changed, 1961 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/Changes b/Master/texmf-dist/doc/generic/pst-vue3d/Changes new file mode 100644 index 00000000000..9e28d9dbd0c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/Changes @@ -0,0 +1,14 @@ +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.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,... + added option SphericalCoor and modify all + 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 diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/README b/Master/texmf-dist/doc/generic/pst-vue3d/README new file mode 100644 index 00000000000..5fb550e90c1 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/README @@ -0,0 +1,16 @@ +%% Package `pst-vue3d.tex' +%% +%% 2005-02-21 +%% + +Save the files + +pst-vue3.sty +pst-vue3.tex +3d.pro -> texmf/dvips/pstricks/ + +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 diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf Binary files differnew file mode 100644 index 00000000000..426b0741a34 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex new file mode 100644 index 00000000000..8cca398d509 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/ChaiseDemo.tex @@ -0,0 +1,36 @@ +\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 Binary files differnew file mode 100644 index 00000000000..aef6fe88b44 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex new file mode 100644 index 00000000000..11a009fb95d --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/CoorDemo.tex @@ -0,0 +1,25 @@ +\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 Binary files differnew file mode 100644 index 00000000000..3c64334088c --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex new file mode 100644 index 00000000000..b21e6794ccf --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/FrameDemo.tex @@ -0,0 +1,58 @@ +\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 Binary files differnew file mode 100644 index 00000000000..ae2b3652466 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex new file mode 100644 index 00000000000..1796dd659f8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/Line3d.tex @@ -0,0 +1,66 @@ +\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 Binary files differnew file mode 100644 index 00000000000..e82f795d86e --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex new file mode 100644 index 00000000000..1e0608c2b11 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo.tex @@ -0,0 +1,69 @@ +\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 Binary files differnew file mode 100644 index 00000000000..51d99979148 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex new file mode 100644 index 00000000000..8e59c4abcb2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo2.tex @@ -0,0 +1,173 @@ +\documentclass[a4paper]{article} +% Manuel Luque <MLuque@aol.com> +% Herbert Voss <voss@perce.de> - 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 Binary files differnew file mode 100644 index 00000000000..6b3116a610f --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex new file mode 100644 index 00000000000..ececb1d3531 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PontDemo3.tex @@ -0,0 +1,170 @@ +\documentclass[a4paper]{article} +% Manuel Luque <MLuque@aol.com> +% Herbert Voss <voss@perce.de> - 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 Binary files differnew file mode 100644 index 00000000000..7dc446803ca --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex new file mode 100644 index 00000000000..b0cf19da007 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/PyramidDemo.tex @@ -0,0 +1,17 @@ +\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 Binary files differnew file mode 100644 index 00000000000..908c16af5d2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex b/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex new file mode 100644 index 00000000000..ec86ad42a83 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/examples/SphereDemo0.tex @@ -0,0 +1,57 @@ +\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/vue3d-e.pdf b/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.pdf Binary files differnew file mode 100644 index 00000000000..d3bf27167b8 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.pdf diff --git a/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex b/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex new file mode 100644 index 00000000000..12862908874 --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-vue3d/vue3d-e.tex @@ -0,0 +1,1260 @@ +\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 <voss@pstricks.de> +% 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=<value>, RotY=<value>, RotZ=<value>+ + +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=<degrees>+ (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} |