1 \section {Solide anneau}
3 Cette partie traite des anneaux cylindriques. Dans la commande
4 \verb+\psSolid+, cet objet est tracé avec l'option :
5 \verb+[object=anneau]+, dont il faut fixer 3 paramètres :
7 \item le rayon intérieur \verb+[r=1.5]+ (valeur par défaut) ;
8 \item le rayon extérieur \verb+[R=4]+ (valeur par défaut)
9 \item la hauteur \verb+[h=6]+ (valeur par défaut).
12 En option, l'argument \verb+ngrid+ permet de définir le nombre de
13 sections utilisées pour faire une rotation complète de
14 $360$~degrés. Sa valeur par défaut est $24$.
16 La section de l'anneau dont la forme \texttt{rectangulaire} a été
17 choisie par défaut, peut être redessinée par l'utilisateur.
18 Nous allons détailler différents exemples de section.
20 \subsection{Commande pré-définie~: l'anneau à section rectangulaire.}
22 Cette section est définie dans le plan $Oyz$, elle est paramétrée par le
23 triplet $(r, R, h)$. Les valeurs du rayon
24 extérieur $R$, du rayon intérieur $r$ et de la hauteur $h$ sont
25 passées dans les options de \verb+\psSolid+. Par défaut, on a donc un
26 anneau à section rectangulaire variable, et la définition se fait au
27 moment de la transmission des valeurs pour $(r, R, h)$ dans les
28 options de \verb+\psSolid+.
30 Si l'utilisateur redéfinit la macro \TeX{} \verb+\Section+ avec des
31 valeurs numériques plutôt que les paramètres $r$, $R$ et $h$, alors
32 l'anneau n'est plus variable et il n'est plus besoin de transmettre
33 des valeurs pour $r$, $R$, et $h$ dans les options de \verb+\psSolid+.
35 %\begin{minipage}{0.45\linewidth}
36 \begin{lstlisting}[basicstyle=\footnotesize\ttfamily]
38 Rad1 height 2 div neg % S1 (R,-h/2) sommet 1
39 Rad1 height 2 div % S2 (r,h/2) sommet 2
40 rad2 height 2 div % S3 (r,h/2) sommet 3
41 rad2 height 2 div neg }% S4 (r,-h/2) sommet 4
44 \begin{LTXexample}[width=5cm]
45 \psset{unit=0.5}\begin{pspicture}(-5,-3)(5,3)
46 \pstVerb{/Rad1 4 def /rad2 2 def /height 2 def}%
47 \def\RectangularSection{%
48 \pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
49 (!Rad1 height 2 div neg)(!Rad1 height 2 div)%
50 (!rad2 height 2 div)(!rad2 height 2 div neg)}
51 \rput(0,0){\RectangularSection}\rput(-6,0){\RectangularSection}
52 \psline(-2,1)(2,1)\psline(-2,-1)(2,-1)
53 \psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
54 \psline[linestyle=dashed]{->}(-4,0)(4.2,0)
55 \uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
56 \psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
57 \psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
58 \psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
59 \uput[dr](!Rad1 height 2 div neg){1}\uput[ur](!Rad1 height 2 div ){2}
60 \uput[ul](!rad2 height 2 div ){3} \uput[dl](!rad2 height 2 div neg){4}
68 \begin{pspicture}(-5,-4)(5,4)
70 \psset{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
71 \psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0)
74 \begin{pspicture}(-5,-4)(5,4)
76 \psset{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
77 \psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0)
82 \begin{lstlisting}[basicstyle=\footnotesize\ttfamily]
83 \psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0)
84 \psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0)
87 \subsection{Un simple anneau à section triangulaire}
89 Ci-dessous un anneau très simple, à section triangulaire fixe. La
90 section est définie par la donnée des $3$~points $(6, -2)$, (10, 0)
91 et $(6, 2)$ dans l'option \texttt{section} de \verb+\psSolid+.
93 \begin{LTXexample}[width=5cm]
95 \begin{pspicture}(-5,-4)(5,4)
97 \psset{viewpoint=50 20 40 rtp2xyz,Decran=25,
99 \psSolid[object=anneau,section=6 -2 10 0 6 2,
100 fillcolor=cyan,RotX=10]
105 \subsection{Un anneau variable à section triangulaire}
107 \begin{lstlisting}[basicstyle=\footnotesize\ttfamily]
108 \newcommand\SectionTriangulaire{% y <----z---->
109 Rad1 height 2 div neg % S1 (R,-h/2)
110 Rad1 rad2 add 2 div height 2 div % S2 ((R+r)/2,h/2)
111 rad2 height 2 div neg } % S3 (r,-h/2)
114 \def\TriangularSection{%
115 \pspolygon[fillstyle=vlines,linewidth=1.5pt](!Rad1 height 2 div neg)%
116 (!Rad1 rad2 add 2 div height 2 div)(!rad2 height 2 div neg)}
117 \begin{LTXexample}[width=5cm]
118 \psset{unit=0.5cm}\pstVerb{/Rad1 4 def /rad2 2 def /height 2 def }%
119 \begin{pspicture}(-5,-3)(5,3)
120 \rput(0,0){\TriangularSection}\rput(-6,0){\TriangularSection}
121 \psline(-3,1)(3,1)\psline(-4,-1)(4,-1)
122 \psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
123 \uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
124 \psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
125 \psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}
126 \psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
127 \uput[dr](! Rad1 height 2 div neg){1}
128 \uput[u](! Rad1 rad2 add 2 div height 2 div){2}
129 \uput[dl](! rad2 height 2 div neg){3}\psset{linestyle=dashed}
130 \psline(2,-1)(2,1.5)\psline(4,-1)(4,2.5)\psline{->}(-4,0)(4.2,0)
137 \def\SectionTriangulaire{
138 R h 2 div neg % sommet 1
139 R r add 2 div h 2 div % sommet 2
140 r h 2 div neg } % sommet 3
141 \begin{pspicture}(-5,-6)(5,6)
143 \psset{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
144 \psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=cyan,h=3,R=8,r=4,RotX=10]%
147 \begin{pspicture}(-5,-6)(5,5)
149 \psset{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
150 \psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]%
155 \begin{lstlisting}[basicstyle=\footnotesize\ttfamily]
156 \psSolid[object=anneau,section=\SectionTriangulaire,
157 fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0)
158 \psSolid[object=anneau,section=\SectionTriangulaire,
159 fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10](0,0,0)
163 \subsection[L'anneau à section ``pneu'']%
164 {L'anneau à section ``pneu'' : anneau cylindrique à arêtes chanfreinées.}
167 \begin{minipage}{0.45\linewidth}
168 \begin{lstlisting}[basicstyle=\footnotesize\ttfamily]
170 /MM { 90 4 div} bind def
171 /Scos {MM cos 2 MM mul cos add 3 MM mul cos add} bind def
172 /Z0 {h 4 div} bind def
173 /c {Z0 Scos div} bind def
174 /Z1 {Z0 c MM cos mul add} bind def
175 /Z2 {Z1 c MM 2 mul cos mul add} bind def
176 /R1 {R c MM sin mul sub} bind def
177 /R2 {R1 c MM 2 mul sin mul sub} bind def
178 /R3 {R2 c MM 3 mul sin mul sub} bind def
193 \begin{minipage}{0.45\linewidth}
195 \begin{pspicture}(-2,-3)(5,6)
196 \pstVerb{/Rad1 4 def /rad2 2 def /height 2 def
197 /MM {90 4 div} bind def
198 /Scos {MM cos 2 MM mul cos add 3 MM mul cos add} bind def
199 /Z0 {height 4 div} bind def
200 /c {Z0 Scos div} bind def
201 /Z1 {Z0 c MM cos mul add} bind def
202 /Z2 {Z1 c MM 2 mul cos mul add} bind def
203 /R1 {Rad1 c MM sin mul sub} bind def
204 /R2 {R1 c MM 2 mul sin mul sub} bind def
205 /R3 {R2 c MM 3 mul sin mul sub} bind def}%
206 \pnode(!Rad1 height 4 div neg){S1}\pnode(!Rad1 height 4 div){S2}
207 \pnode(!R1 Z1){S3} \pnode(!R2 Z2){S4}
208 \pnode(!R3 height 2 div){S5} \pnode(!rad2 height 2 div){S6}
209 \pnode(!rad2 height 2 div neg){S7}\pnode(!R3 height 2 div neg){S8}
210 \pnode(!R2 Z2 neg){S9} \pnode(!R1 Z1 neg){S10}
211 \newcommand\pneuSection{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
212 (S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10)}
213 \rput(0,0){\pneuSection}\rput{180}{\pspolygon[fillstyle=vlines,linewidth=2\pslinewidth]%
214 (!Rad1 height 4 div neg)(!Rad1 height 4 div)(!R1 Z1)(!R2 Z2)%
215 (!R3 height 2 div)(!rad2 height 2 div)(!rad2 height 2 div neg)(!R3 height 2 div neg)(!R2 Z2 neg)(!R1 Z1 neg)}
216 \psline(-3,1)(3,1)\psline(-3,-1)(3,-1)
217 \psline[linestyle=dashed,dash=1 0.2 0.05 0.2]{->}(0,-3)(0,3)
218 \uput[u](0,3){$z$}\uput[r](4.1,0){$y$}\uput[dl](0,0){$O$}
219 \psline[linestyle=dashed](2,-1)(2,1.5)\psline[linestyle=dashed](4,-1)(4,2.5)
220 \psline[linestyle=dashed]{->}(-4,0)(4.2,0)\psline{->}(0,1.5)(2,1.5)\uput[u](1,1.5){$r$}
221 \psline{->}(0,2.5)(4,2.5)\uput[u](2,2.5){$R$}\psline{<->}(5,-1)(5,1)\uput[r](5,0){$h$}
222 \uput[r](S1){1}\uput[r](S2){2}\uput[u](S3){3}\uput[u](S4){4}
223 \uput[u](S5){5}\uput[ul](S6){6}\uput[dl](S7){7}\uput[dl](S8){8}
224 \uput[dr](S9){9}\uput[r](S10){10}
225 \psdots[linecolor=red](S1)(S2)(S3)(S4)(S5)(S6)(S7)(S8)(S9)(S10)
232 /Scos { MM cos 2 MM mul cos add 3 MM mul cos add } def
235 /Z1 { Z0 c MM cos mul add } def
236 /Z2 { Z1 c MM 2 mul cos mul add } def
237 /R1 { R c MM sin mul sub } def
238 /R2 { R1 c MM 2 mul sin mul sub } def
239 /R3 { R2 c MM 3 mul sin mul sub } def
252 \begin{pspicture}(-5,-5)(5,4)
254 \psset{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
255 \psSolid[object=anneau,section=\SectionPneu,fillcolor=cyan,h=3,R=8,r=4,RotX=10]%
258 \begin{pspicture}(-5,-5)(5,4)
260 \psset{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
261 \psSolid[object=anneau,section=\SectionPneu,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]%
267 \psSolid[object=anneau,section=\SectionPneu,fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0)
268 \psSolid[object=anneau,section=\SectionPneu,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]