\documentclass{article}
\usepackage{pst-solides3d,pst-node,multido}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper]{geometry}
\usepackage{lmodern,manfnt}
\usepackage{frenchle}

\makeatletter
\def\psPoint{\def\pst@par{}\pst@object{psPoint}}
\def\psPoint@i(#1)#2{{% coordonnées cartésiennes
  \begin@ClosedObj
\pnode(!
    \tx@optionssolides
    SolidesDict begin
    #1
   3dto2d cm_1 exch cm_1 exch
   end){#2}%
   \end@ClosedObj
  }\ignorespaces%
}
\makeatother

\def\grille{% quadrillage du plan Oxy
\psPoint(-10 -10 0){A1}\psPoint(10 -10 0){A2}
\psPoint(10 10 0){A3}\psPoint(-10 10 0){A4}
\pspolygon*[linecolor=green!50](A1)(A2)(A3)(A4)
\multido{\ix=-10+1}{21}{%
    \psPoint(\ix\space -10 0){A}
    \psPoint(\ix\space 10 0){B}
    \psline(A)(B)}
\multido{\iy=-10+1}{21}{%
    \psPoint(-10 \iy\space 0){A}
    \psPoint(10 \iy\space 0){B}
    \psline(A)(B)}
    \psPoint(0 0 0){O}
    \psPoint(10 0 0){X}
    \psPoint(0 10 0){Y}
    \psPoint(0 0 10){Z}
    \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(X)
    \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(Y)
    \psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(Z)
    \uput[r](X){\textcolor{blue}{$x$}}\uput[u](Y){\textcolor{blue}{$y$}}%
    \uput[r](Z){\textcolor{blue}{$z$}}\uput[u](O){\textcolor{blue}{$O$}}}


\author{JPV}

\title{Documentation :\\
anneaux cylindriques}
\date{28 septembre 2\,007\\ version 0.3}
\begin{document}
\maketitle

\section{Objet : cylindricalring, 7 exemples}
Cette partie traite des anneaux cylindriques. Dans la commande \verb+\psSolid+, cet objet est tracé avec l'option : \verb+[object=cylindricalring]+, dont il faut fixer
3 paramètres :
\begin{itemize}
  \item le rayon intérieur \verb+[r0=1.5]+ (valeur par défaut) ;
  \item le rayon extérieur \verb+[r1=4]+ (valeur par défaut)
  \item la hauteur \verb+[h=6]+ (valeur par défaut).
\end{itemize}
La section de l'anneau dont la forme \texttt{rectangulaire} a été choisie par défaut, peut être redessinée par l'utilisateur.
Nous allons détailler différents exemples de section. Dans le plan $Oyz$, la section rectangulaire prend la forme suivante :
\begin{center}
\psset{unit=0.75}
\begin{pspicture}(-2,-2)(2,3)
\pstVerb{/R 4 def /r 2 def /h 2 def}%
\newcommand\RectangularSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth](!R h 2 div neg)(!R h 2 div)(!r h 2 div)(!r h 2 div neg)}
\rput(0,0){\RectangularSection}\rput(-6,0){\RectangularSection}
\psline(-2,1)(2,1)\psline(-2,-1)(2,-1)
\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
\psline[linestyle=dashed]{->}(-4,0)(4.2,0)
\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r_0$}
\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$r_1$}
\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
\uput[dr](!R h 2 div neg){1}
\uput[ur](!R h 2 div ){2}
\uput[ul](!r h 2 div ){3}
\uput[dl](!r h 2 div neg){4}
\end{pspicture}
\end{center}
\newpage
\section{Commande pré-définie~: l'anneau à section rectangulaire.}

Cette section est définie dans le plan $Oyz$. Les valeurs du rayon extérieur,
 du rayon intérieur et de la hauteur sont passées dans la commande \verb+\pstVerb{/R 4 def /r 2 def /h 2 def}+. Ceci n'est pas une obligation et
les coordonnées des sommets de la sections peuvent être passées en valeurs numériques.

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\Section{%
  x y z
  0 R h 2 div neg % sommet 1
  % S1(0,R,-h/2)
  0 R h 2 div     % sommet 2
  % S2(0,r,h/2)
  0 r h 2 div     % sommet 3
  % S3(0,r,h/2)
  0 r h 2 div neg % sommet 4
  % S4(0,r,-h/2)
            }
\end{verbatim}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\psset{unit=0.5}
\begin{pspicture}(-5,-3)(5,3)
\pstVerb{/R 4 def /r 2 def /h 2 def}%
\newcommand\RectangularSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth](!R h 2 div neg)(!R h 2 div)(!r h 2 div)(!r h 2 div neg)}
\rput(0,0){\RectangularSection}\rput(-6,0){\RectangularSection}
\psline(-2,1)(2,1)\psline(-2,-1)(2,-1)
\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
\psline[linestyle=dashed]{->}(-4,0)(4.2,0)
\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
\uput[dr](!R h 2 div neg){1}
\uput[ur](!R h 2 div ){2}
\uput[ul](!r h 2 div ){3}
\uput[dl](!r h 2 div neg){4}
\end{pspicture}
\end{minipage}

\begin{center}
%%
\psset{unit=0.5}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20}
\psSolid[object=cylindricalring,color=cyan,h=3,r1=8,r0=6,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-6)(5,5)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=cylindricalring,color=yellow,h=3,r1=8,r0=6,RotX=90,RotZ=10](0,0,0)
\end{pspicture}
\end{center}
\begin{verbatim}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 40,%
                      Decran=25,lightsrc=10 20 20}
\psSolid[object=cylindricalring,color=cyan,h=3,r1=8,r0=6,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-6)(5,5)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 -20 -40,%
       Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=cylindricalring,color=yellow,h=3,r1=8,r0=6,RotX=90,RotZ=10](0,0,0)
\end{pspicture}
\end{verbatim}
\newcommand\SectionTriangulaire{
         0 R h 2 div neg % sommet 1
         0 R r add 2 div h 2 div % sommet 2
         0 r h 2 div neg % sommet 3
}
\newpage
\section{L'anneau à section triangulaire}

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\SectionTriangulaire{
  x y <----z---->
  0 R h 2 div neg
  % S1(0,R,-h/2)
  0 R r add 2 div h 2 div
  % S2(0,(R+r)/2,h/2)
  0 r h 2 div neg
  % S3(0,r,-h/2)
}
\end{verbatim}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\psset{unit=0.5}
\begin{pspicture}(-5,-3)(5,3)
%\psgrid
\pstVerb{/R 4 def /r 2 def /h 2 def}%
\newcommand\TriangularSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth](!R h 2 div neg)(!R r add 2 div h 2 div)(!r h 2 div neg)}
\rput(0,0){\TriangularSection}\rput(-6,0){\TriangularSection}
\psline(-3,1)(3,1)\psline(-4,-1)(4,-1)
\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
\psline[linestyle=dashed](2,-1)(2,1.5)
\psline[linestyle=dashed](4,-1)(4,2.5)
\psline[linestyle=dashed]{->}(-4,0)(4.2,0)
\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
\uput[dr](!R h 2 div neg){1}
\uput[u](!R r add 2 div h 2 div){2}
\uput[dl](!r h 2 div neg){3}
\end{pspicture}
\end{minipage}
\begin{center}
%%
\psset{unit=0.5}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20}
\psSolid[object=cylindricalring,section=\SectionTriangulaire,color=cyan,h=3,r1=8,r0=4,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-6)(5,5)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=cylindricalring,section=\SectionTriangulaire,color=yellow,h=3,r1=8,r0=4,RotX=-90,RotZ=10](0,0,0)
\end{pspicture}
\end{center}
\begin{verbatim}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 40,%
                      Decran=25,lightsrc=10 20 20}
\psSolid[object=cylindricalring,section=\SectionTriangulaire,%
         color=cyan,h=3,r1=8,r0=4,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-6)(5,5)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 -20 -40,%
                      Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=cylindricalring,section=\SectionTriangulaire,%
         color=yellow,h=3,r1=8,r0=4,RotX=-90,RotZ=10](0,0,0)
\end{pspicture}
\end{verbatim}
\newpage
\newcommand\SectionPneu{
   /m {90 4 div} bind def
   /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def
   /Z0 {h 4 div} bind def
   /c {Z0 Scos div} bind def
   /Z1 {Z0 c m cos mul add} bind def
   /Z2 {Z1 c m 2 mul cos mul add} bind def
   /R1 {R c m sin mul sub} bind def
   /R2 {R1 c m 2 mul sin mul sub} bind def
   /R3 {R2 c m 3 mul sin mul sub} bind def
   0 R h 4 div neg % 1
   0 R h 4 div % 2
   0 R1 Z1 % 3
   0 R2 Z2 % 4
   0 R3 h 2 div % 5
   0 r h 2 div  % 6
   0 r h 2 div neg  % 7
   0 R3 h 2 div neg % 8
   0 R2 Z2 neg % 9
   0 R1 Z1 neg % 10
   }
\section{L'anneau à section ``pneu'' : anneau cylindrique à arêtes chanfreinées.}
\begin{minipage}{0.45\linewidth}
{\small
\begin{verbatim}
\renewcommand\SectionPneu{
   /m {90 4 div} bind def
   /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def
   /Z0 {h 4 div} bind def
   /c {Z0 Scos div} bind def
   /Z1 {Z0 c m cos mul add} bind def
   /Z2 {Z1 c m 2 mul cos mul add} bind def
   /R1 {R c m sin mul sub} bind def
   /R2 {R1 c m 2 mul sin mul sub} bind def
   /R3 {R2 c m 3 mul sin mul sub} bind def
   0 R h 4 div neg % 1
   0 R h 4 div % 2
   0 R1 Z1 % 3
   0 R2 Z2 % 4
   0 R3 h 2 div % 5
   0 r h 2 div  % 6
   0 r h 2 div neg  % 7
   0 R3 h 2 div neg % 8
   0 R2 Z2 neg % 9
   0 R1 Z1 neg % 10
   }
\end{verbatim}}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
%\psset{unit=0.65}
\begin{pspicture}(-2,-3)(5,6)
%\psgrid
\pstVerb{/R 4 def /r 2 def /h 2 def}%
\pstVerb{/m {90 4 div} bind def
   /Scos {m cos 2 m mul cos add 3 m mul cos add} bind def
   /Z0 {h 4 div} bind def
   /c {Z0 Scos div} bind def
   /Z1 {Z0 c m cos mul add} bind def
   /Z2 {Z1 c m 2 mul cos mul add} bind def
   /R1 {R c m sin mul sub} bind def
   /R2 {R1 c m 2 mul sin mul sub} bind def
   /R3 {R2 c m 3 mul sin mul sub} bind def}%
\pnode(!R h 4 div neg){S1}
\pnode(!R h 4 div){S2}
\pnode(!R1 Z1){S3}
\pnode(!R2 Z2){S4}
\pnode(!R3 h 2 div){S5}
\pnode(!r h 2 div){S6}
\pnode(!r h 2 div neg){S7}
\pnode(!R3 h 2 div neg){S8}
\pnode(!R2 Z2 neg){S9}
\pnode(!R1 Z1 neg){S10}
\newcommand\pneuSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
 (S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10)}
\rput(0,0){\pneuSection}\rput{180}{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
 (!R h 4 div neg)(!R h 4 div)(!R1 Z1)(!R2 Z2)(!R3 h 2 div)(!r h 2 div)(!r h 2 div neg)(!R3 h 2 div neg)(!R2 Z2 neg)(!R1 Z1 neg)}
\psline(-3,1)(3,1)\psline(-3,-1)(3,-1)
\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
\psline[linestyle=dashed](2,-1)(2,1.5)
\psline[linestyle=dashed](4,-1)(4,2.5)
\psline[linestyle=dashed]{->}(-4,0)(4.2,0)
\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
\uput[r](S1){1}
\uput[r](S2){2}
\uput[u](S3){3}
\uput[u](S4){4}
\uput[u](S5){5}
\uput[ul](S6){6}
\uput[dl](S7){7}
\uput[dl](S8){8}
\uput[dr](S9){9}
\uput[r](S10){10}
\psdots[linecolor=red](S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10)
\end{pspicture}
\end{minipage}
\begin{center}
\psset{unit=0.7}
\begin{pspicture}(-5,-5)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 40,Decran=25,lightsrc=10 20 20}
\psSolid[object=cylindricalring,section=\SectionPneu,color=cyan,h=3,r1=8,r0=4,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-5)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 -20 -40,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=cylindricalring,section=\SectionPneu,color=yellow,h=3,r1=8,r0=4,RotX=-90,RotZ=10](0,0,0)
\end{pspicture}
\end{center}
\begin{verbatim}
\psSolid[object=cylindricalring,section=\SectionPneu,%
         color=cyan,h=3,r1=8,r0=4,RotX=10](0,0,0)
\psSolid[object=cylindricalring,section=\SectionPneu,%
         color=yellow,h=3,r1=8,r0=4,RotX=-90,RotZ=10](0,0,0)
\end{verbatim}
\newpage
\section{Pouf}

C'est toujours la même section du pneu qui est utilisée mais en prenant un rayon intérieur nul et une hauteur
plus grande on obtient un ``pouf''.
\begin{verbatim}
\psSolid[object=cylindricalring,section=\SectionPneu,%
         color=red!50!yellow!30,h=10,r1=6,r0=0.1](0,0,5)
\end{verbatim}
\begin{center}
\begin{pspicture*}(-5,-6)(5,7)
\psframe(-5,-4)(5,7)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 20 20,Decran=25,lightsrc=10 20 20}
\psSolid[object=grille,base=-10 10 -10 10,action=draw**,color=red!10](0,0,0)
\psSolid[object=cylindricalring,section=\SectionPneu,color=red!50!yellow!30,h=10,r1=6,r0=0.1](0,0,5)
\psPoint(0 0 10){Z}
\psPoint(0 0 12){Z'}
\psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(Z)(Z')
\uput[u](Z'){\textcolor{blue}{$z$}}
\end{pspicture*}
\end{center}
\newpage
\section{les arènes}
\begin{verbatim}
\newcommand\SectionArenes{
   360 -20 180{
    /Angle ED
    0 % x=0
    R r sub 2 div Angle cos mul R r add 2 div add % y=(R-r)cos(A)+(R+r)/2
    R r sub 2 div Angle sin mul neg h add % z=-(R-r)sin(A)+h
    } for
   0 r 0
   0 R 0
   }
\end{verbatim}
\newcommand\SectionArenes{
   360 -20 180{
    /Angle ED
    0 % x=0
    R r sub 2 div Angle cos mul R r add 2 div add % y=(R-r)cos(A)+(R+r)/2
    R r sub 2 div Angle sin mul neg h add % z=-(R-r)sin(A)+h
    } for
   0 r 0
   0 R 0
   }
\begin{center}
\begin{pspicture}(-5,-6)(5,5)
\psframe*[linecolor=gray!20](-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=50 45 45,Decran=25,lightsrc=10 20 20}
\psSolid[object=grille,base=-10 10 -10 10,action=draw**,color=yellow!30](0,0,0)
\psSolid[object=cylindricalring,section=\SectionArenes,color=blue!50!gray!30,h=4,r1=8,r0=6](0,0,0)
\psPoint(0 0 12){Z}
\psline[arrowsize=0.3,arrowinset=0.2,linecolor=blue]{->}(O)(Z)
\uput[u](Z){\textcolor{blue}{$z$}}
\end{pspicture}
\end{center}
\newpage
\section{Bobine vide}
\newcommand\SectionBobine{
   0 r h 2 div % 1
   0 r h 2 div neg % 2
   0 R h 2 div neg % 3
   0 R h 3 div neg % 4
   0 R h 4 div sub h 3 div neg % 5
   0 R h 4 div sub h 3 div % 6
   0 R h 3 div % 7
   0 R h 2 div % 8
   }

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\SectionBobine{
   0 r h 2 div % 1
   0 r h 2 div neg % 2
   0 R h 2 div neg % 3
   0 R h 3 div neg % 4
   0 R h 4 div sub h 3 div neg % 5
   0 R h 4 div sub h 3 div % 6
   0 R h 3 div % 7
   0 R h 2 div % 8
   }
\end{verbatim}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\begin{pspicture}(-2,-2)(5,2)
\pstVerb{/R 4 def /r 2 def /h 3 def}%
\pnode(!r h 2 div){S1}
\pnode(!r h 2 div neg){S2}
\pnode(!R h 2 div neg){S3}
\pnode(!R h 3 div neg){S4}
\pnode(!R h 4 div sub h 3 div neg){S5}
\pnode(!R h 4 div sub h 3 div){S6}
\pnode(!R h 3 div){S7}
\pnode(!R h 2 div){S8}
\newcommand\pneuSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
 (S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)}
\rput(0,0){\pneuSection}\rput{180}{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
 (!r h 2 div)(!r h 2 div neg)(!R h 2 div neg)(!R h 3 div neg)(!R h 4 div sub h 3 div neg)(!R h 4 div sub h 3 div)(!R h 3 div)(!R h 2 div)}
\psline(-3,1.5)(3,1.5)\psline(-3,-1.5)(3,-1.5)
\psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
\uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
\psline[linestyle=dashed](2,-1)(2,1.5)
\psline[linestyle=dashed](4,-1)(4,2.5)
\psline[linestyle=dashed](-4,-1)(4,-1)
\psline[linestyle=dashed](-4,1)(4,1)
\psline[linestyle=dashed]{->}(-4,0)(4.2,0)
\psline{->}(0,1.8)(2,1.8)\uput[u](1,1.8){$r$}
\psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
\psline{<->}(5,-1.5)(5,1.5)\uput[r](5,0){$h$}
\uput[u](S1){1}
\uput[d](S2){2}
\uput[d](S3){3}
\uput[r](S4){4}
\uput[ur](S5){5}
\uput[dr](S6){6}
\uput[r](S7){7}
\uput[r](S8){8}
\psdots[linecolor=red](S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)
\end{pspicture}
\end{minipage}
\begin{center}
\begin{pspicture}(-5,-6)(5,5)
\psframe*[linecolor=blue!50](-5,-5)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=70 40 10,Decran=25,lightsrc=0 30 100}
\psSolid[object=grille,base=-15 15 -15 15,action=draw**,color=yellow!30!black!10](0,0,-8)
%\psSolid[object=prism,h=2,base=-15 1 -15 -1 15 -1 15 1](0,0,-8)
\psSolid[object=cylindricalring,section=\SectionBobine,color=gray!50,h=6,r1=8,r0=4,RotX=90,linecolor=gray](0,0,0)
\end{pspicture}
\end{center}
{\footnotesize
\begin{verbatim}
\psSolid[object=grille,base=-15 15 -15 15,action=draw**,color=yellow!30](0,0,-8)
\psSolid[object=cylindricalring,section=\SectionBobine,%
         color=gray!50,h=6,r1=8,r0=4,RotX=90,linecolor=gray](0,0,0)
\end{verbatim}
}
\newpage
\section{Anneau gouttière}

\newcommand\SectionJante{
   90 10 270{
    /Angle ED
    0 % x=0
    R r sub Angle cos mul R add % y=(R-r)cos(A) + R
    R r sub Angle sin mul % z=(R-r)sin(A)
    } for
   0 R h 2 div neg % (y=R, z=-h/2)
   0 R h 2 div neg h 6 div add % (y=R, z=-h/2+h/6)
   270 -10 90 {
    /Angle ED
    0 % x=0
    R r sub h 6 div sub Angle cos mul R add % y=(R-r-h/6)cos(A)+ R
    R r sub h 6 div sub Angle sin mul % z=(R-r)-h/6sin(A)
    } for
   }
\begin{verbatim}
\newcommand\SectionJante{
   90 10 270{ % extérieur
    /Angle ED
    0 % x=0
    R r sub Angle cos mul R add % y=(R-r)cos(A) + R
    R r sub Angle sin mul % z=(R-r)sin(A)
    } for
   0 R h 2 div neg h 6 div add % (y=R, z=-h/2+h/6)
   270 -10 90 { % intérieur
    /Angle ED
    0 % x=0
    R r sub h 6 div sub Angle cos mul R add % y=(R-r-h/6)*cos(A)+ R
    R r sub h 6 div sub Angle sin mul % z=(R-r-h/6)*sin(A)
    } for
   }
\end{verbatim}
\begin{center}
\begin{pspicture}(-5,-4)(5,4)
\psframe*[linecolor=blue!20](-5,-4)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=70 40 30,Decran=25,lightsrc=100 30 100}
\psSolid[object=cylindricalring,section=\SectionJante,color=white,h=8,r1=12,r0=8](0,0,0)
\end{pspicture}
\end{center}
\textdbend{} $\mathtt{h=2\times(R-r)=2\times(r_1-r_0)}$.
\begin{verbatim}
\begin{pspicture}(-5,-4)(5,4)
\psframe*[linecolor=blue!20](-5,-5)(5,4)
\psset[pst-solides3d]{SphericalCoor=true,viewpoint=70 40 30,Decran=25,lightsrc=100 30 100}
\psSolid[object=cylindricalring,section=\SectionJante,color=white,h=4,r1=10,r0=8](0,0,0)
\end{pspicture}
\end{verbatim}
\end{document}
