\documentclass{article} \usepackage{pst-V3D,pst-grad} \usepackage{pst-slpe} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc}% utiliser obligatoirement ce codage !!! % sinon affichage des lettres accentuées % très perturbées !!! %\usepackage{lmodern} \usepackage[francais]{babel} \usepackage{longtable} \usepackage[a4paper]{geometry} \usepackage{url} % \usepackage{frenchle} et % \usepackage[french]{babel} % posent des problèmes avec certains caractères dans le texte % comme : ; % tous les objets \input{cube_object.tex} \input{icosahedral_object.tex} \input{sphere_object.tex} \input{icosahedral_with_holes.tex} \input{octahedral_object.tex} \input{sphereII_object.tex} \input{dodecahedral_object.tex} \input{tetrahedral_object.tex} \input{cylindre_object.tex} \input{cone_object.tex} \input{sphericalcap_object.tex} \input{prisme_object.tex} \input{cylindrical_portion_object.tex} \input{hyperboloid_object.tex} \def\Fleche{ 2 setlinecap newpath -5 2 moveto -5 4 lineto 4 4 lineto 5 3 lineto 4 2 lineto -5 2 lineto closepath } \def\Rectangle(#1,#2)(#3,#4){ newpath #1 #2 moveto #3 #2 lineto #3 #4 lineto #1 #4 lineto closepath } \def\cercle(#1,#2)#3{% newpath #1 #2 #3 0 360 arc closepath } \def\ARC(#1,#2)#3#4#5{% newpath #1 #2 #3 #4 #5 arc } \def\ARCN(#1,#2)#3#4#5{% newpath #1 #2 #3 #4 #5 arcn } \def\sinus{% newpath -10 0 moveto /T 360 def % une période 0 1 10 T mul { % representation de 10 périodes /t exch def /x t 10 mul 5 div 360 div def % sur 10 divisions x 10 sub t sin 2 mul lineto} for }% \def\contourCarrefour{ 1 -20 moveto 1 -2.82843 lineto 0 0 3 -70.5288 -19.4712 arc 20 -1 lineto 20 1 moveto 2.82843 1 lineto 0 0 3 19.4712 70.5288 arc 1 20 lineto -1 20 moveto -1 2.82843 lineto 0 0 3 109.4721 160.529 arc -20 1 lineto -20 -1 moveto -2.82843 -1 lineto 0 0 3 199.4721 -109.4721 arc -1 -20 lineto } \def\routes{ 1 -20 moveto 1 -2.82843 lineto 0 0 3 -70.5288 -19.4712 arc 20 -1 lineto 20 1 lineto 2.82843 1 lineto 0 0 3 19.4712 70.5288 arc 1 20 lineto -1 20 lineto -1 2.82843 lineto 0 0 3 109.4721 160.529 arc -20 1 lineto -20 -1 lineto -2.82843 -1 lineto 0 0 3 199.4721 -109.4721 arc -1 -20 lineto } \def\ligneblanche{ 0 -20 moveto 0 20 lineto -20 0 moveto 20 0 lineto 1 setgray } \def\directionL{% 0 -0.5 moveto 3 -0.5 lineto 3.5 0 lineto 3 0.5 lineto 0 0.5 lineto closepath} \def\directionA{% 0 -0.5 moveto -3 -0.5 lineto -3.5 0 lineto -3 0.5 lineto 0 0.5 lineto closepath} \def\Texte{panneau à afficher} \def\limitation(#1,#2,#3)#4#5{% \psset{normale=#4} \planThreeDput[doubleline=true,doublecolor=white](#1,#2,#3){0 0 moveto 0 -2 lineto} \planThreeDput[linecolor=white,linewidth=0.1,fillstyle=solid,fillcolor=red](#1,#2,#3){\cercle(0,0){0.5}} \planThreeDput[linewidth=0.03](#1,#2,#3){\cercle(0,0){0.525}} \textThreeDput[linecolor=white,fillstyle=solid,fillcolor=white,fontscale=0.5](#1,#2,#3){#5}} \title{Essai de représentation en perspective conique d'un texte ou d'une figure géométrique} \author{\small Documentation révisée le 27 août 2\,006, package version 0.4} \date{27 août 2\,006} \newcommand\grise[2]{\psframebox[fillstyle=solid,fillcolor=gray!#2,linestyle=none,framesep=0]{#1}} \psset{hatchwidth=0.02} \newpsstyle{GradWhiteYellow}{fillstyle=gradient,% gradbegin=yellow,gradend=yellow!20,linecolor=yellow!50,linewidth=0.01}% \definecolor{marrongris}{rgb}{.7 .6 .5} \begin{document} \maketitle \begin{center} \begin{pspicture*}(-9,-6)(6,4) \psset{THETA=35,PHI=15,Dobs=40,Decran=20,normale=90 0} \planThreeDput[fillstyle=solid,fillcolor=marrongris]{\Rectangle(-20,-20)(20,20)} \planThreeDput[fontscale=0.5,gridcolor=white,gridwidth=0.02,normale=90 -90]{\Grille(-20,-20)(20,20)} \planThreeDput{\Rectangle(-20,-20)(20,20)} \planThreeDput[fillstyle=solid,fillcolor=blue!20,linestyle=none]{\routes} \planThreeDput[linecolor=gray!90,linewidth=0.1]{\contourCarrefour} \planThreeDput[linecolor=white,linewidth=0.05,linestyle=dashed]{\ligneblanche} \planThreeDput[linecolor=blue,fillstyle=solid,fillcolor=green]{\cercle(0,0){2}} \planThreeDput[normale=0 0,doubleline=true,doublecolor=white](12,1,2){0 0 moveto 0 -2 lineto} % \limitation(12,1,2){0\space 0}{50} \limitation(18,1,2){0\space 0}{90} \limitation(-16,1,2){0\space 0}{90} \limitation(-1,-16,2){0\space 90}{90} \limitation(-1,10,2){0\space 90}{90} % \planThreeDput[normale=0 0,doubleline=true,doublecolor=white](-1,3.5,2){0 0 moveto 0 -2 lineto} \planThreeDput[doublecolor=white,doubleline=true,fillstyle=solid,fillcolor=gray!20,normale=0 0](-1,2,2){\directionL} \textThreeDput[linecolor=blue,fillstyle=solid,fillcolor=blue!80,normale=0 0,fontscale=0.6,PSfont=Helvetica](-1,3.5,2){LIMOGES} % \planThreeDput[normale=0 0,doubleline=true,doublecolor=white](-1,-3.5,2){0 0 moveto 0 -2 lineto} \planThreeDput[doublecolor=white,doubleline=true,fillstyle=solid,fillcolor=gray!20,normale=0 0](-1,-2,2){\directionA} \textThreeDput[linecolor=blue,fillstyle=solid,fillcolor=blue!80,normale=0 0,fontscale=0.5,PSfont=Helvetica](-1,-3.5,2){TOULOUSE} % \planThreeDput[normale=0 90,doubleline=true,doublecolor=white](3.5,-1,2){0 0 moveto 0 -2 lineto} \planThreeDput[doublecolor=white,doubleline=true,fillstyle=solid,fillcolor=gray!20,normale=0 90](2,-1,2){\directionA} \textThreeDput[linecolor=blue,linewidth=0,fillstyle=solid,fillcolor=blue!80,normale=0 90,fontscale=0.6,PSfont=Helvetica](3.7,-1,2){Angoulème} % \planThreeDput[normale=0 90,doubleline=true,doublecolor=white](-3.5,-1,2){0 0 moveto 0 -2 lineto} \planThreeDput[doublecolor=white,doubleline=true,fillstyle=solid,fillcolor=gray!20,normale=0 90](-2,-1,2){\directionL} \textThreeDput[linecolor=blue,linewidth=0,fillstyle=solid,fillcolor=blue!80,normale=0 90,fontscale=0.6,PSfont=Helvetica](-3.7,-1,2){POITIERS} % %\psSphere[style=GradWhiteYellow,linecolor=black](0,0,1.5){1.5} \psIcosahedronH[RotZ=10,radius=2](0,0,1.8) % \planThreeDput[fillstyle=solid,fillcolor=gray,normale=90 45](8,8,0){\Rectangle(-3,-1)(3,0.707)} \planThreeDput[fillstyle=solid,fillcolor=white,normale=45 45](8,8,1){\Rectangle(-3,-1.414)(3,0.707)} \textThreeDput[linewidth=0.01,fillstyle=solid,fillcolor=red,normale=45 45,fontscale=1,PSfont=Helvetica,yO=-0.5](8,8,1){BIENVENUE} \psCylindre[nH=4,nF=96,interior=true,todraw=false](5,-5,0){1}{5} \psCone[fracHeight=0.5,RotX=180,nF=96,todraw=false](5,-5,6.95){2}{4} \end{pspicture*} \end{center} \begin{center} \begin{pspicture}(-8,-1)(6,2.5) \psframe(-8,-1)(6,2.5) \psset{THETA=45,PHI=40,Dobs=40,Decran=20} %\planThreeDput[fillstyle=solid,fillcolor=marrongris]{\Rectangle(-20,-20)(20,20)} %\planThreeDput[fontscale=0.5,gridcolor=white,gridwidth=0.02,normale=90 -90]{\Grille(-20,-20)(20,20)} %\planThreeDput{\Rectangle(-20,-20)(20,20)} \psCube[A=2,arete=false,d=2,hsbcolor=0.2 1](6,-6,1)\psOctahedron[radius=2,RotZ=20](3,-3,1) %\psIcosahedronH[RotZ=20,radius=2](0,0,1.5) \psSphere[style=GradWhiteYellow,linecolor=black](9,-9,2){2} \psIcosahedron[RotZ=20,radius=2](-6,6,2) \psSphereII[sepTheta=0,hsbcolor=0.1667 1,linestyle=none](-3,3,2){2} \psDodecahedron[radius=2,RotZ=10,d=2](0,0,0.7946545 2 mul) \end{pspicture} \end{center} \clearpage \tableofcontents \clearpage \section{Présentation} \texttt{pst-3D} est un outil remarquable pour la représentation en 3D suivant la méthode de la projection parallèle. Dans ce package Timothy Van Zandt a eu l'idée très ingénieuse de construire la \texttt{matrice de transformation courante(CTM)} de \texttt{PostScript} à partir des formules de transformation permettant de représenter en projection parallèle dans une direction donnée par les coordonnées de $\mathtt{[viewpoint=p_x\ p_y\ p_z]}$ un plan défini par une normale à ce plan $\mathtt{[normal= n_x\ n_y\ n_z]}$ et un point origine appartenant à ce plan. Cette étude reprend la même idée, mais elle se propose de représenter un texte ou une figure d'un plan dans la représentation en perspective conique. \\ La source de toute la partie concernant la perspective conique est le remarquable livre de Robert Dony~:~\textsf{Graphisme scientifique sur micro-ordinateur, de la 2$^{\mathrm{e}}$ à la 3$^{\mathrm{e}}$ dimension}, publié aux éditions Masson. La mise en perspective d'un texte doit beaucoup à l'étude du fichier fichier original de P. Kleiweg~:~\url{http://www.let.rug.nl/~kleiweg/postscript/circles.ps} et des contributions apportées par Arnaud Schmittbuhl et Jean-Paul Vignault lors d'échanges sur la liste de diffusion Syracuse~: \url{http://melusine.eu.org/cgi-bin/mailman/listinfo/syracuse}. \section{Formules de transformation} \begin{center} \begin{pspicture}(-7,-3)(7,6.5) \psframe(-7,-3)(7,6.5) \psset{THETA=10,PHI=20,Dobs=50,Decran=30} \planThreeDput[linecolor=cyan,fillstyle=solid,fillcolor=blue!20,normale=90 0]{\Rectangle(-10,-10)(10,10)} \planThreeDput[linecolor=gray,normale=90 0,gridcolor=gray,gridwidth=0.02,fontscale=0.5]{\Grille(-9,-9)(9,9)} \axesIIID(10,10,10)% \pnodeXYZ(0,0,0){O} \uput[l](O){O} \pnodeXYZ(0,0,10){Z} %\uput[u](Z){$z$} \uput[r](Z){\blue\Large$\overrightarrow{k}$} \pnodeSphericalCoor(10,0,0){X} %\uput[l](X){$x$} \uput[r](X){\red\Large$\overrightarrow{i}$} \pnodeSphericalCoor(10,90,0){Y} %\uput[r](Y){$y$} \uput[r](Y){\green\Large$\overrightarrow{j}$} \pnodeXYZ(10 60 sin mul neg,10 60 cos mul ,0){I} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(I) \uput[r](I){$\overrightarrow{I}$} \planThreeDput[normale=90 0,linecolor=magenta]{\ARC(0,0){4}{-90}{-30}} \planThreeDput[normale=0 330,linecolor=yellow]{\ARC(0,0){4}{0}{60}} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,10 60 sin mul){K} \pnodeXYZ(10 60 cos mul 60 cos mul,0,0){X'} \pnodeXYZ(0,10 60 cos mul 60 sin mul,0){Y'} \pnodeXYZ(0,0,10 60 sin mul){Z'} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,0){XY} \pnodeXYZ(20 60 cos mul 60 cos mul,20 60 cos mul 60 sin mul,0){XY'} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(K) \uput[r](K){$\overrightarrow{K}$} \psline(X')(XY) \psline(Y')(XY) \psline(K)(XY) \psline(K)(Z') \psline(O)(XY') \pnodeXYZ(4 30 cos mul 60 cos mul,4 30 cos mul 60 sin mul,4 30 sin mul){phi} \uput[r](phi){\yellow\Large$\varphi$} \pnodeXYZ(4 30 cos mul,4 30 sin mul,0){theta} \uput[d](theta){\magenta\Large$\theta$} \end{pspicture} \end{center} \'Etablissons les formules permettant de passer du rep\`ere ($O,\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}$) au rep\`ere ($O,\overrightarrow{i},\overrightarrow{j},\overrightarrow{k}$). $\overrightarrow{K}$ repr\'esentera la normale au plan que l'on souhaite dessiner en perspective conique. Ce vecteur $\overrightarrow{K}$ est d\'efini par la longitude $\theta$ et la latitude $\varphi$. Dans ($O,\overrightarrow{i},\overrightarrow{j},\overrightarrow{k}$) \[ \overrightarrow{K}=\left(% \begin{array}{c} \cos\varphi\cos\theta\\ \cos\varphi\sin\theta\\ \sin\varphi \end{array} \right) \] \begin{center} \begin{pspicture}(-7,-7)(7,7) \psframe[fillstyle=hlines,hatchangle=0](-7,-7)(7,7) \psset{THETA=10,PHI=90,Dobs=50,Decran=30} \planThreeDput[linecolor=cyan,fillstyle=solid,fillcolor=blue!20,normale=90 -90]{\Rectangle(-10,-10)(10,10)} \axesIIID(10,10,10)% \planThreeDput[linecolor=gray,normale=90 -90,gridcolor=gray,gridwidth=0.02,fontscale=0.5]{\Grille(-9,-9)(9,9)} \pnodeXYZ(0,0,0){O} \uput[l](O){O} \pnodeXYZ(0,0,10){Z} %\uput[u](Z){$z$} \pnodeSphericalCoor(10,0,0){X} %\uput[l](X){$x$} \uput[r](X){\red\Large$\overrightarrow{i}$} \pnodeSphericalCoor(10,90,0){Y} %\uput[r](Y){$y$} \uput[r](Y){\green\Large$\overrightarrow{j}$} \pnodeXYZ(10 60 sin mul neg,10 60 cos mul ,0){I} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(I) \uput[r](I){$\overrightarrow{I}$} \planThreeDput[normale=90 0,linecolor=magenta]{\ARC(0,0){4}{-90}{-30}} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,10 60 sin mul){K} \pnodeXYZ(10 60 cos mul 60 cos mul,0,0){X'} \pnodeXYZ(0,10 60 cos mul 60 sin mul,0){Y'} \pnodeXYZ(0,0,10 60 sin mul){Z'} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,0){XY} \pnodeXYZ(20 60 cos mul 60 cos mul,20 60 cos mul 60 sin mul,0){XY'} \psline(X')(XY) \psline(Y')(XY) \psline(K)(XY) \psline(K)(Z') \psline(O)(XY') \pnodeXYZ(4 30 cos mul,4 30 sin mul,0){theta} \uput[d](theta){\magenta\Large$\theta$} \end{pspicture} \end{center} Il faut ensuite choisir les deux autres vecteurs de la base ($\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}$). Je choisis de garder $\overrightarrow{I}$ dans le plan $Oxy$, orient\'e ainsi pour des raisons de coh\'erence, mais ce n'est pas sans inconvénient comme nous le verrons par la suite(voir ). Vu de dessus, dans le plan $Oxy$ : \[ \overrightarrow{I}=\left(% \begin{array}{c} -\sin\theta\\ \hphantom{-}\cos\theta\\ 0 \end{array} \right) \] Il reste à trouver $\overrightarrow{J}$ pour que la base ($\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}$) soit directe : $\overrightarrow{J}=\overrightarrow{K}\wedge\overrightarrow{I}$ \[ \overrightarrow{J}=\left(\begin{array}{c} \cos\varphi\cos\theta\\ \cos\varphi\sin\theta\\ \sin\varphi \end{array} \right) \wedge \left( \begin{array}{c} -\sin\theta\\ \hphantom{-}\cos\theta\\ 0 \end{array} \right) = \left(\begin{array}{c} -\sin\varphi\cos\theta\\ -\sin\varphi\sin\theta\\ \cos\varphi \end{array} \right) \] \begin{center} \begin{pspicture}(-7,-3)(7,6.5) \psframe[fillstyle=hlines,hatchangle=0](-7,-3)(7,6.5) \psset{THETA=10,PHI=20,Dobs=50,Decran=30} \planThreeDput[linecolor=cyan,fillstyle=solid,fillcolor=blue!20,normale=90 -90]{\Rectangle(-10,-10)(10,10)} \axesIIID(10,10,10)% \planThreeDput[linecolor=gray,normale=90 -90,gridcolor=gray,gridwidth=0.02,fontscale=0.5]{\Grille(-9,-9)(9,9)} \pnodeXYZ(0,0,0){O} \uput[l](O){O} \pnodeXYZ(0,0,10){Z} %\uput[u](Z){$z$} \uput[r](Z){\blue\Large$\overrightarrow{k}$} \pnodeSphericalCoor(10,0,0){X} %\uput[l](X){$x$} \uput[r](X){\red\Large$\overrightarrow{i}$} \pnodeSphericalCoor(10,90,0){Y} %\uput[r](Y){$y$} \uput[r](Y){\green\Large$\overrightarrow{j}$} \pnodeXYZ(10 60 sin mul neg,10 60 cos mul ,0){I} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(I) \uput[r](I){$\overrightarrow{I}$} \planThreeDput[normale=90 0,linecolor=magenta]{\ARC(0,0){4}{-90}{-30}} \planThreeDput[normale=0 330,linecolor=yellow]{\ARC(0,0){4}{0}{60}} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,10 60 sin mul){K} \pnodeXYZ(10 60 cos mul 60 cos mul,0,0){X'} \pnodeXYZ(0,10 60 cos mul 60 sin mul,0){Y'} \pnodeXYZ(0,0,10 60 sin mul){Z'} \pnodeXYZ(10 60 cos mul 60 cos mul,10 60 cos mul 60 sin mul,0){XY} \pnodeXYZ(20 60 cos mul 60 cos mul,20 60 cos mul 60 sin mul,0){XY'} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(K) \uput[r](K){$\overrightarrow{K}$} \psline(X')(XY) \psline(Y')(XY) \psline(K)(XY) \psline(K)(Z') \psline(O)(XY') \pnodeXYZ(4 30 cos mul 60 cos mul,4 30 cos mul 60 sin mul,4 30 sin mul){phi} \uput[r](phi){\yellow\Large$\varphi$} \pnodeXYZ(4 30 cos mul,4 30 sin mul,0){theta} \uput[d](theta){\magenta\Large$\theta$} \pnodeXYZ(10 60 sin mul 60 cos mul neg,10 60 sin mul 60 sin mul neg,10 60 cos mul){J} \psline[linewidth=0.05,arrowinset=0.2]{->}(O)(J) \uput[u](J){$\overrightarrow{J}$} \end{pspicture} \end{center} La matrice de transformation : \[ A=\left(% \begin{array}{ccc} -\sin\theta&-\sin\varphi\cos\theta&\cos\varphi\cos\theta\\ \hphantom{-}\cos\theta&-\sin\varphi\sin\theta&\cos\varphi\sin\theta\\ 0&\cos\varphi&\sin\varphi \end{array} \right) \] permet de d\'eterminer les coordonn\'ees ($x,y,z$) d'un point M si on conna\^it ses coordonn\'ees $(X,Y,Z)$ dans le rep\`ere ($O,\overrightarrow{I},\overrightarrow{J},\overrightarrow{K}$). \[ \left(\begin{array}{c} x\\ y\\ z \end{array} \right) =\left(% \begin{array}{ccc} -\sin\theta&-\sin\varphi\cos\theta&\cos\varphi\cos\theta\\ \hphantom{-}\cos\theta&-\sin\varphi\sin\theta&\cos\varphi\sin\theta\\ 0&\cos\varphi&\sin\varphi \end{array} \right) \left(\begin{array}{c} X\\ Y\\ Z \end{array} \right) \] \[\left\lbrace\begin{array}{cccclcl} x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta&+&Z\cos\varphi\cos\theta\\ y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta&+&Z\cos\varphi\sin\theta\\ z&=&0&+&Y\cos\varphi&+&Z\sin\varphi \end{array} \right. \] Si l'on considère un point du plan appartenant au plan $XOY$ : \[ \left\lbrace\begin{array}{ccccl} x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta\\ y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta\\ z&=&0&+&Y\cos\varphi \end{array} \right. \] Et si maintenant, ce rep\`ere $OXYZ$ subit une translation en un point $O'(x_{O'},y_{O'},z_{O'})$ \[ \left\lbrace\begin{array}{cccclcl} x&=&-X\sin\theta&-&Y\sin\varphi\cos\theta&+&x_{O'}\\ y&=&\hphantom{-}X\cos\theta&-&Y\sin\varphi\sin\theta&+&y_{O'}\\ z&=&0&+&Y\cos\varphi&+&z_{O'} \end{array} \right. \] \begin{center} \begin{pspicture}(-7,-3)(7,6.5) \psframe[fillstyle=hlines,hatchangle=0](-7,-3)(7,6.5) \psset{THETA=10,PHI=20,Dobs=50,Decran=30} \planThreeDput[linecolor=cyan,fillstyle=solid,fillcolor=blue!20,normale=90 -90]{\Rectangle(-10,-10)(10,10)} \axesIIID(10,10,10)% \planThreeDput[linecolor=gray,normale=90 -90,gridcolor=gray,gridwidth=0.02,fontscale=0.5]{\Grille(-9,-9)(9,9)} \pnodeXYZ(0,0,0){O} \uput[l](O){$O$} \pnodeXYZ(0,0,10){z} %\uput[u](z){$z$} \uput[r](z){\blue\Large$\overrightarrow{k}$} \pnodeSphericalCoor(10,0,0){x} %\uput[l](x){$x$} \uput[r](x){\red\Large$\overrightarrow{i}$} \pnodeSphericalCoor(10,90,0){y} %\uput[r](y){$y$} \uput[r](y){\green\Large$\overrightarrow{j}$} \pnodeXYZ(2,2,4){O'} \psdot(O') \uput[l](O'){$O'$} \NodeIIItoIID[normale=60 60,origine=2 2 4 ](7,0){X}% \uput[ul](X){\red$X$} \psline[linecolor=red,linewidth=0.05,arrowinset=0.2]{->}(O')(X) \NodeIIItoIID[normale=60 60,origine=2 2 4 ](0,5){Y}% \uput[ul](Y){\green$Y$} \psline[linecolor=green,linewidth=0.05,arrowinset=0.2]{->}(O')(Y) \planThreeDput[normale=60 60,gridcolor=magenta,gridwidth=0.02,fontscale=0.5](2,2,4){\Grille(-7,-5)(7,5)} \pnodeXYZ(5 60 cos mul 60 cos mul 2 add,5 60 cos mul 60 sin mul 2 add,5 60 sin mul 4 add){Z} \psline[linecolor=blue,linewidth=0.05,arrowinset=0.2]{->}(O')(Z) \uput[r](Z){\blue$Z$} \end{pspicture} \end{center} \section{Les commandes et les paramètres} \subsection{Définir un plan} Un plan est défini par sa normale $\overrightarrow{n}$ et son origine $O'$. Le vecteur unitaire normal au plan est déterminé par deux angles en degrés : \begin{itemize} \item $\theta$ : longitude \item $\varphi$ : latitude \end{itemize} Le paramètre permettant de fixer $\overrightarrow{n}$ est : \grise{$\texttt{\textbf{normale}}=\varphi\grise{\vphantom{P}\hphantom{P}}{90}\theta$}{50} Attention de bien respecter l'ordre : \texttt{latitude} \texttt{longitude} et l'espace entre les deux valeurs. La commande permettant de dessiner le plan est : \begin{verbatim} \planThreeDput[normale=60 60](2,2,4){données graphiques} \end{verbatim} Les coordonnées de l'origine $(x_O',y_O',z_O')$ de $O'$ du plan sont dans la parenthèse \verb+(2,2,4)+. Les données graphiques sont soit des codes \texttt{PostScript} soit des commandes pré-définies ou définies par l'utilisateur. Quelques commandes pré-définies existent, comme : \begin{itemize} \item \verb+\Grille(x1,y1)(x2,y2)+ qui est une version simplifiée de la commande \verb+psgrid+ de \verb+PSTricks+ car elle ne permet pas les sous-divisions : il est évidemment possible de fabriquer une commande plus complète... Par contre elle prend les mêmes paramètres pour l'épaisseur du trait et la couleur : \begin{itemize} \item \verb+gridwidth+ \item \verb+gridcolor+ \end{itemize} de plus on peut modifier la position des labels avec les options : \begin{itemize} \item \verb+xlabelsep=-0.5+ \item \verb+ylabelsep=-0.5+ \end{itemize} Ce sont des valeurs en cm, celles qui sont indiquées sont les valeurs par défaut. Pour supprimer les labels il faut ajouter l'option \verb+fontscale=0+. \item \verb+\Rectangle(x1,y1)(x2,y2)+ identique à \verb+\psframe+, avec les mêmes paramètres sauf \verb+framearc+ et \verb+framesep+ \item \verb+\cercle(x,y){R}+ identique à \verb+\pscircle+ avec les mêmes options. \item \verb+\ARC(x,y){R}{angle_début}{angle_fin}+ identique à \verb+\psarc+ avec les mêmes options. \item \verb+\ARCN(x,y){R}{angle_début}{angle_fin}+ identique à \verb+\psarcn+ avec les mêmes options. \item \verb+\PslineIIID(x1,y1)(x2,y2)(x3,y3)...(xn,yn)+ identique à \verb+\psline+ avec quelques options en moins. \end{itemize} L'argument de la commande peut-être un code \texttt{PostScript} quelconque, comme par exemple celui-ci qui dessine un rectangle aux coins arrondis par un arc de cercle de rayon 1 cm : \begin{center} \begin{pspicture}(-4,-3.5)(4,3) \psframe[fillstyle=hlines,hatchangle=0](-4,-3)(4,2.5) \psset{THETA=10,PHI=20,Dobs=30,Decran=20,normale=60 60} \planThreeDput[linewidth=0.2,fillstyle=solid,fillcolor=green!50]{% -0.5 3.5 moveto -2.5 3.5 -2.5 0 1 arcto -2.5 -3.5 -0.5 -3.5 1 arcto 2.5 -3.5 2.5 0 1 arcto 2.5 3.5 -0.5 3.5 1 arcto 16 { pop } repeat closepath} \planThreeDput[fontscale=0.5]{\Grille(-5,-5)(5,5)} \end{pspicture} \end{center} \begin{verbatim} \psset{THETA=10,PHI=30,Dobs=50,Decran=30,normale=60 60} \planThreeDput[linewidth=0.2,fillstyle=solid,fillcolor=green!50]{% -0.5 3.5 moveto -2.5 3.5 -2.5 0 1 arcto -2.5 -3.5 -0.5 -3.5 1 arcto 2.5 -3.5 2.5 0 1 arcto 2.5 3.5 -0.5 3.5 1 arcto 16 { pop } repeat closepath} \planThreeDput{\Grille(-5,-5)(5,5)} \end{verbatim} Le code suivant permet de dessiner une sinusoïde : \begin{verbatim} \begin{pspicture}(-6,-7)(8,9) \psframe(-6,-6)(8,7) \psset{THETA=30,PHI=50,Dobs=20,Decran=15,normale=90 0} \planThreeDput[gridwidth=0.05,gridcolor=gray]{\Grille(-10,-5)(10,5)} \planThreeDput[linewidth=0.1,linecolor=red]{\sinus} \axesIIID(10,10,10)% \end{pspicture} \end{verbatim} avec comme argument la commande \verb+\sinus+ : \begin{verbatim} \def\sinus{% newpath -10 0 moveto /T 360 def % une période 0 1 10 T mul { % representation de 10 périodes /t exch def /x t 10 mul 5 div 360 div def % sur 10 divisions x 10 sub t sin 2 mul lineto} for }% \end{verbatim} \begin{center} \psset{unit=0.7} \begin{pspicture}(-6,-7)(8,9) \psframe[fillstyle=solid,fillcolor=blue!20](-7,-6)(8,7) \psset{THETA=30,PHI=40,Dobs=60,Decran=45,normale=90 0} \psclip{\psframe(-7,-6)(8,7)} \planThreeDput[normale=0 0,fontscale=0.5](-5,0,0){\Grille(-30,-60)(30,20)}% \endpsclip% \planThreeDput[fillstyle=solid,fillcolor=yellow!20]{\Rectangle(-10,-5)(10,5)} \planThreeDput[gridwidth=0.05,gridcolor=gray,fontscale=0.5]{\Grille(-10,-5)(10,5)} \planThreeDput{\Rectangle(-10,-5)(10,5)} \planThreeDput[linewidth=0.1,linecolor=red!50]{\sinus} \axesIIID(10,10,10)% \textThreeDput[xO=0,yO=-3.5,fillstyle=solid,fillcolor=black]{représentation d'une sinusoïde}% %\psset{A=1,d=1e6} %\psCube(4.5,9.5,0.5)\psCube(-4.5,9.5,0.5)\psCube(4.5,-9.5,0.5)\psCube(-4.5,-9.5,0.5) \end{pspicture} \end{center} Revenons aux options disponibles avec la commande \verb+\planThreeDput+ \begin{itemize} \item Le plan défini par son origine et sa normale peut subir une translation et des rotations autour des axes $Ox$, $Oy$ et $Oz$ en utilisant les paramètres : \begin{itemize} \item \verb+translation=vx vy vz+ \item \verb+RotX+, \verb+RotY+ et \verb+RotZ+ \end{itemize} Les angles sont en degrés. \item L'unité de longueur par défaut est le centimètre, mais avec la commande de \verb+PSTricks+ : \verb+unit=0.5+ on peut par exemple choisir comme unité le demi-centimètre. \end{itemize} La sinusoïde précédente avec une translation de vecteur $\overrightarrow{V}(0,5,5)$ et rotation de 150$^{\mathrm{o}}$ autour de l'axe $Oz$, avec les paramètres : \verb+\psset{translation=0 5 5,RotZ=150}+. \begin{center} \psset{unit=0.65} \begin{pspicture}(-6,-5)(10,9) \psframe[fillstyle=solid,fillcolor=blue!20](-7,-6)(10,7) \psset{THETA=30,PHI=30,Dobs=55,Decran=50,normale=90 0,fontscale=1.5} \psclip{\psframe(-7,-6)(10,7)} \planThreeDput[normale=0 0,fontscale=0.5](-5,0,0){\Grille(-30,-60)(30,20)}% \endpsclip% \planThreeDput[fillstyle=solid,fillcolor=yellow!30]{\Rectangle(-10,-5)(10,5)} \planThreeDput[gridwidth=0.05,gridcolor=gray,fontscale=0.5]{\Grille(-10,-5)(10,5)} \planThreeDput{\Rectangle(-10,-5)(10,5)} \planThreeDput[linewidth=0.1,linecolor=red!50]{\sinus} \axesIIID(10,10,10)% \textThreeDput[linewidth=0,xO=0,yO=-3.5,fillstyle=solid,fillcolor=black]{représentation d'une sinusoïde}% {\psset{translation=0 5 5,RotZ=150} \planThreeDput[fillstyle=solid,fillcolor=yellow!20]{\Rectangle(-10,-5)(10,4)} \planThreeDput[gridwidth=0.05,gridcolor=gray,fontscale=0.5]{\Grille(-10,-5)(10,4)} \planThreeDput{\Rectangle(-10,-5)(10,4)} \planThreeDput[linewidth=0.1,linecolor=red!50]{\sinus} \textThreeDput[linewidth=0,xO=0,yO=-3.5,fillstyle=solid,fillcolor=black]{représentation d'une sinusoïde}}% \planThreeDput[linewidth=0.1,linecolor=blue,normale=0 90](0,0,0){0 5 moveto 0 9.8 lineto} \psset{RotZ=150,A=1} \end{pspicture} \end{center} \begin{minipage}{0.2\textwidth} Un autre exemple, toujours avec la même sinusoïde ayant subit une translation de vecteur $\overrightarrow{V}(2,3,-2)$ et des rotations de 30$^{\mathrm{o}}$ autour de l'axe $Oz$ et de 60$^{\mathrm{o}}$ autour de l'axe $Ox$ avec les paramètres : \verb+\psset{translation=2 3 -2,RotZ=30,RotX=60}+. \end{minipage} \hfill \begin{minipage}{0.6\textwidth} \begin{center} \psset{unit=0.5} % avec translation et rotations du plan \begin{pspicture}(-5,-9)(8,10) \psframe(-3,-7)(8,7) \psset{THETA=30,PHI=50,Dobs=20,Decran=15,normale=90 0,RotZ=30,RotX=60,translation=2 3 -2,fontscale=1.5} \planThreeDput[fillstyle=solid,fillcolor=yellow!20]{\Rectangle(-10,-5)(10,5)} \planThreeDput[fontscale=0.5]{\Grille(-10,-5)(10,5)} \planThreeDput[linewidth=0.1]{\sinus} \textThreeDput[linewidth=0,xO=0,yO=-3.5,fillstyle=solid,fillcolor=black,RotZ=30]{représentation d'une sinusoïde}% \axesIIID(10,10,10)% \end{pspicture} \end{center} \end{minipage} La commande \verb+\planThreeDput+ possède l'option \verb+visibilty+ qui par défaut est \verb+true+. Avec cette option le plan n'est dessiné que s'il est visible. Si, malgré tout, on souhaite dessiner le plan et son contenu lorsqu'il est caché il suffit de l'indiquer avec \verb+visibilty=false+. Un exemple d'utilisation de \verb+\PslineIIID+ et de l'instruction \verb+PostScript+ \verb+curveto+ utilisée directement : \begin{verbatim} \PslineIIID[linecolor=red](-10,-10)(-5,10)(5,-10)(10,10) \planThreeDput[linecolor=blue]{-10 -10 moveto -5 10 5 -10 10 10 curveto} \end{verbatim} \begin{center} \psset{unit=0.8} \begin{pspicture}(-6,-5)(6,4) \psframe(-6,-5)(6,4) \psset{THETA=30,PHI=60,Dobs=50,Decran=20,normale=90 0} \planThreeDput[linecolor=cyan,fillstyle=solid,fillcolor=blue!20]{\Rectangle(-10,-10)(10,10)} \planThreeDput[fontscale=0.5]{\Grille(-10,-10)(10,10)} \PslineIIID[linecolor=red,linewidth=0.1](-10,-10)(-5,10)(5,-10)(10,10) \planThreeDput[linecolor=blue,linewidth=0.1]{-10 -10 moveto -5 10 5 -10 10 10 curveto} \psset{fillstyle=solid,fillcolor=black} \planThreeDput{\cercle(-10,-10){0.2}} \planThreeDput{\cercle(-5,10){0.2}} \planThreeDput{\cercle(5,-10){0.2}} \planThreeDput{\cercle(10,10){0.2}} \end{pspicture} \end{center} \subsection{Écrire sur un plan} \begin{center} \begin{pspicture}(-7,-5)(6,8.5) \psframe[fillstyle=hlines,hatchangle=0](-7,-5)(6,8.5) \psset{THETA=120,PHI=40,Dobs=20,Decran=17,normale=0 90} \planThreeDput[fillstyle=solid](0,-5,0){\Rectangle(-5,-5)(5,5)} \planThreeDput[fontscale=0.5](0,-5,0){\Grille(-5,-5)(5,5)} \planThreeDput[linewidth=0.1,linecolor=magenta,RotY=30](0,-5,0){\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red,RotY=30](0,-5,0){\Texte} \psset{normale=0 180} \planThreeDput[fillstyle=solid,fillcolor=marrongris](5,0,0){\Rectangle(-5,-5)(5,5)} \planThreeDput[fontscale=0.5,gridcolor=white](5,0,0){\Grille(-5,-5)(5,5)} \planThreeDput[linewidth=0.1,linecolor=yellow](5,0,0){\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10](5,0,0){\Texte} \psset{normale=90 -90} \planThreeDput[fillstyle=solid,fillcolor=blue!20]{\Rectangle(-5,-5)(5,5)} \planThreeDput[fontscale=0.5]{\Grille(-5,-5)(5,5)} \planThreeDput[fillstyle=solid,fillcolor=red]{\cercle(2,2){1.3}} \planThreeDput{\cercle(2,2){1.5}} \psset{normale=90 -30} \planThreeDput[linewidth=0.1,linecolor=red,fillstyle=solid,fillcolor=red!10]{\Fleche} \textThreeDput[linewidth=0,xO=0,yO=3,linecolor=red,fillstyle=solid,fillcolor=red,PSfont=Optima]{PSTricks facile} \psset{normale=90 90} \planThreeDput[linewidth=0.1,linecolor=red,fillstyle=solid,fillcolor=red!10]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=blue,fillstyle=solid,fillcolor=red!50,% PSfont=NewBaskerville-BoldItalic,fontscale=1.3]{Tourner à droite}% % PSfont=Goudy,fontscale=1]{Tourner à droite}% % PSfont=Garamond-Bold,fontscale=1]{Tourner à droite}% % PSfont=Bookman-Light,fontscale=1]{Tourner à droite}% % PSfont=Palatino-Italic,fontscale=1.2](0,0,0){Tourner à droite}% % PSfont=Helvetica,fontscale=1.2](0,0,0){Tourner à droite}% % PSfont=ZapfChancery-MediumItalic,fontscale=1.4](0,0,0){Tourner à droite}% % PSfont=Palatino-Roman,fontscale=1.2](0,0,0){Tourner à droite}% % PSfont=AvantGarde-Book,fontscale=1.2](0,0,0){Tourner à droite}% % PSfont=QXCMRoman-Regular,fontscale=1.2](0,0,0){Tourner à droite}% \axesIIID(10,10,10)% \end{pspicture} \end{center} La commande \verb+\textThreeDput[options](x,y){texte à afficher}+ comprend les mêmes options que \verb+\planThreeDput+ et deux paramètres [xO=0,yO=3 permettant de positionner le texte dans le plan. Le texte est centré sur $(x_0,y_0)$, le choix et la taille de la fonte sont fixées par les paramètres : \begin{itemize} \item \verb+[fontscale=1]+ en cm (1 cm valeur par défaut ; \item \verb+[PSfont=Times-Roman]+, fonte par défaut. \end{itemize} La commande suivante : \begin{verbatim} \textThreeDput[xO=0,yO=3,linewidth=0.025,linecolor=blue, fillstyle=solid,fillcolor=red!50,% PSfont=NewBaskerville-BoldItalic,fontscale=1.3]{Tourner à droite}% \end{verbatim} dessine le texte en NewBaskerville-BoldItalic, d'une taille de 1,3 cm, entré autour du point $(x=0,y=3)$, les caractères sont tracés en bleu et remplis avec une nuance de rouge. L'origine du plan et sa normale ayant été définies précédemment. Pour améliorer la lisibilité d'un texte en petits caractères placer en option : \begin{itemize} \item \verb+[linewidth=0,fillstyle=solid,fillcolor=couleur]+ \end{itemize} on ne dessine pas ainsi le contour du caractère. \subsection{Placer des objets pré-définis} \subsubsection{Solides qui sont pour l'instant prêts à l'emploi :} Les solides pré-définis s'appellent en préambule par : \begin{verbatim} \input{cube_object.tex} \input{icosahedral_object.tex} \input{sphere_object.tex} \input{icosahedral_with_holes.tex} \input{octahedral_object.tex} \input{sphereII_object.tex} \input{dodecahedral_object.tex} \input{tetrahedral_object.tex} \input{cylindre_object.tex} \input{cone_object.tex} \input{sphericalcap_object.tex} \input{prisme_object.tex} \input{cylindrical_portion_object.tex} \input{hyperboloid_object.tex} \end{verbatim} On ne déclarera que les solides dont on a besoin. \begin{center} \begin{longtable}{|l|l|c|} \hline % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ... tétraèdre & \verb+\psTetrahedron[options](xC,yC,zC)+ & \pspicture(-1,-0.5)(1,1)\psTetrahedron[radius=0.5,RotZ=50,d=5](0,0,0)\endpspicture \\ cube & \verb+\psCube[options](xC,yC,zC)+ & % \pspicture(-1,-1)(1,1)\psCube[A=1](0,0,0)\endpspicture \\ octaèdre & \verb+\psOctahedron[options](xC,yC,zC)+ &% \pspicture(-1,-1)(1,1)\psOctahedron[radius=1,RotZ=20](0,0,0)\endpspicture \\ dodécaèdre & \verb+\psDodecahedron[options](xC,yC,zC)+ & % \pspicture(-1,-1)(1,1)\psDodecahedron[radius=1,RotZ=20](0,0,0)\endpspicture \\ icosaèdre & \verb+\psIcosahedron[options](xC,yC,zC)+ & % \pspicture(-1,-1)(1,1)\psIcosahedron[radius=1](0,0,0)\endpspicture \\ icosaèdre troué& \verb+\psIcosahedronH[options](xC,yC,zC)+ & % \pspicture(-1,-1)(1,1)\psIcosahedronH[radius=1](0,0,0)\endpspicture \\ sphère (modèle 1) & \verb+\psSphere[options](xC,yC,zC){Rayon}+ & % \pspicture(-1,-1)(1,1)\psSphere[style=GradWhiteYellow,% linewidth=0.01,linecolor=black](0,0,0){1}\endpspicture \\ sphère (modèle 2) & \verb+\psSphereII[options](xC,yC,zC){Rayon}+ & % \pspicture(-1,-1)(1,1)\psSphereII[linestyle=none](0,0,0){1}\endpspicture \\ calotte sphérique & \verb+\psCapSphere[options](xC,yC,zC){Rayon}+ & % \pspicture(-1,-1)(1,1)\psCapSphere[startlatitude=20](0,0,-0.5){1}\endpspicture \\ cylindre & \verb+\psCylindre[options](xC,yC,zC){Rayon}{Hauteur}+ & % \pspicture(-1,-1)(1,1)\psCylindre[nF=24,nH=5,RotZ=5,RotY=-20,interior=true,todraw=false,thetaLight=30](0,0,-1){0.5}{2}\endpspicture \\ cône & \verb+\psCone[options](xC,yC,zC){Rayon}{Hauteur}+ & % \pspicture(-1,-1)(1,1)\psCone[fracHeight=0.5,interior=true](0,0,-1){1}{3}\endpspicture \\ prisme & \verb+\psPrisme[options](xC,yC,zC){Rayon}{Hauteur}+ & % \pspicture(-1,-1)(1,1)\psPrisme[nF=10,hsbcolor=0.9 0.2,RotX=-10,RotZ=20](0,0,-1){0.5}{2}\endpspicture \\ portion de cylindre & \verb+\psCylindricalPortion[options](xC,yC,zC){Rayon}{Hauteur}+ & % \pspicture(-1,-1)(1,1)\psCylindricalPortion[nF=20,nH=5,interior=false,RotZ=120](0,0,-1){0.5}{2}\endpspicture \\ \hline \end{longtable} \end{center} \subsubsection{Les options} Tétraèdre, cube(parallélépipède), octaèdre, dodécaèdre et icosaèdre sont tronqués grâce au paramètre \texttt{d} qui représente la fraction $\frac{1}{d}$ de l'arête coupée à partir du sommet, \textbf{cette option ne fonctionne pas correctement avec un parallélépipède quelconque}. Avec une grande valeur, par exemple $d=1e6$, on retrouve les solides classiques. Les options de rotations \verb+RotX+, \verb+RotY+ et \verb+RotZ+ autour des axes restent valables pour tous les solides. \begin{itemize} \item arêtes du parallélépipède \verb+A=2,B=A,C=A+ (les valeurs sont égales pour le cube)~; \item rayon de la sphère circonscrite \verb+radius=3+ pour tétraèdre, octaèdre, dodécaèdre et icosaèdre~; \item ne pas dessiner les arêtes avec \verb+arete=false+ ; \item les couleurs des faces sont fixées avec \texttt{hsbcolor} ; \item pour le modèle de la sphère 2, on peut décaler le tracé des arcs de méridiens avec \verb+sepTheta=5+, le pigment de la sphère avec \verb+hsbcolor=0.1667 1+ qui sont les valeurs de la teinte et de la saturation dans le système de couleurs \texttt{HSB}, et la position de la source de lumière blanche avec : \verb+thetaLight=70,phiLight=60,dLight=10+ en coordonnées sphériques. \item Pour le cône, le paramètre \texttt{fracHeight=0.5} permet de choisir la fraction de hauteur à représenter ($\texttt{fracHeight}<1$). \item Cylindre et cône ont deux paramètres de maillage \texttt{nF=20,nH=5} : \begin{itemize} \item \texttt{nF=20} : nombre de facettes autour de l'axe ; \item \texttt{nH=5} : nombre de facettes en hauteur. \item L'intérieur du cylindre ou du cone est visible avec l'option \texttt{interior=true}. \item La couleur de l'intérieur se modifie avec \texttt{colorbase=0.8 0.5 0.5}. \item Le maillage ne se dessine pas avec l'option \texttt{todraw=false}. \end{itemize} \item Pour la calotte sphérique, l'angle de départ en latitude du maillage est fixé par l'option : \texttt{startlatitude=45} qui vaut $0$ par défaut. \item Le prisme possède les mêmes paramètres de couleur que \verb+\psSphereII+. Le nombre de faces est paramétrable avec l'option \texttt{nF=8}. \item La portion de cylindre est définie comme le cylindre avec deux options : l'angle de début \texttt{anglebegin} et l'angle de fin \texttt{angleend} qui définissent la base du cylindre, avec \texttt{anglebegin=0} et \texttt{angleend=360} on retrouve le cylindre complet. \end{itemize} \begin{center} \begin{pspicture}(-5,-6)(6,6) \psframe[fillstyle=hlines,hatchangle=0](-5,-6)(6,5) \psset{THETA=30,PHI=30,Dobs=20,Decran=7.5} \psset{thetaLight=70,phiLight=30,dLight=10000}% \planThreeDput[fillstyle=solid,fillcolor=marrongris,normale=90 -90]{\Rectangle(0,0)(10,10)}% \axesIIID(10,10,10)% \planThreeDput[gridcolor=white,normale=90 -90,fontscale=0.5]{\Grille(0,0)(10,10)} \psCube(1,1,1)\psCube[RotZ=135,RotX=90,d=1e6](5,5,1)\psCube(1,9,1)\psCube(9,1,1)\psCube[RotZ=45](9,9,1) \psSphere[style=GradWhiteYellow](1,9,3){1}\psSphere[style=GradWhiteYellow](9,1,3){1} \psSphere[style=GradWhiteYellow](9,9,3){1}\psSphere[style=GradWhiteYellow](1,1,3){1} \end{pspicture} \end{center} L'arête du cube est par défaut \verb+A=2+ et le centre des cubes est placé à l'altitude $z=1$, ils reposent donc tous sur le plan horizontal $z=0$ \begin{verbatim} \psCube(1,1,1)\psCube[RotZ=45](9,9,1)\psCube(1,9,1)\psCube(9,1,1) \psCube[RotZ=135,RotX=90,d=1e6](5,5,1) \psSphere[style=GradWhiteYellow](1,9,3){1}\psSphere[style=GradWhiteYellow](9,1,3){1} \psSphere[style=GradWhiteYellow](9,9,3){1}\psSphere[style=GradWhiteYellow](1,1,3){1} \end{verbatim} %\begin{pspicture}(-8,-7)(5,7) %\psframe[fillstyle=hlines,hatchangle=0](-8,-7)(8,6) %\psset{THETA=30,PHI=30,Dobs=30,Decran=20} %\planThreeDput[fillstyle=solid,fillcolor=green!30,normale=90 -90]{\Rectangle(-10,10)(10,-10)}% %\planThreeDput[normale=90 -90,fontscale=0.5]{\Grille(-10,10)(10,-10)} %\axesIIID(10,10,10)% %\psIcosahedron[d=3,RotZ=30](3,-3,2.5)\psCube[RotZ=135,RotX=90,d=1e6](5,5,1)\psCube(-5,3,1)% %\psIcosahedron[d=1e6,RotZ=30,radius=1](5,5,3) %\end{pspicture} %\begin{verbatim} %\psIcosahedron[d=3,RotZ=30](3,-3,2.5) %\psCube[RotZ=135,RotX=90,d=1e6](5,5,1)\psCube(-5,3,1)% %\end{verbatim} Il existe un modèle de cube avec projection de son ombre, voir les fichiers : \begin{itemize} \item \texttt{test\_ombre\_cube.tex} et les fichiers associés : \item \texttt{cube\_object\_shadow.tex} ; \item \texttt{cube\_shadow.pro} ; \end{itemize} Dans ce cas, convertissez le fichier \texttt{ps} au format \texttt{pdf} pour activer la transparence. \subsection{Placer un point sur un plan avec \texttt{$\backslash$NodeIIItoIID}} \begin{verbatim} \psset{THETA=-60,PHI=70,Dobs=20,Decran=10,normale=90 -90 }% \planThreeDput[linewidth=0.05,linecolor=gray]{\Grille(-10,-5)(10,5)}% \NodeIIItoIID[origine=0 0 0 ](10,5){A}% \psdot[dotsize=5pt](A)% \uput[r](A){$A$} \planThreeDput[fillstyle=solid,fillcolor=red]{\cercle(3,5){0.1}} \axesIIID(10,10,10)% \end{verbatim} \verb+\NodeIIItoIID[origine=x0 y0 z0,normale=phi theta](x,y){M}+ place le n\oe{}ud $M$ dans le plan dont l'origine est $O'(x_0,y_0,z_0)$ et la normale $\overrightarrow{n}(\phi\ \theta)$, ce sont les mêmes options que pour \verb+\planThreeDput+. On pourra donc aussi translater ce plan et le faire tourner. Par la suite les n\oe{}uds ainsi définis s'utilisent avec les commandes classiques de \verb+PSTricks+ et les propriétés du package \verb+pst-node+. \begin{verbatim} \begin{pspicture}(-5,-5)(5,3) \psframe(-5,-5)(5,3) \psset{THETA=-60,PHI=70,Dobs=20,Decran=10,normale=90 -90 }% \planThreeDput[linecolor=gray,fontscale=0.5]{\Grille(-10,-5)(10,5)}% \NodeIIItoIID[origine=0 0 0 ](10,5){A}% \psdot[dotsize=5pt](A)% \uput[r](A){$A$} \planThreeDput[fillstyle=solid,fillcolor=red]{\cercle(3,5){0.1}} \axesIIID(10,10,10)% \end{pspicture} \end{verbatim} \begin{center} \begin{pspicture}(-5,-5)(5,3) \psframe(-5,-5)(5,3) \psset{THETA=-60,PHI=70,Dobs=20,Decran=10,normale=90 -90 }% \planThreeDput[linecolor=gray,fontscale=0.5]{\Grille(-10,-5)(10,5)}% \NodeIIItoIID[origine=0 0 0 ](10,5){A}% \psdot[dotsize=5pt](A)% \uput[r](A){$A$} \planThreeDput[fillstyle=solid,fillcolor=red]{\cercle(3,5){0.1}} \axesIIID(10,10,10)% \end{pspicture} \end{center} \subsection{Placer un point dans l'espace avec \texttt{$\backslash$pnodeXYZ(x,y,z)\{A\}} ou \newline \texttt{$\backslash$pnodeSphericalCoor(R,$\theta,\phi$)\{X\}}} Les coordonnées sont définies dans le repère absolu : donc ces points seront invariants par translation ou rotation : les options \verb+translation+, \verb+RotX+, \verb+RotY+ et \verb+RotZ+ sont sans effet. Par la suite les n\oe{}uds ainsi définis s'utilisent avec les commandes classiques de \verb+PSTricks+ et les propriétés du package \verb+pst-node+. \subsection{Le repère dans le plan choisi} Placer $\overrightarrow{I}$ dans la plan horizontal avec l'orientation choisie permet de retrouver les plans $Oxy$, $Oyz$ et $Ozx$ à condition, bien sûr de prendre la normale correcte. En couleurs c'est le repère de référence ($\red Ox,\green Oy,\blue Oz$). Dans tous les cas, on peut s'aider de la commande \verb+\Grille(-7,-5)(7,5)+, avec des valeurs différentes pour savoir comment se trouvent orientés les axes du plan $OX$ et $OY$. \subsubsection{Le repère dans le plan $Oxy$} Le vecteur normal a pour coordonnées : \verb+normale=90 -90+ \begin{verbatim} \psset{THETA=-90,PHI=80,Dobs=20,Decran=20,normale=90 -90} \planThreeDput[linewidth=0.05,linecolor=green]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,% fillcolor=red!10]{texte sur plan // XY} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{verbatim} \begin{center} \begin{pspicture}(-7,-5)(7,10) \psset{THETA=-90,PHI=80,Dobs=20,Decran=20,normale=90 -90} \planThreeDput[linewidth=0.05,linecolor=green,fontscale=0.5]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10]{texte sur plan // XY} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{pspicture} \end{center} \subsubsection{Le repère dans le plan $Oyz$} Le vecteur normal a pour coordonnées : \verb+normale=0 0+ \begin{verbatim} \psset{THETA=5,PHI=10,Dobs=20,Decran=20,normale=0 0} \planThreeDput[linewidth=0.05,linecolor=green]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid, fillcolor=red!10](0,0,0){texte sur plan // YZ} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{verbatim} \begin{pspicture}(-7,-5)(7,10) \psset{THETA=5,PHI=10,Dobs=20,Decran=20,normale=0 0} \planThreeDput[linewidth=0.05,linecolor=green,fontscale=0.5]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10]{texte sur plan // YZ} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{pspicture} \subsubsection{Le repère dans le plan $Ozx$} Le vecteur normal a pour coordonnées : \verb+normale=0 90+ \begin{verbatim} \psset{THETA=80,PHI=20,Dobs=20,Decran=20,normale=0 90} \planThreeDput[linewidth=0.05,linecolor=green]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,% fillcolor=red!10](0,0,0){texte sur plan // XZ} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{verbatim} \begin{pspicture}(-7,-5)(7,10) \psset{THETA=80,PHI=20,Dobs=20,Decran=20,normale=0 90} \planThreeDput[linewidth=0.05,linecolor=green,fontscale=0.5,fontscale=0.5]{\Grille(-7,-5)(7,5)} \planThreeDput[linewidth=0.1,linecolor=magenta]{\Fleche} \textThreeDput[xO=0,yO=3,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10]{texte sur plan // XZ} \axesIIID(10,10,10)% \NodeIIItoIID[origine=0 0 0 ](0,0){O}% \psdot[dotsize=5pt](O)% \uput[r](O){$O$} \end{pspicture} \newpage {\scriptsize \begin{verbatim} \psset{THETA=60,PHI=35,Dobs=30,Decran=20} {\psset{fontscale=1.5,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10} \planThreeDput[normale=0 0]{\Grille(-10,-8)(10,8)} \planThreeDput[normale=0 -90]{\Grille(0,0)(10,8)} \textThreeDput[xO=-5,yO=5,normale=0 90]{Écrire sur les} \textThreeDput[linecolor=blue,xO=5,yO=5,normale=0 0]{faces d'un cube}} \axesIIID(10,10,10)% \planThreeDput[fillstyle=solid,fillcolor=green!20,normale=-90 0]{\Rectangle(0,0)(10,10)} \planThreeDput[normale=-90 0]{\Grille(0,0)(10,10)} \psCube[RotZ=-60,d=5,A=4](5,5,2) \psset{translation=5 5 2,xO=0,yO=0,RotZ=-60,fillstyle=solid,fillcolor=black} \textThreeDput[normale=0 90](0,2,0){FACE 1}% \textThreeDput[normale=90 0](0,0,2){FACE 2}% \textThreeDput[normale=0 -180](-2,0,0){FACE 3}% \NodeIIItoIID[origine=0 0 0,normale=0 0 ](10,5){A}% \psdot[dotsize=5pt](A)% \uput[r](A){$A$} \NodeIIItoIID[origine=0 0 0,,normale=90 -90 ](10,5){B}% \psdot[dotsize=5pt](B)% \uput[r](B){$B$} \end{verbatim}} \newcommand{\CUBE}{% {\psset{translation=5 5 2,xO=0,yO=0,RotZ=30,fillstyle=solid,fillcolor=black} \psCube[d=5,A=4](5,5,2) \textThreeDput[normale=0 90](0,2,0){FACE 1} \textThreeDput[normale=90 -90](0,0,2){FACE 2} \textThreeDput[normale=0 180](-2,0,0){FACE 3} \textThreeDput[normale=0 0](2,0,0){FACE 4} \textThreeDput[normale=-90 0](0,0,-2){FACE 5} \textThreeDput[normale=0 -90](0,-2,0){FACE 6}} } \begin{pspicture}(-8,-3)(5,7) \psset{THETA=60,PHI=30,Dobs=30,Decran=20} \psset{thetaLight=70,phiLight=60,dLight=10000}% {\psset{fontscale=1.5,linewidth=0.05,linecolor=red,fillstyle=solid,fillcolor=red!10} \planThreeDput[normale=0 0,fontscale=0.5]{\Grille(-10,-8)(10,8)} \planThreeDput[normale=0 90,fontscale=0.5]{\Grille(0,-8)(-10,8)} \textThreeDput[xO=-5,yO=5,normale=0 90]{Écrire sur les} \textThreeDput[linecolor=blue,xO=5,yO=5,normale=0 0]{faces d'un cube}} \axesIIID(10,10,10)% \planThreeDput[fillstyle=solid,fillcolor=green!20,normale=90 -90]{\Rectangle(0,0)(10,10)} \planThreeDput[normale=90 -90,fontscale=0.5]{\Grille(0,0)(10,10)} \CUBE \NodeIIItoIID[origine=0 0 0,normale=0 0 ](10,5){A}% \psdot[dotsize=5pt](A)% \uput[r](A){$A$} \NodeIIItoIID[origine=0 0 0,,normale=90 -90 ](10,5){B}% \psdot[dotsize=5pt](B)% \uput[r](B){$B$} \end{pspicture} \section{Panneau double face} \newcommand\panneau{% \psset{fillstyle=solid,fillcolor=black} \planThreeDput[fillstyle=solid,fillcolor=green!30,normale=45 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)} \planThreeDput[fillstyle=solid,fillcolor=green!30,normale=45 45,fontscale=0](2 sqrt,2 sqrt,2){\Grille(-4,8 sqrt neg)(4,8 sqrt)} \planThreeDput[fillstyle=solid,fillcolor=cyan!20,normale=225 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)} \textThreeDput[fontscale=1.5,normale=45 45,xO=0,yO=1.5](2 sqrt,2 sqrt,2){PSTricks}% \textThreeDput[fontscale=1.5,normale=45 45,yO=-0.4](2 sqrt,2 sqrt,2.5){2006}% \textThreeDput[fontscale=1.5,normale=-45 225](2 sqrt,2 sqrt,2.5){LaTeX}% \textThreeDput[normale=45 45,xO=0,yO=-1.5](2 sqrt,2 sqrt,2){pst-V3D}} \subsection{Exemple 1} \begin{center} \begin{pspicture}(-8,-7)(8,6) %\psframe(-8,-7)(8,6) \psset{THETA=45,PHI=45,Dobs=30,Decran=20,arrowsize=0.3} %\axesIIID(10,10,10)% \planThreeDput[normale=90 0,linecolor=gray,fontscale=0.5](0,0,0){\Grille(-10,-8)(10,8)} \pnodeXYZ(0,0,0){O} \pnodeXYZ(0,0,10){Z} \uput[u](Z){$z$} \pnodeSphericalCoor(10,0,0){X} \uput[l](X){$x$} \pnodeSphericalCoor(10,90,0){Y} \uput[r](Y){$y$} \psline{->}(O)(X) \psline{->}(O)(Y) \psline{->}(O)(Z) \planThreeDput[normale=90 0,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 0,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \panneau \end{pspicture} \end{center} {\psset{unit=0.4} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \axesIIID(10,10,10)% \planThreeDput[normale=90 -90,linecolor=gray,fontscale=0.5](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=-30} \panneau \end{pspicture} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \axesIIID(10,10,10)% \planThreeDput[normale=90 -90,linecolor=gray,fontscale=0.5](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=10} \panneau \end{pspicture} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \axesIIID(10,10,10)% \planThreeDput[normale=90 -90,linecolor=gray](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=40} \panneau \end{pspicture} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \axesIIID(10,10,10)% \planThreeDput[normale=90 -90,linecolor=gray](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=70} \panneau \end{pspicture} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \planThreeDput[normale=90 -90,linecolor=gray,fontscale=0.5](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=100} \panneau \axesIIID(10,10,10)% \end{pspicture} \begin{pspicture}(-8,-5)(10,10) \psset{THETA=45,PHI=30,Dobs=30,Decran=20} \planThreeDput[normale=90 -90,linecolor=gray,fontscale=0.5](0,0,0){\Grille(-10,-8)(10,8)} \planThreeDput[normale=90 -90,linecolor=blue](0,0,0){\ARC(0,0){32 sqrt}{0}{120}} \planThreeDput[normale=90 -90,linecolor=red](0,0,0){\ARCN(0,0){32 sqrt}{0}{120}} \psset{RotZ=170} \panneau \axesIIID(10,10,10)% \end{pspicture}} \subsection{Exemple 2} Voici un panneau à deux faces, suivant l'angle de vue, c'est le côté pile ou le côté face qui sera visible. Il suffit que les normales aux deux faces soient opposées. \begin{verbatim} [normale=45 45] % pile [normale=-45 225] % face \end{verbatim} {\psset{unit=0.8} \begin{center} \begin{pspicture}(-8,-5)(8,5) \psframe[fillstyle=hlines,hatchangle=0](-8,-5)(8,4.5) \psset{THETA=45,PHI=20,Dobs=30,Decran=20,arrowsize=0.3} \planThreeDput[normale=90 -90,fillstyle=solid]{\Rectangle(-10,-10)(10,10)} \planThreeDput[normale=90 -90,fontscale=0.5]{\Grille(-10,-10)(10,10)} \pnodeXYZ(0,0,0){O} \pnodeXYZ(0,0,6){Z} \uput[u](Z){\red$z$} \pnodeSphericalCoor(10,0,0){X} \uput[l](X){\red$x$} \pnodeSphericalCoor(10,90,0){Y} \uput[r](Y){\red$y$} \psline[linecolor=red]{->}(O)(X) \psline[linecolor=red]{->}(O)(Y) \psline[linecolor=red]{->}(O)(Z) \planThreeDput[fillstyle=solid,fillcolor=green!30,normale=45 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)}% \planThreeDput[normale=45 45,fontscale=0](2 sqrt,2 sqrt,2){\Grille(-4,8 sqrt neg)(4,8 sqrt)}% \planThreeDput[fillstyle=solid,fillcolor=cyan!20,normale=225 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)} \planThreeDput[normale=225 45,fontscale=0](2 sqrt,2 sqrt,2){\Grille(-4,8 sqrt neg)(4,8 sqrt)}% \textThreeDput[fillstyle=solid,fillcolor=red,fontscale=1.4,normale=45 45](2 sqrt,2 sqrt,2){CÔTÉ FACE}% \textThreeDput[fillstyle=solid,fillcolor=green,fontscale=1.4,normale=-45 225](2 sqrt,2 sqrt,2){CÔTÉ PILE}% \end{pspicture} \end{center} \begin{center} \begin{pspicture}(-8,-5)(8,5) \psframe[fillstyle=hlines,hatchangle=0](-8,-5)(8,4.5) \psset{THETA=45,PHI=20,Dobs=30,Decran=20,arrowsize=0.3,RotZ=180} \planThreeDput[normale=90 -90,fillstyle=solid]{\Rectangle(-10,-10)(10,10)} \planThreeDput[normale=90 -90,fontscale=0.5]{\Grille(-10,-10)(10,10)} \planThreeDput[fillstyle=solid,fillcolor=green!30,normale=45 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)}% \planThreeDput[normale=45 45,fontscale=0](2 sqrt,2 sqrt,2){\Grille(-4,8 sqrt neg)(4,8 sqrt)}% \planThreeDput[fillstyle=solid,fillcolor=cyan!20,normale=225 45](2 sqrt,2 sqrt,2){\Rectangle(-4,8 sqrt neg)(4,8 sqrt)} \planThreeDput[normale=225 45,fontscale=0](2 sqrt,2 sqrt,2){\Grille(-4,8 sqrt neg)(4,8 sqrt)}% \textThreeDput[fillstyle=solid,fillcolor=red,fontscale=1.4,normale=45 45](2 sqrt,2 sqrt,2){CÔTÉ FACE}% \textThreeDput[fillstyle=solid,fillcolor=blue,fontscale=1.4,normale=-45 225](2 sqrt,2 sqrt,2){CÔTÉ PILE}% \pnodeXYZ(0,0,0){O} \pnodeXYZ(0,0,6){Z} \uput[u](Z){\red$z$} \pnodeSphericalCoor(10,0,0){X} \uput[l](X){\red$x$} \pnodeSphericalCoor(10,90,0){Y} \uput[r](Y){\red$y$} \psline[linecolor=red]{->}(O)(X) \psline[linecolor=red]{->}(O)(Y) \psline[linecolor=red]{->}(O)(Z) \end{pspicture} \end{center}} \newpage \section{Les paramètres du point de vue} \begin{itemize} \item \verb+Dobs+ : distance à laquelle est placé le point de vue ; \item \verb+Decran+ : distance à laquelle est placé l'écran où la scène est fixée ; \item \verb+THETA+ : longitude dans la direction du point de vue ; \item \verb+PHI+ : latitude dans la direction du point de vue. \end{itemize} \section{Tutoriel pour l'emploi du modèle de couleurs \texttt{hsb}} \newcommand{\Touch}[1]{% \psframe[linestyle=none,fillstyle=solid,fillcolor=#1,dimen=middle](0.1,0.417)} \psset{dimen=middle} \subsection{La paramètre hue H} \begin{tabular}{l@{\ $=$\ }l} H&color\\\hline 0.0&red\\ 0.333&green\\ 0.667&blue \end{tabular} \reversemarginpar \marginpar{\raggedleft\ttfamily Hue} \begin{figure}[!h]\caption{\ttfamily\symbol{92}definecolor\{ColorA\}\{hsb\}\{H 1 1\}} \label{fig:Hsb} \vskip0.5cm\qquad\qquad \begin{pspicture}(10,1) \psset{unit=1.2cm} \multido{\nH=0.00+0.01,\NposH=0.0+0.1}{83}{% \def\KK{\nH\nH} \definecolor{ColorA}{hsb}{\KK\space 0.67 1} \rput(\NposH,0.5){\Touch{ColorA}}} \multido{\i=0+1,\n=0.0+0.1}{9}{% \psline(\i,-0.1)(\i,0.5) \uput[270](\i,0){\n}} \uput[270](-0.75,0){H $=$ } \end{pspicture} \end{figure} \begin{figure}[!h]\caption{\ttfamily\symbol{92}psframe[fillstyle=slopes,linestyle=none,dimen=middle](0,0.5)(10,1)} \label{fig:pslpe} \vskip0.5cm\qquad\qquad \begin{pspicture}(10,1) \psframe[fillstyle=slopes,linestyle=none,dimen=middle](0,0.5)(10,1) \end{pspicture} \end{figure} \subsection{Le paramètre Saturation} \marginpar{\raggedleft\ttfamily Saturation} \begin{figure}[!h]\caption{\ttfamily\symbol{92}definecolor\{ColorA\}\{hsb\}\{0.333 S 1\}} \label{fig:hSb} \vskip0.5cm\qquad\qquad \begin{pspicture}(10,1) \multido{\nH=0.00+0.01,\NposH=0.0+0.1}{100}{% \definecolor{ColorA}{hsb}{0.333 \nH\space 1} \rput(\NposH,0.5){\Touch{ColorA}}} \multido{\i=0+1,\n=0.0+0.1}{11}{% \psline(\i,-0.1)(\i,0.5) \uput[270](\i,0){\n}} \uput[270](-0.75,0){S $=$ } \end{pspicture} \end{figure} \subsection{Le paramètre Brightness} \marginpar{\raggedleft\ttfamily Brightness} \begin{figure}[!h]\caption{\ttfamily\symbol{92}definecolor\{ColorA\}\{hsb\}\{0.333 1 B\}} \label{fig:hsB} \vskip0.5cm\qquad\qquad \begin{pspicture}(10,1) \multido{\nH=0.00+0.01,\NposH=0.0+0.1}{100}{% \definecolor{ColorA}{hsb}{0.333 1 \nH} \rput(\NposH,0.5){\Touch{ColorA}}} \multido{\i=0+1,\n=0.0+0.1}{11}{% \psline(\i,-0.1)(\i,0.5) \uput[270](\i,0){\n}} \uput[270](-0.75,0){B $=$ } \end{pspicture} \end{figure} \psset{linestyle=none,fillstyle=solid} \begin{tabular}{ccc} \begin{pspicture}(2,1) \definecolor{lumineux}{hsb}{0 1 1} \psframe[fillcolor=lumineux](2,1) \end{pspicture} &\begin{pspicture}(2,1) \newhsbcolor{vif}{0 1 0.67} \psframe[fillcolor=vif](2,1) \end{pspicture} &\begin{pspicture}(2,1) \definecolor{profond}{hsb}{0 1 0.34} \psframe[fillcolor=profond](2,1) \end{pspicture}\\ \begin{pspicture}(2,1) \definecolor{clair}{hsb}{0 0.5 1} \psframe[fillcolor=clair](2,1) \end{pspicture} &\begin{pspicture}(2,1) \definecolor{moyen}{hsb}{0 0.5 0.7} \psframe[fillcolor=moyen](2,1) \end{pspicture} &\begin{pspicture}(2,1) \definecolor{fonce}{hsb}{0 0.5 0.3} \psframe[fillcolor=fonce](2,1) \end{pspicture}\\ \begin{pspicture}(2,1) \definecolor{pale}{hsb}{0 0.2 1} \psframe[fillcolor=pale](2,1) \end{pspicture} &\begin{pspicture}(2,1) \definecolor{gris}{hsb}{0 0.2 0.6} \psframe[fillcolor=gris](2,1) \end{pspicture} &\begin{pspicture}(2,1) \definecolor{sombre}{hsb}{0 0.2 0.2} \psframe[fillcolor=sombre](2,1) \end{pspicture} \end{tabular} \section{Que reste-t-il à faire ? Avis aux amateurs\ldots} \begin{enumerate} \item Faire l'illustration du paragraphe précédent. \item Afficher les faces des solides selon l'algorithme du peintre : \begin{itemize} \item d'abord éliminer les faces non vues ; \item puis les classer en fonction de leur distance au point de vue ; \item commencer l'affichage par la face la plus éloignée en terminant par la plus proche. \end{itemize} \item Prévoir en option les différents types d'encodage en particulier \texttt{Symbol} qui permet d'afficher les caractères grecs. \item Faire la liste de tous les solides souhaitables et les coder en postscript, comme \texttt{cube\_object}, \texttt{icosahedral\_object.tex}, \texttt{octahedral\_object.tex} et \texttt{sphere\_object.tex}. \item Créer un fichier \texttt{pst-V3D.pro} dans lequel on placera toutes les routines \texttt{PostScript}. \item Et bien d'autres choses encore\ldots \end{enumerate} \begin{flushright} 27 août 2006 : Manuel Luque \end{flushright} \end{document}