summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc/par-anneaux.tex
blob: d2f097f82ebf8ba43c74b2bab2eda5303c60728e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452

\section {Solide anneau}

Cette partie traite des anneaux cylindriques. Dans la commande
\verb+\psSolid+, cet objet est tracé avec l'option :
\verb+[object=anneau]+, dont il faut fixer
3 paramètres :
\begin{itemize}
  \item le rayon intérieur \verb+[r=1.5]+ (valeur par défaut) ;
  \item le rayon extérieur \verb+[R=4]+ (valeur par défaut)
  \item la hauteur \verb+[h=6]+ (valeur par défaut).
\end{itemize}

En option, l'argument \verb+ngrid+ permet de définir le nombre de
sections utilisées pour faire une rotation complète de
$360$~degrés. Sa valeur par défaut est $24$.

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.

\subsection {Commande pré-définie~: l'anneau à section rectangulaire.}

Cette section est définie dans le plan $Oyz$, elle est paramétrée par le
triplet $(r, R, h)$. Les valeurs du rayon
extérieur $R$, du rayon intérieur $r$ et de la hauteur $h$ sont
passées dans les options de \verb+\psSolid+. Par défaut, on a donc un
anneau à section rectangulaire variable, et la définition se fait au
moment de la transmission des valeurs pour $(r, R, h)$ dans les
options de \verb+\psSolid+.

Si l'utilisateur redéfinit la macro \TeX {} \verb+\Section+ avec des
valeurs numériques plutôt que les paramètres $r$, $R$ et $h$, alors
l'anneau n'est plus variable et il n'est plus besoin de transmettre
des valeurs pour $r$, $R$, et $h$ dans les options de \verb+\psSolid+.

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\Section{%
% y z
  R h 2 div neg % sommet 1
  % S1 (R,-h/2)
  R h 2 div     % sommet 2
  % S2 (r,h/2)
  r h 2 div     % sommet 3
  % S3 (r,h/2)
  r h 2 div neg % sommet 4
  % S4 (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}
%
\bgroup\centering
%%
\psset{unit=0.5}
\begin{pspicture}(-5,-4)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
\psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0)
\end{pspicture}
%%
\begin{pspicture}(-5,-4)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0)
\end{pspicture}
\par\egroup
%% \begin{verbatim}
%% \begin{pspicture}(-5,-6)(5,6)
%% \psframe(-5,-4)(5,4)
%% \psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,%
%%                       Decran=25,lightsrc=10 20 20}
%% \psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0)
%% \end{pspicture}
%% %%
%% \begin{pspicture}(-5,-6)(5,5)
%% \psframe(-5,-4)(5,4)
%% \psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,%
%%        Decran=25,lightsrc=-10 -20 -20}
%% \psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0)
%% \end{pspicture}
%% \end{verbatim}
\begin{verbatim}
\psSolid[object=anneau,fillcolor=cyan,h=3,R=8,r=6,ngrid=4,RotX=10](0,0,0)
\psSolid[object=anneau,fillcolor=yellow,h=3,R=8,r=6,RotX=90,RotZ=10](0,0,0)
\end{verbatim}

\subsection {Un simple anneau à section triangulaire}

Ci-dessous un anneau très simple, à section triangulaire fixe. La
section est définie par la donnée des $3$~points $(6, -2)$, (10, 0)
et $(6, 2)$ dans l'option \texttt{section} de \verb+\psSolid+.

\begin{center}
\begin{minipage}{0.45\linewidth}
\psset{unit=0.5}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{
   viewpoint=50 20 40 rtp2xyz,Decran=25,
   lightsrc=10 20 20}
\psSolid[object=anneau,
   section=6 -2 10 0 6 2,
   fillcolor=cyan,RotX=10]%
\end{pspicture}
\end{minipage}
%%
\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\psset{unit=0.5}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{
   viewpoint=50 20 40 rtp2xyz,Decran=25,
   lightsrc=10 20 20}
\psSolid[object=anneau,
   section=6 -2 10 0 6 2,
   fillcolor=cyan,RotX=10]%
\end{pspicture}
\end{verbatim}
\end{minipage}
\end{center}

%\newpage

\subsection {Un anneau variable à section triangulaire}

\newcommand\SectionTriangulaire{
         R h 2 div neg % sommet 1
         R r add 2 div h 2 div % sommet 2
         r h 2 div neg % sommet 3
}

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\SectionTriangulaire{
% y <----z---->
  R h 2 div neg
  % S1 (R,-h/2)
  R r add 2 div h 2 div
  % S2 ((R+r)/2,h/2)
  r h 2 div neg
  % S3 (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]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=cyan,h=3,R=8,r=4,RotX=10]%
\end{pspicture}
%%
\begin{pspicture}(-5,-6)(5,5)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=anneau,section=\SectionTriangulaire,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]%
\end{pspicture}
\end{center}
%% \begin{verbatim}
%% \begin{pspicture}(-5,-6)(5,6)
%% \psframe(-5,-4)(5,4)
%% \psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,%
%%                       Decran=25,lightsrc=10 20 20}
%% \psSolid[object=anneau,section=\SectionTriangulaire,%
%%          fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0)
%% \end{pspicture}
%% %%
%% \begin{pspicture}(-5,-6)(5,5)
%% \psframe(-5,-4)(5,4)
%% \psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,%
%%                       Decran=25,lightsrc=-10 -20 -20}
%% \psSolid[object=anneau,section=\SectionTriangulaire,%
%%          fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10](0,0,0)
%% \end{pspicture}
%% \end{verbatim}
\begin{verbatim}
\psSolid[object=anneau,section=\SectionTriangulaire,%
         fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0)
%%
\psSolid[object=anneau,section=\SectionTriangulaire,%
         fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10](0,0,0)
\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
   R h 4 div neg % 1
   R h 4 div % 2
   R1 Z1 % 3
   R2 Z2 % 4
   R3 h 2 div % 5
   r h 2 div  % 6
   r h 2 div neg  % 7
   R3 h 2 div neg % 8
   R2 Z2 neg % 9
   R1 Z1 neg % 10
   }

\subsection {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
   R h 4 div neg % 1
   R h 4 div % 2
   R1 Z1 % 3
   R2 Z2 % 4
   R3 h 2 div % 5
   r h 2 div  % 6
   r h 2 div neg  % 7
   R3 h 2 div neg % 8
   R2 Z2 neg % 9
   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}

%\iffalse
\begin{center}
\psset{unit=0.7}
\begin{pspicture}(-5,-5)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{viewpoint=50 20 40 rtp2xyz,Decran=25,lightsrc=10 20 20}
\psSolid[object=anneau,section=\SectionPneu,fillcolor=cyan,h=3,R=8,r=4,RotX=10]%
\end{pspicture}
%%
\begin{pspicture}(-5,-5)(5,4)
\psframe(-5,-4)(5,4)
\psset[pst-solides3d]{viewpoint=50 -20 -40 rtp2xyz,Decran=25,lightsrc=-10 -20 -20}
\psSolid[object=anneau,section=\SectionPneu,fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]%
\end{pspicture}
\end{center}
%%
\begin{gbar}
\begin{verbatim}
\psSolid[object=anneau,section=\SectionPneu,%
         fillcolor=cyan,h=3,R=8,r=4,RotX=10](0,0,0)
\psSolid[object=anneau,section=\SectionPneu,%
         fillcolor=yellow,h=3,R=8,r=4,RotX=-90,RotZ=10]%
\end{verbatim}
\end{gbar}
%\fi
\newpage

\subsection{Bobine vide}

\newcommand\SectionBobine{
   r h 2 div % 1
   r h 2 div neg % 2
   R h 2 div neg % 3
   R h 3 div neg % 4
   R h 4 div sub h 3 div neg % 5
   R h 4 div sub h 3 div % 6
   R h 3 div % 7
   R h 2 div % 8
   }

\begin{minipage}{0.45\linewidth}
\begin{verbatim}
\newcommand\SectionBobine{
   r h 2 div % 1
   r h 2 div neg % 2
   R h 2 div neg % 3
   R h 3 div neg % 4
   R h 4 div sub h 3 div neg % 5
   R h 4 div sub h 3 div % 6
   R h 3 div % 7
   R h 2 div % 8
   }
\end{verbatim}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\begin{pspicture}(-2,-2)(5,2)
\pstVerb{/RB 4 def /rB 2 def /hB 3 def}%
\pnode(!rB hB 2 div){S1}
\pnode(!rB hB 2 div neg){S2}
\pnode(!RB hB 2 div neg){S3}
\pnode(!RB hB 3 div neg){S4}
\pnode(!RB hB 4 div sub hB 3 div neg){S5}
\pnode(!RB hB 4 div sub hB 3 div){S6}
\pnode(!RB hB 3 div){S7}
\pnode(!RB hB 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]%
 (!rB hB 2 div)(!rB hB 2 div neg)(!RB hB 2 div neg)(!RB hB 3 div neg)(!RB hB 4 div sub hB 3 div neg)(!RB hB 4 div sub hB 3 div)(!RB hB 3 div)(!RB hB 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]{viewpoint=70 40 10 rtp2xyz,Decran=25,lightsrc=0 30 100}
\psSolid[object=grille,base=-15 15 -15 15,fillcolor=yellow!30!black!10](0,0,-8)
%\psSolid[object=prisme,h=2,base=-15 1 -15 -1 15 -1 15 1](0,0,-8)
\psSolid[object=anneau,section=\SectionBobine,fillcolor=gray!50,h=6,R=8,r=4,RotX=90,linecolor=gray]%
\end{pspicture}
\end{center}
\begin{gbar}
\begin{verbatim}
\psSolid[object=grille,base=-15 15 -15 15,fillcolor=yellow!30](0,0,-8)
\psSolid[object=anneau,section=\SectionBobine,%
         fillcolor=gray!50,h=6,R=8,r=4,RotX=90,linecolor=gray]%
\end{verbatim}
\end{gbar}


\subsection{D'autres anneaux}
Trois autres exemples sont disponibles sur la page :

\centerline{\url{http://syracuse.eu.org/lab/bpst/pst-solides3d/anneaux}}