root/trunk/jps2ps/package/labo.pps

Revision 4, 80.3 kB (checked in by jms, 8 months ago)

Chargement de jps2ps dans le SVN.

Line 
1 %%  Ce fichier est un essai de transcription dans le format jps
2 %%  du formidable travail qu'ont accompli Manuel Luque, Denis Girou et
3 %%  Christophe Jorsen pour l'extension pst-labo pour PSTricks. (voir
4 %%  http://members.aol.com/Mluque5130/). Merci à eux
5 /uselabo {} def
6
7 /aspectLiquides [] def
8 /niveauLiquides [] def
9 /Solides [] def
10 /Gazs [] def
11 /Tubes [] def
12
13 /linewidth .5 def
14
15 /m@depl@n true def
16 /mode2D {
17    /m@depl@n true store
18 } def
19 /mode3D {
20    /m@depl@n false store
21 } def
22
23 /b@uch@n false def
24 /withbouchon {
25    /b@uch@n true store
26 } def
27 /withoutbouchon {
28    /b@uch@n false store
29 } def
30
31 %% liste des problemes a resoudre :
32 %%    * les pscustom
33 %%    * les psclip
34 %%    * les linestyle=none
35
36 /Beige {0.96 0.96 0.86 setrgbcolor}  def
37 /GrisClair {0.8 0.8 0.8 setrgbcolor}  def
38 /GrisTresClair {0.9 0.9 0.9 setrgbcolor}  def
39 /OrangeTresPale {0 0.1 0.3 0 setcmykcolor} def
40 /OrangePale {0 0.2 0.4 0 setcmykcolor} def
41 /BleuClair {0.2 0 0 0 setcmykcolor} def
42 /LightBlue {.68 .85 .9 setrgbcolor}  def
43 /Copper {0 0.9 0.9 0.2 setcmykcolor} def
44 /Marron {0 0.3 0.5 .3 setcmykcolor} def
45
46 /le_max 2 31 exp 1 sub def
47 /relax_dim {0 0 0 0} def
48 /relax {} def
49
50 /RobinetTube_dim {
51    -.3 -.35 jtoppoint
52    .3 .35 jtoppoint
53 } def
54
55 /RobinetTube {
56 gsave
57 currentpoint translate
58 2 dict begin
59    /fillstyle {.6 setgray fill} def
60    /linearc .05 def
61    [-0.3 0.35 0.3 0.35 0.3 0.2 0.1 0.2
62    0.1 -0.35 -0.1 -0.35 -0.1 0.2 -0.3 0.2 -0.3 0.3] polygone*
63 end
64 grestore
65 } def
66
67 /oeil_dim {
68    -2 -1 jtoppoint
69    0 1 jtoppoint
70 } def
71
72 /oeil {
73 gsave
74 currentpoint translate
75 1 dict begin
76    0 2.5 2.5 215 270 sarc
77    0 -2.5 2.5 90 140 sarc
78    -2.5 0 1 -30 30 sarc
79    0 0 1.75 160 200 sarc
80    newpath
81       0 0 smoveto
82       0 0 1.75 cercle_
83       /fillstyle {.5 setgray fill} def
84    clip
85    -2.5 0 0.9 cercle*
86 end
87 grestore
88 } def
89
90 /Boulon_dim {
91    -.2 -.2 jtoppoint
92    .2 .2 jtoppoint
93 } def
94
95 /Boulon {
96 gsave
97 currentpoint translate
98 1 dict begin
99    /fillstyle {.8 setgray fill} def
100    0 0 .2 cercle*
101    [0.15 60 0.15 120 0.15 180 0.15 240 0.15 300 0.15 360] {polcar} papply polygone
102 end
103 grestore
104 } def
105
106 /Supportboy_dim {
107 1 dict begin
108    3 copy
109    pop pop
110    7.3 min /h exch def
111    -2.75 0 jtoppoint
112    2.75 h jtoppoint
113 end
114 } def
115
116 %% d'apres une idee et un code original de Manuel Luque
117 %% http://melusine.eu.org/syracuse/mluque/transformations_geometriques_beta2/
118 /Supportboy {
119 gsave
120 currentpoint translate
121 18 dict begin
122
123    /vis_supportboy_dic 1 dict def
124    vis_supportboy_dic /pointfixe {-1.5 0} put
125    
126    /vis_supportboy_dim {
127       -2.5 -.75 jtoppoint
128       3 .75 jtoppoint
129    } def
130    
131    /vis_supportboy {
132    gsave
133    currentpoint translate
134    1 dict begin
135       -2.5 -0.1 2.5 0.1 frame
136       /fillstyle {
137          /hangle 45 store
138          /hstep 5 store
139          hachure
140          /hangle 135 store
141          hachure
142       } def
143       2.5 -0.75 3 0.75 frame*
144       /fillstyle {
145          /hangle 60 store
146          /hstep 3 store
147          hachure
148       } def
149       -1 -0.1 2 0.1 frame*
150    end
151    grestore
152    } def
153
154    /axe_dim {
155       -.15 -.15 jtoppoint
156       .15 .15 jtoppoint
157    } def
158    
159    /axe {
160    gsave
161    currentpoint translate
162    1 dict begin
163       /fillstyle {.8 setgray fill} def
164       0 0 .15 cercle*
165    end
166    grestore
167    } def
168    
169    /languette_supportboy_dic 2 dict def
170    languette_supportboy_dic /oeildroit {1.75 .25} put
171    languette_supportboy_dic /oeilgauche {-1.75 .25} put
172    
173    /languette_supportboy_dim {
174       -2 0 jtoppoint
175       2 .5 jtoppoint
176    } def
177    
178    /languette_supportboy {
179    gsave
180    currentpoint translate
181    2 dict begin
182       /fillstyle {.6 setgray fill} def
183       /linearc .25 def
184       -2 0 2 .5 frame*
185    end
186    grestore
187    } def
188    
189    /basesupportboy_dim {
190       -2 0 jtoppoint
191       2 .5 jtoppoint
192    } def
193    
194    /basesupportboy_dic 1 dict def
195    basesupportboy_dic /oeil {-1.75 .25} put
196    
197    /basesupportboy {
198    gsave
199    currentpoint translate
200       newpath
201          0 .25 stranslate
202          %% le tour
203          -2 -.25 smoveto
204          -2 .25 slineto
205          2 .25 slineto
206          2 -.25 slineto
207          -2 -.25 slineto
208      
209          %% la fente ajouree
210          -0.95 0.15 smoveto
211          -0.95 0 0.15 90 270 sarc_
212          [-0.8 -0.15 1.7 -0.15] ligne_
213          1.7 0 0.15 -90 90 sarc_
214       closepath
215       gsave
216          .6 setgray fill
217       grestore
218       stroke
219    grestore
220    } def
221
222    7.3 min /h exch def
223    h .5 sub 7 div arcsin /inclinaison exch def
224    
225    /point1 {-1.75 .25} def
226    point1 inclinaison cos 3.5 mul 0 addv /point2 defpoint
227    point2 inclinaison sin 3.5 mul add /point5 defpoint
228    point1 point5 milieu /point3 defpoint
229    point1 inclinaison sin 3.5 mul add /point4 defpoint
230    point4 inclinaison sin 3.5 mul add /point7 defpoint
231    point5 point7 milieu /point6 defpoint
232    
233    point4 (vis_supportboy) /pointfixe spict
234    point1 {inclinaison} (languette_supportboy) /oeilgauche spict
235    point3 {inclinaison neg} (languette_supportboy) ccpict
236    point3 {inclinaison neg} (languette_supportboy) ccpict
237    point5 {inclinaison neg} (languette_supportboy) /oeildroit spict
238    point6 {inclinaison} (languette_supportboy) ccpict
239    /oeildroit pictget /point8 defpoint
240    point7 (basesupportboy) /oeil spict
241    0 0 (basesupportboy) bbpict
242    
243    %% on pose les boulons et les axes
244    point1 (Boulon) ccpict
245    point2 (axe) ccpict
246    point3 (Boulon) ccpict
247    point4 (Boulon) ccpict
248    point5 (Boulon) ccpict
249    point6 (Boulon) ccpict
250    point7 (Boulon) ccpict
251    point8 (axe) ccpict
252
253 end
254 grestore
255 } def
256
257 /Manometre_dim {
258    -1 -1 jtoppoint
259    1 1 jtoppoint
260 } def
261
262 /Manometre_dic 5 dict def
263 Manometre_dic /Connect {0 -1} put
264
265 /Manometre {
266 gsave
267 currentpoint translate
268 3 dict begin
269    /position exch def
270    /fillstyle {blanc fill} def
271    0 0 1 cercle
272    0 0 .9 cercle*
273    0 0 0.65 -60 240 sarc
274    /i -60 def
275    11 {
276       [.65 i polcar .45 i polcar] ligne
277       /i i 30 add store
278    } repeat
279    2 dict begin
280       2 currentlinewidth mul setlinewidth
281       /arrowscale {1.2 dup} def
282       [0.5 position 180 sub polcar 0.65 position polcar] (->) ligne
283    end
284    O .1 cercle*
285 end
286 grestore
287 } def
288
289 %% \newdimen{\FilamentWidth}
290 %%
291 %% \newcommand{\Filaments}[2][5]{%
292 %% \multido{\iFilament=1+1}{#1}{%
293 %% \setrandim{\FilamentWidth}{0pt}{0.05pt}
294 %% \rput{\psk@TubeEssais@tubePenche}{%
295 %% \pscustom[linewidth=\pointless\FilamentWidth,linecolor=#2]{%
296 %% \code{/MyRand rand 2 31 exp div def} \pscurve(! MyRand 1 sub MyRand 2 mul 1
297 %% sub) (! MyRand 0.2 add MyRand 2 add)(! MyRand MyRand 1 sub)(! MyRand 0.5 add
298 %% MyRand 4 add)}}}}
299
300 /Clous {
301 gsave
302 9 dict begin
303    /n exch def
304    /uuy exch def
305    /uux exch def
306    /lly exch def
307    /llx exch def
308    /L uux llx sub def
309 %% {\psset{linecolor=blue} \psarc[linewidth=0.1](0,0.5){.4}{190}{260}
310 %% \psline(-0.28,0.2)(0.5,1)}}
311 %%
312 %% \newdimen\ClouX
313 %% \newdimen\ClouY
314 %% \newcount\AngleRotation
315 %% \newcommand{\Clous}[1][60]{%
316    n {
317       /ClouX rand 2 31 exp 1 sub div L mul llx add def
318       /ClouY rand 2 31 exp 1 sub div .6 mul lly add def
319       /AngleRotation rand 2 31 exp 1 sub div 180 mul 90 sub def
320       gsave
321          ClouX ClouY stranslate
322          AngleRotation rotate
323          .5 dup scale
324          1 1 1 1 ClouFer
325       grestore
326    } repeat
327 end
328 grestore
329 } def
330
331 /Zinc {
332 gsave
333 9 dict begin
334    /n exch def
335    /uuy exch def
336    /uux exch def
337    /lly exch def
338    /llx exch def
339    /L uux llx sub def
340    n {
341       /GrenailleX rand 2 31 exp 1 sub div L mul llx add def
342       /GrenailleY rand 2 31 exp 1 sub div .5 mul lly add def
343       /AngleRotation rand 2 31 exp 1 sub div 369 mul 180 sub def
344       gsave
345          GrenailleX GrenailleY stranslate
346          AngleRotation rotate
347          .5 dup scale
348          1 1 1 1 GrenailleZinc
349       grestore
350    } repeat
351 end
352 grestore
353 } def
354
355 /Cuivre {
356 gsave
357 9 dict begin
358    /n exch def
359    /uuy exch def
360    /uux exch def
361    /lly exch def
362    /llx exch def
363    /L uux llx sub def
364    n {
365       /TournureX rand 2 31 exp 1 sub div L mul llx add def
366       /TournureY rand 2 31 exp 1 sub div .5 mul lly add def
367       /AngleRotation rand 2 31 exp 1 sub div 360 mul 180 sub def
368       gsave
369          TournureX TournureY stranslate
370          AngleRotation rotate
371          .5 dup scale
372          1 1 1 1 TournureCuivre     
373       grestore
374    } repeat
375 end
376 grestore
377 } def
378
379 /Filaments {
380 gsave
381 9 dict begin
382    /n exch def
383    /uuy exch def
384    /uux exch def
385    /lly exch def
386    /llx exch def
387    /H uuy lly sub def
388    /L uux llx sub def
389    /arg {argc} def
390    /MyRand {rand le_max div} def
391    0 -1.5 stranslate
392    llx lly uux uuy milieu stranslate
393    L 6 div H 7 div scale
394    n {
395       /FilamentWidth rand le_max div 5 mul def
396       FilamentWidth setlinewidth
397       [MyRand 1 sub MyRand 2 mul 1 sub .. MyRand 0.2 add MyRand 2 add
398       .. MyRand MyRand 1 sub .. MyRand 0.5 add MyRand 4 add] draw
399    } repeat
400 grestore
401 } def
402
403 %-2 -2 3 3 10 Filaments
404
405 /TournureCuivre {
406 1 dict begin
407 gsave
408    pop pop pop pop
409 %   Copper
410    1 setlinewidth
411    [.25 0.25 0 0 -0.25 .25 0.25 0.75 0 .5 -0.25 0.75 0.25 1.25 0 1
412    -0.25 1.25 0.25 1.75] bezier_curve
413 grestore
414 end
415 } def
416
417 %TournureCuivre
418
419 /ClouFer {
420 %% \rput{\psk@TubeEssais@tubePenche}{{\psset{linecolor=blue}
421 1 dict begin
422 gsave
423 %   bleu
424    pop pop pop pop
425    0 0.5 .4 190 260 sarc
426    1 setlinewidth
427    [-0.28 0.2 0.5 1] ligne
428 grestore
429 end
430 } def
431
432 %ClouFer
433
434 /GrenailleZinc {
435 pop pop pop pop
436 1 dict begin
437 gsave
438    GrisClair
439 %%   [0 0 .. -0.25 0.25 .. 0 .5 .. 0.25 0.75 .. 0.5 0.5 .. 0.15 0.4 .. 0 0] draw
440    /fillstyle {GrisClair fill} def
441    [0   0   -0.151479   -0.0395512   -0.289551   0.0985209   -0.25   0.25
442    -0.218889   0.369153   -0.0871553   0.416129   0   0.5 0.0864664
443    0.583208   0.134834   0.710268   0.25   0.75   0.428504 0.811584
444    0.580305   0.638883   0.5   0.5   0.433004   0.384134 0.272038
445    0.436138   0.15   0.4   -0.0204054   0.34954   -0.0952084 0.150065   0
446    0] bezier_curve*
447 grestore
448 end
449 } def
450
451 %GrenailleZinc
452
453 /FioleJauge_ {
454 1 dict begin
455    [-0.21 3.5 -0.1 3.5 -0.1 1.5 -0.75 0 0.75 0 0.1 1.5 0.1 3.5 0.21 3.5 ] ligne_
456 end
457 } def
458
459 /FioleJauge_dim {
460    -.75 0 jtoppoint
461    .75 3.5 jtoppoint
462 } def
463
464 /FioleJauge_dic 5 dict def
465 FioleJauge_dic /bb {0 0} put
466
467 /FioleJauge {
468 gsave
469 currentpoint translate
470 1 dict begin
471    newpath
472       -.21 3.5 smoveto
473       FioleJauge_
474       gsave
475          clip
476          -.75 0 .75 3.5 afficheLiquides
477          -.75 0 .75 3.5 afficheSolides
478          -.75 0 .75 3.5 afficheGazs
479       grestore
480     stroke
481    gsave
482       currentlinewidth .3 mul setlinewidth
483       [-0.1 2.5 0.1 2.5] ligne
484    grestore
485 %   0 3.5 stranslate
486    3.5 afficheBouchage
487    3.5 afficheTubes
488 end
489 grestore
490 } def
491
492 /Bicol_ {
493 1 dict begin
494    [-0.7 2.7 -0.5 2.5 -0.5 1.5] ligne_
495    0 0 1.58114 108.435 71.565 sarc_
496    [0.5 1.5 0.5 2.5 0.7 2.7 ] ligne_
497 end
498 } def
499
500 /Bicol_dim {
501    -1.58 0 jtoppoint
502    1.58 4.28 jtoppoint
503 } def
504
505 /Bicol_dic 5 dict def
506 Bicol_dic /bb {0 0} put
507 Bicol_dic /col {0 3.8} put
508 Bicol_dic /trou {0 4.28} put
509 Bicol_dic /trou1 {-.2 4.28} put
510 Bicol_dic /trou2 {.2 4.28} put
511 Bicol_dic /trou1g {-1.55563 2.85279} put
512 Bicol_dic /troug {-1.41421 2.99421} put
513 Bicol_dic /trou2g {-1.27279 3.13563} put
514 %%
515 %% /Bicol {
516 %% gsave
517 %% currentpoint translate
518 %% 0 1.58 stranslate
519 %% 1 dict begin
520 %%    gsave
521 %%    newpath
522 %%       -.7 2.7 smoveto
523 %%       Bicol_
524 %%       gsave
525 %%          clip
526 %%          -1.58 -1.58 1.58 2.6 afficheLiquides
527 %%          -1.58 -1.58 1.58 2 afficheSolides
528 %%          -1.58 -1.58 1.58 2.6 afficheGazs
529 %%       grestore
530 %%       stroke
531 %%    grestore
532 %%    gsave
533 %%    45 rotate
534 %%    newpath
535 %%          -0.7 2.2 smoveto
536 %%          [-0.7 2.2 -0.5 1.8 -0.5 1.5 0.5 1.5 0.5 1.8 0.7 2.2] ligne_
537 %%          blanc fill
538 %%    grestore
539 %%    gsave
540 %%    45 rotate
541 %%       [-0.7 2.2 -0.5 2 -0.5 1.5] ligne
542 %%       [0.7 2.2 0.5 2 0.5 1.5] ligne
543 %%    grestore
544 %%    .8 setlinewidth
545 %%    m@depl@n
546 %%       {}
547 %%       {0 2.7 0.7 0.1 ellipse}
548 %%    ifelse
549 %%    0 -.9 stranslate
550 %%    3.5 afficheTubes
551 %% %   afficheBouchage
552 %% end
553 %% grestore
554 %% } def
555
556
557 /Bicol {
558 gsave
559 currentpoint translate
560 0 1.58 stranslate
561 1 dict begin
562    gsave
563    newpath
564       -.7 2.7 smoveto
565       Bicol_
566       gsave
567          clip
568          -1.58 -1.58 1.58 2.6 afficheLiquides
569          -1.58 -1.58 1.58 2 afficheSolides
570          -1.58 -1.58 1.58 2.6 afficheGazs
571       grestore
572       stroke
573    grestore
574    gsave
575    45 rotate
576    newpath
577          -0.7 2.2 smoveto
578          [-0.7 2.2 -0.5 1.8 -0.5 1.5 0.5 1.5 0.5 1.8 0.7 2.2] ligne_
579          blanc fill
580    grestore
581    gsave
582    45 rotate
583       [-0.7 2.2 -0.5 2 -0.5 1.5] ligne
584       [0.7 2.2 0.5 2 0.5 1.5] ligne
585    grestore
586    .8 setlinewidth
587    m@depl@n
588       {}
589       {0 2.7 0.7 0.1 ellipse}
590    ifelse
591    %% on annule la translation en cours
592    0 -1.58 stranslate
593    4.18 afficheBouchage
594    4.18 afficheTubes
595    gsave
596       -1.41421 2.99421 stranslate
597       45 rotate
598       0 afficheBouchage
599    grestore
600 end
601 grestore
602 } def
603
604 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ù
605
606 /Tricol_ {
607 1 dict begin
608    [-0.7 2.7 -0.5 2.5 -0.5 1.5] ligne_
609    0 0 1.58114 108.435 71.565 sarc_
610    [0.5 1.5 0.5 2.5 0.7 2.7 ] ligne_
611 end
612 } def
613
614 /Tricol_dim {
615    -1.58 0 jtoppoint
616    1.58 4.28 jtoppoint
617 } def
618
619 /Tricol_dic 6 dict def
620 Tricol_dic /bb {0 0} put
621 Tricol_dic /col {0 3.8} put
622 Tricol_dic /trou {0 4.28} put
623 Tricol_dic /trou1 {-.2 4.28} put
624 Tricol_dic /trou2 {.2 4.28} put
625 Tricol_dic /trou1g {-1.55563 2.85279} put
626 Tricol_dic /troug {-1.41421 2.99421} put
627 Tricol_dic /trou2g {-1.27279 3.13563} put
628 Tricol_dic /trou1d {1.27279 3.13563} put
629 Tricol_dic /troud {1.41421 2.99421} put
630 Tricol_dic /trou2d{1.55563 2.85279} put
631  
632
633 /Tricol {
634 gsave
635 currentpoint translate
636 0 1.58 stranslate
637 1 dict begin
638    currentlinewidth setlinewidth
639    newpath
640       -.7 2.7 smoveto
641       Tricol_
642       gsave
643          clip
644          -1.58 -1.58 1.58 2.6 afficheLiquides
645          -1.58 -1.58 1.58 2 afficheSolides
646          -1.58 -1.58 1.58 2.6 afficheGazs
647       grestore
648       stroke
649    gsave
650       45 rotate
651       newpath
652          -0.7 2.2 smoveto
653          [-0.7 2.2 -0.5 1.8 -0.5 1.5 0.5 1.5 0.5 1.8 0.7 2.2] ligne_
654       blanc fill
655    grestore
656    gsave
657       45 rotate
658       [-0.7 2.2 -0.5 2 -0.5 1.5] ligne
659       [0.7 2.2 0.5 2 0.5 1.5] ligne
660    grestore
661    gsave
662       -45 rotate
663       newpath
664          -0.7 2.2 smoveto
665          [-0.7 2.2 -0.5 1.8 -0.5 1.5 0.5 1.5 0.5 1.8 0.7 2.2] ligne_
666       blanc fill
667    grestore
668    gsave
669       -45 rotate
670       [-0.7 2.2 -0.5 2 -0.5 1.5] ligne
671       [0.7 2.2 0.5 2 0.5 1.5] ligne
672    grestore
673    .8 setlinewidth
674    m@depl@n
675       {}
676       {0 2.7 0.7 0.1 ellipse}
677    ifelse
678    %% on annule la translation en cours
679    0 -1.58 stranslate
680    4.18 afficheBouchage
681    4.18 afficheTubes
682 end
683 grestore
684 } def
685
686 /Ampoule_ {
687    [0.1 0 0.1 1.5 0.5 1.8
688    0.5 3.5 0.6 3.6 -0.6 3.6
689    -0.5 3.5 -0.5 1.8 -0.1 1.5
690    -0.1 0] ligne_
691 } def
692
693
694 /Ampoule_dim {
695    -.6 0 jtoppoint
696    .6 3.6 jtoppoint
697 } def
698
699 /Ampoule_dic 5 dict def
700 Ampoule_dic /bb {0 0} put
701 Ampoule_dic /In {0 0} put
702 Ampoule_dic /ConnectIn {0 .5} put
703 Ampoule_dic /Out {0 3.6} put
704
705 /Ampoule {
706 gsave
707 currentpoint translate
708 1 dict begin
709    newpath
710       .1 0 smoveto
711       Ampoule_
712       gsave
713          clip
714          -.6 0 .6 3.6 afficheLiquides
715          -.6 0 .6 3.6 afficheSolides
716          -.6 0 .6 3.6 afficheGazs
717       grestore
718    currentlinewidth setlinewidth
719    stroke
720 %   0 3.5 stranslate
721    3.5 afficheTubes
722    3.5 afficheBouchage
723 end
724 grestore
725 } def
726
727 /RebordBecher {
728 1 dict begin
729    .53 setlinewidth
730    0 2.55 1.1 .1 ellipse
731    .3 setlinewidth
732    /nDiv .5 def
733    4 {
734    [-.75 nDiv -.4 nDiv] ligne
735       /nDiv .5 nDiv add store
736    } repeat
737    .2 setlinewidth
738    /nSubDiv .5 def
739    16 {
740    [-0.75 nSubDiv -.5 nSubDiv] ligne
741       /nSubDiv .1 nSubDiv add store
742    } repeat
743 end
744 } def
745  
746 /Becher_ {
747    [-1 2.5 -1 0 1 0 1 2.5] ligne_
748 } def
749
750 /Becher_dic 5 dict def
751 Becher_dic /bb {0 0} put
752
753 /Becher_dim {
754    -1 0 jtoppoint
755    1 2.5 jtoppoint
756 } def
757
758 /Becher {
759 gsave
760 currentpoint translate
761 2 dict begin
762    /linearc .5 def
763    newpath
764       -1 2.5 smoveto
765       Becher_
766       gsave
767          clip
768          -1 0 1 2.5 afficheLiquides
769          -1 0 1 2.5 afficheSolides
770          -1 0 1 2.5 afficheGazs
771        grestore
772    stroke
773    m@depl@n not
774       {RebordBecher}
775    if
776    3 afficheTubes
777 %   3 afficheBouchage
778 end
779 grestore
780 } def
781
782 /Erlen_ {
783    [-0.5 3.5 -0.5 2.5 -1.5 0 1.5 0 0.5 2.5 0.5 3.5] ligne_
784 } def
785  
786 /Erlen_dim {
787   -1.5 0 jtoppoint
788    1.5 3.5 jtoppoint
789 } def
790
791 /Erlen_dic 6 dict def
792 Erlen_dic /bb {0 0} put
793 Erlen_dic /col {0 2.8} put
794 Erlen_dic /trou {0 3.6} put
795 Erlen_dic /trou1 {-.2 3.6} put
796 Erlen_dic /trou2 {.2 3.6} put
797
798 /Erlen {
799 gsave
800 currentpoint translate
801 2 dict begin
802    currentlinewidth setlinewidth
803    /linearc .5 def
804    newpath
805       -.5 3.5 smoveto
806       Erlen_
807       gsave
808          clip
809          -1.5 0 1.5 3.5 afficheLiquides
810          -1.5 0 1.5 3.5 afficheSolides
811          -1.5 0 1.5 3.5 afficheGazs
812        grestore
813    stroke
814    /linearc 0 store
815 %   0 3.5 stranslate
816    3.5 afficheBouchage
817    3.5 afficheTubes
818 end
819 grestore
820 } def
821  
822 /TrompeEau_ {
823    [-0.5 3.5 -0.5 2.5 -1.5 0 1.5 0 0.5 2.5] ligne_
824    /linearc .05 def
825    [.5 2.9 1.5 2.9] ligne_
826    [1.5 3 .5 3 0.5 3.5] ligne_
827 } def
828  
829 /TrompeEau_dim {
830   -1.5 0 jtoppoint
831    1.5 3.5 jtoppoint
832 } def
833
834 /TrompeEau_dic 6 dict def
835 TrompeEau_dic /bb {0 0} put
836 TrompeEau_dic /trou {0 3.6} put
837 TrompeEau_dic /trou1 {-.2 3.6} put
838 TrompeEau_dic /trou2 {.2 3.6} put
839 TrompeEau_dic /Sortie {1.5 2.95} put
840
841 /TrompeEau {
842 gsave
843 currentpoint translate
844 2 dict begin
845    currentlinewidth setlinewidth
846    /linearc .25 def
847    newpath
848       -.5 3.5 smoveto
849       TrompeEau_
850       gsave
851          clip
852          -1.5 0 1.5 3.5 afficheLiquides
853          -1.5 0 1.5 3.5 afficheSolides
854          -1.5 0 1.5 3.5 afficheGazs
855        grestore
856    stroke
857    /linearc 0 store
858 %   0 3.5 stranslate
859    3.5 afficheBouchage
860    3.5 afficheTubes
861 end
862 grestore
863 } def
864
865 %% \def\pst@TubeEssais@Corps{{%
866 %% \psset{linewidth=0.053}
867 %% \psline(-0.5,3.5)(-0.5,0.5)
868 %% \psarc(0,0.5){0.5}{180}{0}
869 %% \psline(0.5,0.5)(0.5,3.5)
870 %% \psellipse[linewidth=0.08](0,3.5)(0.5,0.1)}}
871
872 /Flacon_ {
873    -0.6 3.4 0.1 90 0 sarcn_
874    [-0.5 3.4 -0.5 3.1] ligne_
875    -0.6 3.1 0.1 0 -90 sarcn_
876    -0.6 2.6 0.4 90 180 sarc_
877    [-1 2.6 -1 0.2] ligne_
878    -.8 0.2 0.2 180 270 sarc_
879    [-.8 0 .8 0] ligne_
880    .8 0.2 0.2 -90 0 sarc_
881    [1 0.2 1 2.6] ligne_
882    0.6 2.6 0.4 0 90 sarc_
883    0.6 3.1 0.1 -90 180 sarcn_
884    [0.5 3.1 0.5 3.4] ligne_
885    0.6 3.4 0.1 180 90 sarcn_
886 } def
887
888 /Flacon_dim {
889    -1 0 jtoppoint
890    1 3.5 jtoppoint
891 } def
892
893 /Flacon_dic 5 dict def
894 Flacon_dic /bb {0 0} put
895 Flacon_dic /trou {0 3.6} put
896 Flacon_dic /trou1 {-.2 3.6} put
897 Flacon_dic /trou2 {.2 3.6} put
898
899 /Flacon {
900 gsave
901 currentpoint translate
902 1 dict begin
903    currentlinewidth setlinewidth
904    newpath
905       -.6 3.5 smoveto
906       Flacon_
907       gsave
908          clip
909          -1 0 1 3.5 afficheLiquides
910          -1 0 1 3.5 afficheSolides
911          -1 0 1 3.5 afficheGazs
912        grestore
913    stroke
914 %   0 3.5 stranslate
915    3.5 afficheBouchage
916    3.5 afficheTubes
917 end
918 grestore
919 } def
920  
921 %Interieur@TubeEssais@Corps
922
923 /afficheBouchage {
924 1 dict begin
925    /y exch def
926    dsave1
927       b@uch@n {0 y (Bouchon) bbpict} if
928    drestore1
929 end
930 } def
931
932 /afficheTubes {
933 7 dict begin
934    /y exch def
935    dsave1
936    /n Tubes length def
937    %% il y a 1 seul tube
938    n 1 eq
939       {
940          0 y
941          Tubes 0 get
942          dup xcheck
943             {exec}
944          if
945          bbpict
946       }
947    if
948    %% il y a 2 tubes
949    n 2 eq
950       {
951          -.2 y
952          Tubes 0 get
953          dup xcheck
954             {exec}
955          if
956          bbpict
957          dsave2
958          .2 y
959          Tubes 1 get
960          dup xcheck
961             {exec}
962          if
963          bbpict
964          drestore2
965       }
966    if
967    drestore1
968 end
969 } def
970
971 %% syntaxe : llx lly uux uuy afficheGazss
972 /afficheGazs {
973 16 dict begin
974    niveauLiquides length 0 ne {
975       /angle_rot where
976          {pop}
977          {/angle_rot 0 def}
978       ifelse
979       /uuy exch def
980       /uux exch def
981       /lly exch def
982       /llx exch def
983       /les_points
984          [llx lly llx uuy uux lly uux uuy]
985          {0 0 angle_rot rotatepoint} papply
986       def
987       /H les_points 3 get les_points 1 get sub def
988       /nlx
989          les_points 0 get les_points 2 get min
990          les_points 4 get les_points 6 get min
991          min
992       def
993       /nly
994          les_points 1 get les_points 3 get min
995          les_points 5 get les_points 7 get min
996          min                               
997       def                                         
998       /nux                                 
999          les_points 0 get les_points 2 get max
1000          les_points 4 get les_points 6 get max
1001          max
1002       def
1003       /nuy
1004          les_points 1 get les_points 3 get max
1005          les_points 5 get les_points 7 get max
1006          max
1007       def
1008       gsave
1009          angle_rot neg rotate
1010          /i 0 def
1011          Gazs length {
1012             newpath
1013                nlx nly smoveto
1014                nlx nly
1015                nux niveauLiquides dup length 1 sub 0 max get H mul 100 div nly add frame_
1016             clip
1017          gsave
1018             angle_rot 2 div rotate
1019 %           llx lly uux uuy Gazs i get exec
1020             nlx nly nux nuy Gazs i get exec
1021          grestore
1022             /i i 1 add store
1023          } repeat
1024       grestore
1025    }
1026       {pop pop pop pop}
1027    ifelse
1028 end
1029 } def
1030
1031 %% syntaxe : llx lly uux uuy afficheSolides
1032 /afficheSolides {
1033 6 dict begin
1034    /uuy exch def
1035    /uux exch def
1036    /lly exch def
1037    /llx exch def
1038    /n Solides length def
1039    /i 0 def
1040    n {
1041       gsave
1042          llx lly uux uuy Solides i get exec
1043       grestore
1044       /i i 1 add store
1045    } repeat
1046 end
1047 } def
1048
1049 %% syntaxe : llx lly uux uuy afficheLiquides
1050 /afficheLiquides {
1051 16 dict begin
1052    niveauLiquides length 0 ne {
1053       /angle_rot where
1054          {pop}
1055          {/angle_rot 0 def}
1056       ifelse
1057       /uuy exch def
1058       /uux exch def
1059       /lly exch def
1060       /llx exch def
1061       /les_points
1062          [llx lly llx uuy uux lly uux uuy]
1063          {0 0 angle_rot rotatepoint} papply
1064       def
1065       /H les_points 3 get les_points 1 get sub def
1066       /nlx
1067          les_points 0 get les_points 2 get min
1068          les_points 4 get les_points 6 get min
1069          min
1070       def
1071       /nly
1072          les_points 1 get les_points 3 get min
1073          les_points 5 get les_points 7 get min
1074          min                               
1075       def                                         
1076       /nux                                 
1077          les_points 0 get les_points 2 get max
1078          les_points 4 get les_points 6 get max
1079          max
1080       def
1081       /nuy
1082          les_points 1 get les_points 3 get max
1083          les_points 5 get les_points 7 get max
1084          max
1085       def
1086
1087       gsave
1088          angle_rot neg rotate
1089          /i niveauLiquides length 1 sub def
1090          niveauLiquides length {
1091             newpath
1092                nlx nly smoveto
1093                nlx nly
1094                nux niveauLiquides i get H mul 100 div nly add frame_
1095 %           clip
1096             [
1097                aspectLiquides i get exec
1098             counttomark 0 eq {
1099                fill pop
1100             } {
1101                gradientfill pop
1102             } ifelse
1103             /i i 1 sub store
1104          } repeat
1105          %% affichage du niveau
1106          currentlinewidth .5 mul setlinewidth
1107          noir
1108          /j niveauLiquides length 1 sub def
1109          m@depl@n
1110             {
1111               newpath
1112                   [nlx niveauLiquides j get H mul 100 div nly add
1113                   dup nux exch] ligne
1114               stroke
1115             }
1116             {}
1117          ifelse
1118       grestore
1119    }
1120       {pop pop pop pop}
1121    ifelse
1122 end
1123 } def
1124
1125 /dosage@support {
1126 1 dict begin
1127 gsave
1128    -1.5 0 1.5 1.5 frame
1129    -1.30 0.25 -0.70 1.25 frame
1130    -1.20 0.35 -0.80 1.15 frame
1131    1 0.75 0.20 cercle
1132    1 0.75 0.30 cercle
1133    /fillstyle {rouge fill} def
1134    0 0.75 0.2 cercle*
1135 grestore
1136 end
1137 } def
1138
1139 /dosage@aimant {
1140 2 dict begin
1141    /linearc .05 def
1142    /fillstyle {blanc fill} def
1143    -0.5 0.1 0.5 0.4 frame*
1144    -0.05 0 0.05 0.5 frame*
1145 end
1146 } def
1147  
1148 /AgitateurMagnetique_dim {
1149    -1.5 0 jtoppoint
1150    1.5 2 jtoppoint
1151 } def
1152
1153 /AgitateurMagnetique {
1154 gsave
1155    currentpoint translate
1156    gsave
1157       0 1.5 stranslate
1158       dosage@aimant
1159    grestore
1160    dosage@support
1161 grestore
1162 } def
1163
1164 /pHmetre_dim {
1165    -1 0 jtoppoint
1166    2.75 5 jtoppoint
1167 } def
1168
1169 /pHmetre {
1170 2 dict begin
1171 gsave
1172    currentpoint translate
1173    % boitier   
1174    1 dict begin
1175       /linearc .25 def
1176       -1 0 1 3 frame
1177    end
1178    /fillstyle {GrisClair fill} def
1179    -0.75 2 0.75 2.75 frame*
1180    gsave
1181    blanc
1182    setTimes
1183       (PH) 0 2.375 cctext
1184    grestore
1185    0 1.25 0.3 cercle
1186    [0 1.25 0 1.5] (->) ligne
1187 %% \rput(0.65,1.5){$^\circ$C}%
1188    -0.5 0.5 0.2 cercle
1189    0.5 0.5 0.2 cercle
1190     % électrode
1191    1 dict begin
1192       /linearc .25 def
1193       2.25 2.5 2.75 4.5 frame
1194    end
1195    2.25 4 2.75 4.5 frame*
1196    2.5 2.25 0.25 cercle
1197    % fil
1198    /linearc .4 def
1199    1 setlinewidth
1200    LightBlue
1201    [2.5 4.5 2.5 5 1.25 4.75 0 5 0 3] ligne
1202 grestore
1203 end
1204 } def
1205  
1206 /vumetre {
1207 gsave
1208 6 dict begin
1209    /fillstyle {blanc fill} def
1210    -2 0 2 2.2 frame*
1211    /fillstyle {rouge fill} def
1212    [-.1 .1 .1 .1 0 1.8] polygone*
1213    /angled 45 def
1214    /anglef 135 def
1215    angled anglef 0 0 2 Cercle
1216    /n 10 def
1217    /step anglef angled sub n 1 sub div def
1218    /i step def
1219    angled 0 0 2 cpoint
1220    angled 0 0 1.8 cpoint 1 trait
1221    anglef 0 0 2 cpoint
1222    anglef 0 0 1.8 cpoint 1 trait
1223    n 2 sub {
1224       angled i add 0 0 2 cpoint
1225       angled i add 0 0 1.9 cpoint
1226       1 trait
1227       /i step i add store
1228    } repeat
1229    newpath
1230       .4 0 smoveto
1231       0 0 .4 0 180 sarc_
1232       .4 setgray
1233    fill
1234 grestore
1235 end
1236 } def
1237
1238 /bouton {
1239 gsave
1240 1 dict begin
1241    -1.25 -.25 stranslate
1242    /fillstyle {gris fill} def
1243    1 0 1.5 0.5 frame
1244    1.1 0.1 1.4 0.4 frame*
1245 end
1246 grestore
1247 } def
1248
1249 /electrodeConductimetre {
1250 gsave
1251 3 dict begin
1252    /fillstyle {bleu fill} def
1253    /borderline false def
1254    -.15 0 .15 .5 frame*
1255    currentlinewidth .5 mul setlinewidth
1256    [-.05 .5 -.1 3] ligne
1257    [.05 .5 .1 3] ligne
1258    .4 dup jtoppoint pop setlinewidth
1259    /linearc .5 def
1260    .4 setgray
1261    [-1.5 4 0 4 0 3] ligne
1262 end
1263 grestore
1264 } def
1265
1266 /Conductimetre_dim {
1267    -2 0 jtoppoint
1268    5.2 7.2 jtoppoint
1269 } def
1270
1271 /Conductimetre_dic 2 dict def
1272 Conductimetre_dic /Cellule {4 2.25} put
1273 Conductimetre_dic /bb {0 0} put
1274
1275 /Conductimetre {
1276 3 dict begin
1277 gsave
1278 currentpoint translate
1279    /fillstyle {blanc fill} def
1280    -1.5 0 1.5 2 frame*
1281    gsave
1282       -1 1.25 stranslate
1283       .8 dup scale
1284       potentiometre
1285    grestore
1286    gsave
1287       -1 .5 stranslate
1288       bouton
1289    grestore
1290    gsave
1291       .5 .8 stranslate
1292       .4 dup scale
1293       vumetre
1294    grestore
1295    gsave
1296       4 2 stranslate
1297       electrodeConductimetre
1298    grestore
1299    /linearc .4 def
1300    1 setlinewidth
1301    .4 setgray
1302    [2.5   6.1   -0.661274   6.1   4.66127   0.6   1.5   0.6] bezier_curve
1303    [2.5   5.9   -0.661274   5.9   4.66127   0.4   1.5   0.4] bezier_curve
1304 grestore
1305 end
1306 } def
1307
1308 /electrodeConductimetreDigital {
1309 gsave
1310 3 dict begin
1311    currentlinewidth .5 mul setlinewidth
1312    -.1 .6 .1 3 frame
1313    [-.1 .6 -.15 .5] ligne
1314    [.1 .6 .15 .5] ligne
1315    0 3 .1 0 180 sarc
1316    /fillstyle {bleu fill} def
1317    /borderline false def
1318    -.15 0 .15 .5 frame*
1319 end
1320 grestore
1321 } def
1322
1323 /ConductimetreDigital_dim {
1324    -1 0 jtoppoint
1325    3.65 6 jtoppoint
1326 } def
1327
1328 /ConductimetreDigital_dic 2 dict def
1329 ConductimetreDigital_dic /Cellule {3.5 2.25} put
1330 ConductimetreDigital_dic /bb {0 0} put
1331
1332 /ConductimetreDigital {
1333 1 dict begin
1334 gsave
1335 dsave2
1336 currentpoint translate
1337    /fillstyle {blanc fill} def
1338    -1 0 1 3 frame*
1339    0 2 1.5 .75 cframe
1340    -.75 .25 .75 1.5 frame
1341    -.75 2.6 .75 2.8 frame
1342    2 -.2 2 [.1 dup] (digit) ccpict
1343    0 .1 2 [.1 dup] (digit) ccpict
1344    1 .3 /bb pictget exch pop [.1 dup] (digital_point) ccpict
1345    9 .5 2 [.1 dup] (digit) ccpict
1346    setCourrierBold
1347    (CONDUCTIMETRE) 0 .5 [.25 dup] cctext
1348    gsave
1349       3.5 2 stranslate
1350       electrodeConductimetreDigital
1351    grestore
1352    1 setlinewidth
1353    .4 setgray
1354 %%   [3.45 5.1 {up} .. {left} 2.5 6 .. {left} 1 .6] draw
1355    [3.45   5.1   3.45   5.60641   3.01582   6.0   2.5   6
1356    -0.447443   6.0   3.94744   0.6   1   0.6] bezier_curve
1357 %%   [3.55 5.1 {up} .. {left} 2.5 6 .. {left} 1 .4] draw
1358    [3.55   5.1   3.55   5.62671   3.05454   6.0   2.5   6   -0.570494
1359    6.0   4.07049   0.4   1   0.4] bezier_curve
1360 drestore2
1361 grestore
1362 end
1363 } def
1364
1365 /goutte_dim {
1366    -0.083 -0.25 jtoppoint
1367    0.083 0 jtoppoint
1368 } def
1369
1370 /goutte {
1371 gsave
1372 1 dict begin