summaryrefslogtreecommitdiff
path: root/obsolete/graphics/pstricks/contrib/pst-vue3d/pst-vue3d.pro
blob: b6e8d1289abe1387a8d925ef14b1632c415fc67f (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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
%version 33 march 2007
%
/tx@3DDict 100 dict def
tx@3DDict begin
/Cube{%
    /XA M11 A mul M12 B mul add M13 C mul add CX add def
    /YA M21 A mul M22 B mul add M23 C mul add CY add def
    /ZA M31 A mul M32 B mul add M33 C mul add CZ add def
    /XB M11 A mul neg M12 B mul add M13 C mul add CX add def
    /YB M21 A mul neg M22 B mul add M23 C mul add CY add def
    /ZB M31 A mul neg M32 B mul add M33 C mul add CZ add def
    /XC M11 A mul neg M12 B mul neg add M13 C mul add CX add def
    /YC M21 A mul neg M22 B mul neg add M23 C mul add CY add def
    /ZC M31 A mul neg M32 B mul neg add M33 C mul add CZ add def
    /XD M11 A mul M12 B mul neg add M13 C mul add CX add def
    /YD M21 A mul M22 B mul neg add M23 C mul add CY add def
    /ZD M31 A mul M32 B mul neg add M33 C mul add CZ add def
    /XE M11 A mul M12 B mul add M13 C mul sub CX add def
    /YE M21 A mul M22 B mul add M23 C mul sub CY add def
    /ZE M31 A mul M32 B mul add M33 C mul sub CZ add def
    /XF M11 A mul neg M12 B mul add M13 C mul sub CX add def
    /YF M21 A mul neg M22 B mul add M23 C mul sub CY add def
    /ZF M31 A mul neg M32 B mul add M33 C mul sub CZ add def
    /XG M11 A mul neg M12 B mul sub M13 C mul sub CX add def
    /YG M21 A mul neg M22 B mul sub M23 C mul sub CY add def
    /ZG M31 A mul neg M32 B mul sub M33 C mul sub CZ add def
    /XH M11 A mul M12 B mul sub M13 C mul sub CX add def
    /YH M21 A mul M22 B mul sub M23 C mul sub CY add def
    /ZH M31 A mul M32 B mul sub M33 C mul sub CZ add def
% Centres des faces : condition de visibilité
% FACE 1
% OC1
    /XC1 M13 C mul CX add def
    /YC1 M23 C mul CY add def
    /ZC1 M33 C mul CZ add def
% Normale à la face 1
    /NX1 M13 C mul def
    /NY1 M23 C mul def
    /NZ1 M33 C mul def
% rayon vers point de vue
    /RXvue1 XC1 XpointVue sub def
    /RYvue1 YC1 YpointVue sub def
    /RZvue1 ZC1 ZpointVue sub def
% produit scalaire
    /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def
% FACE 2
% OC2
    /XC2 M11 A mul CX add def
    /YC2 M21 A mul CY add def
    /ZC2 M31 A mul CZ add def
% normale à la face 2
    /NX2 M11 A mul def
    /NY2 M21 A mul def
    /NZ2 M31 A mul def
% rayon vers point de vue
    /RXvue2 XC2 XpointVue sub def
    /RYvue2 YC2 YpointVue sub def
    /RZvue2 ZC2 ZpointVue sub def
% produit scalaire
    /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def
% FACE 3
% OC3
    /XC3 M13 C neg mul CX add def
    /YC3 M23 C neg mul CY add def
    /ZC3 M33 C neg mul CZ add def
% normale à la face 3
    /NX3 M13 C neg mul def
    /NY3 M23 C neg mul def
    /NZ3 M33 C neg mul def
% rayon vers point de vue
    /RXvue3 XC3 XpointVue sub def
    /RYvue3 YC3 YpointVue sub def
    /RZvue3 ZC3 ZpointVue sub def
% produit scalaire
    /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def
% FACE 4
% OC4
    /XC4 M11 A neg mul CX add def
    /YC4 M21 A neg mul CY add def
    /ZC4 M31 A neg mul CZ add def
% normale à la face 4
    /NX4 M11 A neg mul def
    /NY4 M21 A neg mul def
    /NZ4 M31 A neg mul def
% rayon vers point de vue
    /RXvue4 XC4 XpointVue sub def
    /RYvue4 YC4 YpointVue sub def
    /RZvue4 ZC4 ZpointVue sub def
% produit scalaire
    /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def
% FACE 5
% OC5
    /XC5 M12 B neg mul CX add def
    /YC5 M22 B neg mul CY add def
    /ZC5 M32 B neg mul CZ add def
% normale à la face 5
    /NX5 M12 B neg mul def
    /NY5 M22 B neg mul def
    /NZ5 M32 B neg mul def
% rayon vers point de vue
    /RXvue5 XC5 XpointVue sub def
    /RYvue5 YC5 YpointVue sub def
    /RZvue5 ZC5 ZpointVue sub def
% produit scalaire
    /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def
% FACE 6
% OC6
    /XC6 M12 B mul CX add def
    /YC6 M22 B mul CY add def
    /ZC6 M32 B mul CZ add def
% normale à la face 6
    /NX6 M12 B mul def
    /NY6 M22 B mul def
    /NZ6 M32 B mul def
% rayon vers point de vue
    /RXvue6 XC6 XpointVue sub def
    /RYvue6 YC6 YpointVue sub def
    /RZvue6 ZC6 ZpointVue sub def
% produit scalaire
    /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def
% faceOne
PS1 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YA def
    /Zcote ZA def
    /Xabscisse XA def
    CalcCoordinates
     moveto
    /Zcote ZB def
    /Xabscisse XB def
    /Yordonnee YB def
    CalcCoordinates
    lineto
    /Zcote ZC def
    /Xabscisse XC def
    /Yordonnee YC  def
    CalcCoordinates
    lineto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
    /Zcote ZA def
    /Xabscisse XA def
    /Yordonnee YA def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceOne setrgbcolor
fill
grestore
stroke
} if
% faceTwo
PS2 0 Condition{ %
reduction reduction scale
1 setlinejoin
newpath
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
     moveto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
    /Zcote ZE def
    /Xabscisse XE def
    /Yordonnee YE def
    CalcCoordinates
    lineto
    /Zcote ZA def
    /Xabscisse XA def
    /Yordonnee YA def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceTwo setrgbcolor
fill
grestore
stroke
} if
% face three
PS3 0 Condition{ %
reduction reduction scale
1 setlinejoin
newpath
    /Xabscisse XE def
    /Yordonnee YE def
    /Zcote ZE def
    CalcCoordinates
     moveto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
    /Zcote ZE def
    /Xabscisse XE def
    /Yordonnee YE def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceThree setrgbcolor
fill
grestore
stroke
} if
% face four
PS4 0 Condition{ %
reduction reduction scale
1 setlinejoin
newpath
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
     moveto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
    /Zcote ZC def
    /Xabscisse XC def
    /Yordonnee YC def
    CalcCoordinates
    lineto
    /Zcote ZB def
    /Xabscisse XB def
    /Yordonnee YB def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceFour setrgbcolor
fill
grestore
stroke
} if
% face five
PS5 0 Condition{ %
reduction reduction scale
1 setlinejoin
newpath
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
     moveto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
    /Zcote ZC def
    /Xabscisse XC def
    /Yordonnee YC def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceFive setrgbcolor
fill
grestore
stroke
} if
% face six
PS6 0 Condition{ %
reduction reduction scale
1 setlinejoin
newpath
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
     moveto
    /Zcote ZA def
    /Xabscisse XA def
    /Yordonnee YA def
    CalcCoordinates
    lineto
    /Zcote ZE def
    /Xabscisse XE def
    /Yordonnee YE def
    CalcCoordinates
    lineto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
    /Zcote ZB def
    /Xabscisse XB def
    /Yordonnee YB def
    CalcCoordinates
    lineto
closepath
gsave
CubeColorFaceSix setrgbcolor
fill
grestore
stroke
} if
}
def
%
/PointsDie{%
PS6 0 Condition{ %
reduction reduction scale
A 2 div neg A A 2 div {
    /XCpoint exch def
C 2 div neg C C 2 div {
    /ZCpoint exch def
newpath
    /Zpoint Rpoint ZCpoint add def
    /Xpoint XCpoint def
    /Ypoint B def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Zpoint Rpoint Angle cos mul ZCpoint add def
    /Xpoint Rpoint Angle sin mul XCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
    } for
    } for
 } if
PS5 0 Condition{ %
reduction reduction scale
newpath
    /Ypoint B neg def
    /XCpoint A 2 div neg def
    /ZCpoint C 2 div def
    /Xpoint Rpoint XCpoint add def
    /Zpoint ZCpoint def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint Rpoint Angle cos mul XCpoint add def
    /Zpoint Rpoint Angle sin mul ZCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
%
newpath
    /XCpoint A 2 div def
    /ZCpoint C 2 div neg def
    /Xpoint Rpoint XCpoint add def
    /Zpoint ZCpoint def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint Rpoint Angle cos mul XCpoint add def
    /Zpoint Rpoint Angle sin mul ZCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
%
newpath
    /XCpoint 0 def
    /ZCpoint 0 def
    /Xpoint Rpoint XCpoint add def
    /Zpoint ZCpoint def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint Rpoint Angle cos mul XCpoint add def
    /Zpoint Rpoint Angle sin mul ZCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
} if
PS4 0 Condition{ %
reduction reduction scale
C 2 div neg C C 2 div {
    /ZCpoint exch def
B 2 div neg B B 2 div {
    /YCpoint exch def
newpath
    /Zpoint Rpoint ZCpoint add def
    /Ypoint YCpoint def
    /Xpoint A neg def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Zpoint Rpoint Angle cos mul ZCpoint add def
    /Ypoint Rpoint Angle sin mul YCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
    } for
    } for
% le point du milieu
newpath
    /Zpoint Rpoint def
    /Ypoint 0 def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Zpoint Rpoint Angle cos mul def
    /Ypoint Rpoint Angle sin mul def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
} if
PS3 0 Condition{ %
reduction reduction scale
A 2 div neg A A 2 div {
    /XCpoint exch def
B 2 div neg B 2 div B 2 div {
    /YCpoint exch def
newpath
    /Xpoint Rpoint XCpoint add def
    /Ypoint YCpoint def
    /Zpoint C neg def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint Rpoint Angle cos mul XCpoint add def
    /Ypoint Rpoint Angle sin mul YCpoint add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
    } for
    } for
} if
PS2 0 Condition{ %
reduction reduction scale
newpath
    /Xpoint A def
    /Ypoint Rpoint B 2 div add def
    /Zpoint C 2 div neg def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Ypoint Rpoint Angle cos mul B 2 div add def
    /Zpoint Rpoint Angle sin mul C 2 div sub def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
newpath
    /Xpoint A def
    /Ypoint Rpoint B 2 div sub def
    /Zpoint C 2 div def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint A def
    /Ypoint Rpoint Angle cos mul B 2 div sub def
    /Zpoint Rpoint Angle sin mul A 2 div add def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
} if
PS1 0 Condition{ %
reduction reduction scale
newpath
    /Xpoint Rpoint def
    /Ypoint 0 def
    /Zpoint C def
CalculsPointsAfterTransformations
CalcCoordinates
    moveto
0 1 359 {%
    /Angle exch def
    /Xpoint Rpoint Angle cos mul def
    /Ypoint Rpoint Angle sin mul def
CalculsPointsAfterTransformations
CalcCoordinates
    lineto
    } for
closepath
0 setgray
fill
} if
} def
%
/CalcCoordinates{%
    formulesTroisD
% hv 2005-04-30   --->beg
%    Xi 28.45 mul Yi 28.45 mul
    Xi xUnit mul Yi yUnit mul
% hv 2005-04-30   <---beg
    }
    def
% pour la 3D conventionnelle
/formulesTroisD{%
    /xObservateur Xabscisse Sin1 mul neg Yordonnee Cos1 mul add def
    /yObservateur Xabscisse Cos1Sin2 mul neg Yordonnee Sin1Sin2 mul sub Zcote Cos2 mul add def
    /zObservateur Xabscisse neg Cos1Cos2 mul Yordonnee Sin1Cos2 mul sub Zcote Sin2 mul sub Dobs add def
    /Xi DScreen xObservateur mul zObservateur div def
    /Yi DScreen yObservateur mul zObservateur div def
  }
def
%
/CalculsPointsAfterTransformations{%
    /Xabscisse M11 Xpoint mul M12 Ypoint mul add M13 Zpoint mul add CX add def
    /Yordonnee M21 Xpoint mul M22 Ypoint mul add M23 Zpoint mul add CY add def
    /Zcote M31 Xpoint mul M32 Ypoint mul add M33 Zpoint mul add CZ add def
    }
def
%
/SommetsTetraedre{%
    /xA RayonBaseTetraedre neg def
    /yA 0 def
    /zA 0 def
    /xB 0.5 RayonBaseTetraedre mul def
    /yB RayonBaseTetraedre 0.866 mul neg def
    /zB 0 def
    /xC xB def
    /yC yB neg def
    /zC 0 def
    /xD 0 def
    /yD 0 def
    /zD RayonBaseTetraedre 1.414 mul def
% coordonnées centre des faces
    /xFaceA xA xB xC add add 3 div def
    /yFaceA yA yB yC add add 3 div def
    /zFaceA zA zB zC add add 3 div def
    /xFaceB xD xA xB add add 3 div def
    /yFaceB yD yA yB add add 3 div def
    /zFaceB zD zA zB add add 3 div def
    /xFaceC xA xD xC add add 3 div def
    /yFaceC yA yD yC add add 3 div def
    /zFaceC zA zD zC add add 3 div def
    /xFaceD xD xB xC add add 3 div def
    /yFaceD yD yB yC add add 3 div def
    /zFaceD zD zB zC add add 3 div def
% sommets après rotation et translation
    /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def
    /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def
    /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def
    /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def
    /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def
    /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def
    /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def
    /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def
    /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def
    /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def
    /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def
    /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def
% centres de faces après transformations
    /XFaceA M11 xFaceA mul M12 yFaceA mul add M13 zFaceA mul add CX add def
    /YFaceA M21 xFaceA mul M22 yFaceA mul add M23 zFaceA mul add CY add def
    /ZFaceA M31 xFaceA mul M32 yFaceA mul add M33 zFaceA mul add CZ add def
    /XFaceB M11 xFaceB mul M12 yFaceB mul add M13 zFaceB mul add CX add def
    /YFaceB M21 xFaceB mul M22 yFaceB mul add M23 zFaceB mul add CY add def
    /ZFaceB M31 xFaceB mul M32 yFaceB mul add M33 zFaceB mul add CZ add def
    /XFaceC M11 xFaceC mul M12 yFaceC mul add M13 zFaceC mul add CX add def
    /YFaceC M21 xFaceC mul M22 yFaceC mul add M23 zFaceC mul add CY add def
    /ZFaceC M31 xFaceC mul M32 yFaceC mul add M33 zFaceC mul add CZ add def
    /XFaceD M11 xFaceD mul M12 yFaceD mul add M13 zFaceD mul add CX add def
    /YFaceD M21 xFaceD mul M22 yFaceD mul add M23 zFaceD mul add CY add def
    /ZFaceD M31 xFaceD mul M32 yFaceD mul add M33 zFaceD mul add CZ add def
% Normales aux faces
    /NxA XFaceA XD sub def
    /NyA YFaceA YD sub def
    /NzA ZFaceA ZD sub def
    /NxB XFaceB XC sub def
    /NyB YFaceB YC sub def
    /NzB ZFaceB ZC sub def
    /NxC XFaceC XB sub def
    /NyC YFaceC YB sub def
    /NzC ZFaceC ZB sub def
    /NxD XFaceD XA sub def
    /NyD YFaceD YA sub def
    /NzD ZFaceD ZA sub def
% Conditions de visibilité
% rayon vers point de vue
    /RXvueA XFaceA XpointVue sub def
    /RYvueA YFaceA YpointVue sub def
    /RZvueA ZFaceA ZpointVue sub def
    /RXvueB XFaceB XpointVue sub def
    /RYvueB YFaceB YpointVue sub def
    /RZvueB ZFaceB ZpointVue sub def
    /RXvueC XFaceC XpointVue sub def
    /RYvueC YFaceC YpointVue sub def
    /RZvueC ZFaceC ZpointVue sub def
    /RXvueD XFaceD XpointVue sub def
    /RYvueD YFaceD YpointVue sub def
    /RZvueD ZFaceD ZpointVue sub def
% produit scalaire
    /PSA RXvueA NxA mul RYvueA NyA mul add RZvueA NzA mul add def
    /PSB RXvueB NxB mul RYvueB NyB mul add RZvueB NzB mul add def
    /PSC RXvueC NxC mul RYvueC NyC mul add RZvueC NzC mul add def
    /PSD RXvueD NxD mul RYvueD NyD mul add RZvueD NzD mul add def
    }
    def
/Tetraedre{%
SommetsTetraedre
% face ABC
 PSA 0 le { %
reduction reduction scale
1 setlinejoin
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
     moveto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
    lineto
} if
% face DAB
 PSB 0 le { %
reduction reduction scale
1 setlinejoin
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
     moveto
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
    lineto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
} if
% face DAC
PSC 0 le { %
reduction reduction scale
1 setlinejoin
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
     moveto
    /Xabscisse XA def
    /Yordonnee YA def
    /Zcote ZA def
    CalcCoordinates
    lineto
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
} if
% face DBC
 PSD 0 le { %
reduction reduction scale
1 setlinejoin
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
     moveto
    /Xabscisse XB def
    /Yordonnee YB def
    /Zcote ZB def
    CalcCoordinates
    lineto
    /Xabscisse XC def
    /Yordonnee YC def
    /Zcote ZC def
    CalcCoordinates
    lineto
    /Xabscisse XD def
    /Yordonnee YD def
    /Zcote ZD def
    CalcCoordinates
    lineto
} if
}
def
%
/SommetsPyramide{%
    /xA A def
    /yA A neg def
    /zA 0 def
    /xB A def
    /yB A def
    /zB 0 def
    /xC A neg def
    /yC A def
    /zC 0 def
    /xD A neg def
    /yD A neg def
    /zD 0 def
    /xS 0 def
    /yS 0 def
    /zS Hpyramide def
% coordonnées centre des faces
    /Alpha A Hpyramide atan def
    /xFaceSAB Hpyramide Alpha dup sin exch cos mul mul def
    /yFaceSAB 0 def
    /zFaceSAB Hpyramide Alpha sin dup mul mul def
    /xFaceSBC 0 def
    /yFaceSBC xFaceSAB def
    /zFaceSBC zFaceSAB fracHeight mul def
    /xFaceSCD xFaceSAB neg def
    /yFaceSCD 0 def
    /zFaceSCD zFaceSAB fracHeight mul def
    /xFaceSDA 0 def
    /yFaceSDA xFaceSAB neg def
    /zFaceSDA zFaceSAB fracHeight mul def
% sommets après rotation et translation
    /XA M11 xA mul M12 yA mul add M13 zA mul add CX add def
    /YA M21 xA mul M22 yA mul add M23 zA mul add CY add def
    /ZA M31 xA mul M32 yA mul add M33 zA mul add CZ add def
    /XB M11 xB mul M12 yB mul add M13 zB mul add CX add def
    /YB M21 xB mul M22 yB mul add M23 zB mul add CY add def
    /ZB M31 xB mul M32 yB mul add M33 zB mul add CZ add def
    /XC M11 xC mul M12 yC mul add M13 zC mul add CX add def
    /YC M21 xC mul M22 yC mul add M23 zC mul add CY add def
    /ZC M31 xC mul M32 yC mul add M33 zC mul add CZ add def
    /XD M11 xD mul M12 yD mul add M13 zD mul add CX add def
    /YD M21 xD mul M22 yD mul add M23 zD mul add CY add def
    /ZD M31 xD mul M32 yD mul add M33 zD mul add CZ add def
    /XS M11 xS mul M12 yS mul add M13 zS mul add CX add def
    /YS M21 xS mul M22 yS mul add M23 zS mul add CY add def
    /ZS M31 xS mul M32 yS mul add M33 zS mul add CZ add def
% centres de faces après transformations
    /XFaceSAB M11 xFaceSAB mul M12 yFaceSAB mul add M13 zFaceSAB mul add CX add def
    /YFaceSAB M21 xFaceSAB mul M22 yFaceSAB mul add M23 zFaceSAB mul add CY add def
    /ZFaceSAB M31 xFaceSAB mul M32 yFaceSAB mul add M33 zFaceSAB mul add CZ add def
    /XFaceSBC M11 xFaceSBC mul M12 yFaceSBC mul add M13 zFaceSBC mul add CX add def
    /YFaceSBC M21 xFaceSBC mul M22 yFaceSBC mul add M23 zFaceSBC mul add CY add def
    /ZFaceSBC M31 xFaceSBC mul M32 yFaceSBC mul add M33 zFaceSBC mul add CZ add def
    /XFaceSCD M11 xFaceSCD mul M12 yFaceSCD mul add M13 zFaceSCD mul add CX add def
    /YFaceSCD M21 xFaceSCD mul M22 yFaceSCD mul add M23 zFaceSCD mul add CY add def
    /ZFaceSCD M31 xFaceSCD mul M32 yFaceSCD mul add M33 zFaceSCD mul add CZ add def
    /XFaceSDA M11 xFaceSDA mul M12 yFaceSDA mul add M13 zFaceSDA mul add CX add def
    /YFaceSDA M21 xFaceSDA mul M22 yFaceSDA mul add M23 zFaceSDA mul add CY add def
    /ZFaceSDA M31 xFaceSDA mul M32 yFaceSDA mul add M33 zFaceSDA mul add CZ add def
% Normales aux faces
    /NxSAB XFaceSAB CX sub def
    /NySAB YFaceSAB CY sub def
    /NzSAB ZFaceSAB CZ sub def
    /NxSBC XFaceSBC CX sub def
    /NySBC YFaceSBC CY sub def
    /NzSBC ZFaceSBC CZ sub def
    /NxSCD XFaceSCD CX sub def
    /NySCD YFaceSCD CY sub def
    /NzSCD ZFaceSCD CZ sub def
    /NxSDA XFaceSDA CX sub def
    /NySDA YFaceSDA CY sub def
    /NzSDA ZFaceSDA CZ sub def
    /NxABCD CX XS sub def
    /NyABCD CY YS sub def
    /NzABCD CZ ZS sub def
% Conditions de visibilité
% rayon vers point de vue
    /RXvueSAB XFaceSAB XpointVue sub def
    /RYvueSAB YFaceSAB YpointVue sub def
    /RZvueSAB ZFaceSAB ZpointVue sub def
    /RXvueSBC XFaceSBC XpointVue sub def
    /RYvueSBC YFaceSBC YpointVue sub def
    /RZvueSBC ZFaceSBC ZpointVue sub def
    /RXvueSCD XFaceSCD XpointVue sub def
    /RYvueSCD YFaceSCD YpointVue sub def
    /RZvueSCD ZFaceSCD ZpointVue sub def
    /RXvueSDA XFaceSDA XpointVue sub def
    /RYvueSDA YFaceSDA YpointVue sub def
    /RZvueSDA ZFaceSDA ZpointVue sub def
    /RXvueABCD CX XpointVue sub def
    /RYvueABCD CY YpointVue sub def
    /RZvueABCD CZ ZpointVue sub def
    /PSAB RXvueSAB NxSAB mul RYvueSAB NySAB mul add RZvueSAB NzSAB mul add def
    /PSBC RXvueSBC NxSBC mul RYvueSBC NySBC mul add RZvueSBC NzSBC mul add def
    /PSCD RXvueSCD NxSCD mul RYvueSCD NySCD mul add RZvueSCD NzSCD mul add def
    /PSDA RXvueSDA NxSDA mul RYvueSDA NySDA mul add RZvueSDA NzSDA mul add def
    /PSABCD RXvueABCD NxABCD mul RYvueABCD NyABCD mul add RZvueABCD NzABCD mul add def
    }
    def
%
/MaillageSphere {
0 increment 360 increment sub {%
    /theta exch def
departPhi increment 90 increment sub {%
    /phi exch def
% newpath
    /Xpoint Rsphere theta cos mul phi cos mul def
    /Ypoint Rsphere theta sin mul phi cos mul def
    /Zpoint Rsphere phi sin mul def
CalculsPointsAfterTransformations
    CalcCoordinates
     moveto
% Centre de la facette
    /Xpoint Rsphere theta increment 2 div add cos mul phi increment 2 div add cos mul def
    /Ypoint Rsphere theta increment 2 div add sin mul phi increment 2 div add cos mul def
    /Zpoint Rsphere phi increment 2 div add sin mul def
CalculsPointsAfterTransformations
    /xCentreFacette Xabscisse def
    /yCentreFacette Yordonnee def
    /zCentreFacette Zcote def
% normale à la facette
    /nXfacette xCentreFacette CX sub def
    /nYfacette yCentreFacette CY sub def
    /nZfacette zCentreFacette CZ sub def
% rayon vers point de vue
    /RXvue xCentreFacette XpointVue sub def
    /RYvue yCentreFacette YpointVue sub def
    /RZvue zCentreFacette ZpointVue sub def
% test de visibilité
    /PSfacette RXvue nXfacette mul
    RYvue nYfacette mul add
    RZvue nZfacette mul add
    def
condition {
theta 1 theta increment add {%
    /theta1 exch def
    /Xpoint Rsphere theta1 cos mul phi cos mul def
    /Ypoint Rsphere theta1 sin mul phi cos mul def
    /Zpoint Rsphere phi sin mul def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
phi 1 phi increment add {
    /phi1 exch def
    /Xpoint Rsphere theta increment add cos mul phi1 cos mul def
    /Ypoint Rsphere theta increment add sin mul phi1 cos mul def
    /Zpoint Rsphere phi1 sin mul def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
theta increment add -1 theta {%
    /theta1 exch def
    /Xpoint Rsphere theta1 cos mul phi increment add cos mul def
    /Ypoint Rsphere theta1 sin mul phi increment add cos mul def
    /Zpoint Rsphere phi increment add sin mul def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
phi increment add -1 phi {
    /phi1 exch def
    /Xpoint Rsphere theta cos mul phi1 cos mul def
    /Ypoint Rsphere theta sin mul phi1 cos mul def
    /Zpoint Rsphere phi1 sin mul def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
        } for
} if
} for
} for
} def
%
/CylinderThreeD{
reduction reduction scale
1 setlinejoin
0 incrementANGLE 360 {%
    /theta exch def
 0 incrementHAUTEUR Hcylindre incrementHAUTEUR sub {%
    /H exch def
% newpath
    /X1 Rcylindre theta cos mul def
    /Y1 Rcylindre theta sin mul def
    /Z1 H def
    /Xpoint X1 def
    /Ypoint Y1 def
    /Zpoint Z1 def
CalculsPointsAfterTransformations
    /Xfacette Xabscisse  def
    /Yfacette Yordonnee  def
    /Zfacette Zcote def
    CalcCoordinates
     moveto
% coordonnées du centre de la facette
    /Xpoint Rcylindre theta incrementANGLE 2 div add cos mul def
    /Ypoint Rcylindre theta incrementANGLE 2 div add sin mul def
    /Zpoint H incrementHAUTEUR 2 div add def
CalculsPointsAfterTransformations
% Point sur l'axe du cylindre
% à la même hauteur que M1
    /Zpoint Z1 def
    /Xpoint 0 def
    /Ypoint 0 def
CalculsPointsAfterTransformations
% normale à la facette
    /nXfacette Xfacette Xabscisse sub def
    /nYfacette Yfacette Yordonnee sub def
    /nZfacette Zfacette Zcote sub def
% rayon vers point de vue
    /RXvue Xfacette XpointVue sub def
    /RYvue Yfacette YpointVue sub def
    /RZvue Zfacette ZpointVue sub def
% test de visibilité
    /PSfacette nXfacette RXvue mul
    nYfacette RYvue mul add
    nZfacette RZvue mul add
    def
PSfacette 0 le {
theta 1 theta incrementANGLE add {%
    /theta1 exch def
    /Xpoint Rcylindre theta1 cos mul def
    /Ypoint Rcylindre theta1 sin mul def
    /Zpoint H def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H 1 H incrementHAUTEUR add {
    /H1 exch def
    /Xpoint Rcylindre  theta incrementANGLE add cos mul def
    /Ypoint Rcylindre theta incrementANGLE add sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
theta incrementANGLE add -1 theta {%
    /theta1 exch def
    /Xpoint Rcylindre theta1 cos mul def
    /Ypoint Rcylindre theta1 sin mul def
    /Zpoint H incrementHAUTEUR add def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H incrementHAUTEUR add -1 H {
    /H1 exch def
    /Xpoint Rcylindre theta cos mul def
    /Ypoint Rcylindre theta sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
} if
} for
} for
% Face supérieure
% centre de la face supérieure
    /Xpoint 0 def
    /Zpoint Hcylindre def
    /Ypoint 0 def
CalculsPointsAfterTransformations
    /CxFaceSup Xabscisse def
    /CyFaceSup Yordonnee def
    /CzFaceSup Zcote def
% centre de la face inférieure
    /CxFaceInf CX def
    /CyFaceInf CY def
    /CzFaceInf CZ def
% Normale à la face supérieure
    /nXFaceSup CxFaceSup CxFaceInf sub def
    /nYFaceSup CyFaceSup CyFaceInf sub def
    /nZFaceSup CzFaceSup CzFaceInf sub def
% rayon vers point de vue verd la face inférieure
    /RXvueInf CxFaceInf XpointVue sub def
    /RYvueInf CyFaceInf YpointVue sub def
    /RZvueInf CzFaceInf ZpointVue sub def
% rayon vers point de vue verd la face supérieure
    /RXvueSup CxFaceSup XpointVue sub def
    /RYvueSup CyFaceSup YpointVue sub def
    /RZvueSup CzFaceSup ZpointVue sub def
% Visibilité face supérieure
    /PSfaceSup RXvueSup nXFaceSup mul
               RYvueSup nYFaceSup mul add
               RZvueSup nZFaceSup mul add def
% Visibilité face inférieure
    /PSfaceInf RXvueInf nXFaceSup neg mul
               RYvueInf nYFaceSup mul sub
               RZvueInf nZFaceSup mul sub def
PSfaceSup 0 le {
/TableauxPoints [
0 1 359 {% on décrit le cercle
    /theta exch def [
    /Xpoint Rcylindre theta cos mul def
    /Ypoint Rcylindre theta sin mul def
    /Zpoint Hcylindre def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
% face inférieure
PSfaceInf 0 le {
/TableauxPoints [
0 1 359 {% on décrit le cercle
    /theta exch def [
    /Xpoint Rcylindre theta cos mul def
    /Ypoint Rcylindre theta sin mul def
    /Zpoint 0 def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
 0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
 } def
%
 %
/ConeThreeD{
    /AngleCone Rcone Hcone atan def
    /TanAngleCone AngleCone dup sin exch cos div def
    /incrementANGLE 10 def
    /incrementHAUTEUR Hcone fracHeight mul  5 div def
1 setlinejoin
newpath
0 incrementANGLE 360 {%
    /theta exch def
 0 incrementHAUTEUR Hcone fracHeight mul incrementHAUTEUR sub {%
    /H exch def
 % normale à la facette
    /nXfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add cos mul
    mul def
    /nYfacette Hcone AngleCone dup sin exch cos mul theta incrementANGLE 2 div add sin mul
    mul def
    /nZfacette Hcone AngleCone sin dup mul mul def
    /Xpoint nXfacette def
    /Ypoint nYfacette def
    /Zpoint nZfacette def
CalculsPointsAfterTransformations
    /nXfacette Xabscisse CX sub def
    /nYfacette Yordonnee CY sub def
    /nZfacette Zcote CZ sub def
%
    /OK Hcone H sub TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint H def
CalculsPointsAfterTransformations
    /Xfacette Xabscisse  def
    /Yfacette Yordonnee  def
    /Zfacette Zcote def
    CalcCoordinates
     moveto
% coordonnées du centre de la facette
    /OK Hcone H incrementHAUTEUR 2 div add sub TanAngleCone mul def
    /Xpoint OK theta incrementANGLE 2 div add cos mul def
    /Ypoint OK theta incrementANGLE 2 div add sin mul def
    /Zpoint H incrementHAUTEUR 2 div add def
CalculsPointsAfterTransformations
    /XcentreFacette Xabscisse  def
    /YcentreFacette Yordonnee  def
    /ZcentreFacette Zcote def
% rayon vers point de vue
    /RXvue XcentreFacette XpointVue sub def
    /RYvue YcentreFacette YpointVue sub def
    /RZvue ZcentreFacette ZpointVue sub def
% test de visibilité
    /PSfacette nXfacette RXvue mul
    nYfacette RYvue mul add
    nZfacette RZvue mul add
    def
PSfacette 0 le {
theta 1 theta incrementANGLE add {%
    /theta1 exch def
    /OK Hcone H sub TanAngleCone mul def
    /Xpoint OK theta1 cos mul def
    /Ypoint OK theta1 sin mul def
    /Zpoint H def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H 1 H incrementHAUTEUR add {
    /H1 exch def
    /OK Hcone H1 sub TanAngleCone mul def
    /Xpoint OK theta incrementANGLE add cos mul def
    /Ypoint OK theta incrementANGLE add sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
theta incrementANGLE add -1 theta {%
    /theta1 exch def
    /OK Hcone H incrementHAUTEUR add sub TanAngleCone mul def
    /Xpoint OK theta1 cos mul def
    /Ypoint OK theta1 sin mul def
    /Zpoint H incrementHAUTEUR add def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
H incrementHAUTEUR add -1 H {
    /H1 exch def
    /OK Hcone H1 sub TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint H1 def
CalculsPointsAfterTransformations
    CalcCoordinates
    lineto
    } for
} if
} for
} for
% centre de la base inférieure après transformations
    /CxFaceInf CX def
    /CyFaceInf CY def
    /CzFaceInf CZ def
% modification du 16/11/2002
%    /Xpoint CxFaceInf def
%    /Ypoint CyFaceInf def
%    /Zpoint CzFaceInf def
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint 0 def
% fin modification du 16/11/2002
CalculsPointsAfterTransformations
    /CxBaseInf Xabscisse def
    /CyBaseInf Yordonnee def
    /CzBaseInf Zcote def
% centre de la base supérieure avant transformations
    /CxFaceSup 0 def
    /CyFaceSup 0 def
    /CzFaceSup Hcone fracHeight mul def
% Sommet du cone
    /Xpoint 0 def
    /Ypoint 0 def
    /Zpoint Hcone def
CalculsPointsAfterTransformations
    /XsommetCone Xabscisse def
    /YsommetCone Yordonnee def
    /ZsommetCone Zcote def
% Normale extérieure à la base inférieure
    /nXBaseInf CxFaceInf XsommetCone sub def
    /nYBaseInf CyFaceInf YsommetCone sub def
    /nZBaseInf CzFaceInf ZsommetCone sub def
% centre de la base supérieure
    /Xpoint CxFaceSup def
    /Ypoint CyFaceSup def
    /Zpoint CzFaceSup def
CalculsPointsAfterTransformations
    /CxBaseSup Xabscisse def
    /CyBaseSup Yordonnee def
    /CzBaseSup Zcote def
% Normale extérieure à la base supérieure
    /nXBaseSup XsommetCone CxFaceSup sub def
    /nYBaseSup YsommetCone CyFaceSup sub def
    /nZBaseSup ZsommetCone CzFaceSup sub def
% rayon vers point de vue
    /RXvueSup CxBaseSup XpointVue sub def
    /RYvueSup CyBaseSup YpointVue sub def
    /RZvueSup CzBaseSup ZpointVue sub def
    /RXvueInf CxBaseInf XpointVue sub def
    /RYvueInf CyBaseInf YpointVue sub def
    /RZvueInf CzBaseInf ZpointVue sub def
% Visibilité de la base inférieure
    /PSbaseInfCone nXBaseInf RXvueInf mul
                nYBaseInf RYvueInf mul add
                nZBaseInf RZvueInf mul add def
% Visibilité de la base supérieure
    /PSbaseSupCone nXBaseSup RXvueSup mul
                nYBaseSup RYvueSup mul add
                nZBaseSup RZvueSup mul add def
PSbaseInfCone 0 le {
/TableauxPoints [
0 1 359 {% on décrit le cercle
    /theta exch def [
    /Xpoint Rcone theta cos mul def
    /Ypoint Rcone theta sin mul def
    /Zpoint 0 def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
%% PSbaseSupCone 0 le {
%% modifié le 31/10/2003
%PSbaseSupCone 0 ge {
PSbaseSupCone 0 le {
/TableauxPoints [
0 1 359 {% on décrit le cercle
    /theta exch def [
    /OK Hcone 1 fracHeight sub mul TanAngleCone mul def
    /Xpoint OK theta cos mul def
    /Ypoint OK theta sin mul def
    /Zpoint Hcone fracHeight mul def
CalculsPointsAfterTransformations
    CalcCoordinates ]
    } for
    ] def
gsave
newpath
 TableauxPoints 0 get aload pop moveto
0 1 359 {
    /compteur exch def
    TableauxPoints compteur get aload pop
    lineto } for
0.7 setgray
closepath
fill
grestore
 } if
 } def
/PortionSphere{%
    /Xpoint Rsphere psTHETA dTHETA neg add cos mul psPHI dPHI sub cos mul def
    /Ypoint Rsphere psTHETA dTHETA neg add sin mul psPHI dPHI sub cos mul def
    /Zpoint Rsphere psPHI dPHI sub sin mul def
CalculsPointsAfterTransformations
    /xCentreFacette Xabscisse def
    /yCentreFacette Yordonnee def
    /zCentreFacette Zcote def
% normale à la facette
    /nXfacette xCentreFacette CX sub def
    /nYfacette yCentreFacette CY sub def
    /nZfacette zCentreFacette CZ sub def
% rayon vers point de vue
    /RXvue xCentreFacette XpointVue sub def
    /RYvue yCentreFacette YpointVue sub def
    /RZvue zCentreFacette ZpointVue sub def
% test de visibilité
    /PSfacette RXvue nXfacette mul
    RYvue nYfacette mul add
    RZvue nZfacette mul add
    def
PSfacette 0 le {
CalcCoordinates
newpath
     moveto
psTHETA dTHETA sub 1 psTHETA dTHETA add {
    /Theta exch def
    /Xpoint Rsphere Theta cos psPHI dPHI sub cos mul mul def
    /Ypoint Rsphere Theta sin psPHI dPHI sub cos mul mul def
    /Zpoint Rsphere psPHI dPHI sub sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psPHI dPHI sub 1 psPHI dPHI add {
    /Phi exch def
    /Xpoint Rsphere psTHETA dTHETA add cos Phi cos mul mul def
    /Ypoint Rsphere psTHETA dTHETA add sin Phi cos mul mul def
    /Zpoint Rsphere Phi sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psTHETA dTHETA add -1 psTHETA dTHETA sub {
    /Theta exch def
    /Xpoint Rsphere Theta cos psPHI dPHI add cos mul mul def
    /Ypoint Rsphere Theta sin psPHI dPHI add cos mul mul def
    /Zpoint Rsphere psPHI dPHI add sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
psPHI dPHI add -1 psPHI dPHI sub {
    /Phi exch def
    /Xpoint Rsphere psTHETA dTHETA sub cos Phi cos mul mul def
    /Ypoint Rsphere psTHETA dTHETA sub sin Phi cos mul mul def
    /Zpoint Rsphere Phi sin mul def
    CalculsPointsAfterTransformations
    CalcCoordinates
     lineto
     } for
closepath
} if
} def
% Dodecahedron : 31 décembre 2003
% datas : Graphisme scientifique R.Dony
% Masson ed. page 240
/Dodecahedron{%
    /XA M11 0 mul M12 A 0.607062 mul mul add M13 A mul 0.794655 mul add CX add def
    /YA M21 0 mul M22 A 0.607062 mul mul add M23 A mul 0.794655 mul add CY add def
    /ZA M31 0 mul M32 A 0.607062 mul mul add M33 A mul 0.794655 mul add CZ add def
    /XB M11 A mul -0.5773503 mul M12 A mul  0.1875925 mul add M13 A mul 0.7946545 mul add CX add def
    /YB M21 A mul -0.5773503 mul M22 A mul  0.1875925 mul add M23 A mul 0.7946545 mul add CY add def
    /ZB M31 A mul -0.5773503 mul M32 A mul  0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def
    /XC M11 A mul -0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def
    /YC M21 A mul -0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def
    /ZC M31 A mul -0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def
    /XD M11 A mul  0.3568221 mul M12 A mul -0.4911235 mul add M13 A mul 0.7946545 mul add CX add def
    /YD M21 A mul  0.3568221 mul M22 A mul -0.4911235 mul add M23 A mul 0.7946545 mul add CY add def
    /ZD M31 A mul  0.3568221 mul M32 A mul -0.4911235 mul add M33 A mul 0.7946545 mul add CZ add def
    /XE M11 A mul  0.5773503 mul M12 A mul  0.1875925 mul add M13 A mul 0.7946545 mul add CX add def
    /YE M21 A mul  0.5773503 mul M22 A mul  0.1875925 mul add M23 A mul 0.7946545 mul add CY add def
    /ZE M31 A mul  0.5773503 mul M32 A mul  0.1875925 mul add M33 A mul 0.7946545 mul add CZ add def
    /XF M11 A mul  0         mul M12 A mul   0.982247 mul add M13 A mul 0.175925  mul add CX add def
    /YF M21 A mul  0         mul M22 A mul   0.982247 mul add M23 A mul 0.175925  mul add CY add def
    /ZF M31 A mul  0         mul M32 A mul   0.982247 mul add M33 A mul 0.175925  mul add CZ add def
    /XG M11 A mul -0.9341724 mul M12 A mul   0.303531 mul add M13 A mul 0.1875925 mul add CX add def
    /YG M21 A mul -0.9341724 mul M22 A mul   0.303531 mul add M23 A mul 0.1875925 mul add CY add def
    /ZG M31 A mul -0.9341724 mul M32 A mul   0.303531 mul add M33 A mul 0.1875925 mul add CZ add def
    /XH M11 A mul -0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def
    /YH M21 A mul -0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def
    /ZH M31 A mul -0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def
    /XI M11 A mul  0.5773503 mul M12 A mul -0.7946545 mul add M13 A mul 0.1875925 mul add CX add def
    /YI M21 A mul  0.5773503 mul M22 A mul -0.7946545 mul add M23 A mul 0.1875925 mul add CY add def
    /ZI M31 A mul  0.5773503 mul M32 A mul -0.7946545 mul add M33 A mul 0.1875925 mul add CZ add def
    /XJ M11 A mul  0.9341724 mul M12 A mul   0.303531 mul add M13 A mul 0.1875925 mul add CX add def
    /YJ M21 A mul  0.9341724 mul M22 A mul   0.303531 mul add M23 A mul 0.1875925 mul add CY add def
    /ZJ M31 A mul  0.9341724 mul M32 A mul   0.303531 mul add M33 A mul 0.1875925 mul add CZ add def
    /XK M11 A mul  0         mul M12 A mul  -0.982247 mul add M13 A mul -0.1875925 mul add CX add def
    /YK M21 A mul  0         mul M22 A mul  -0.982247 mul add M23 A mul -0.1875925 mul add CY add def
    /ZK M31 A mul  0         mul M32 A mul  -0.982247 mul add M33 A mul -0.1875925 mul add CZ add def
    /XL M11 A mul  0.9341724 mul M12 A mul  -0.303531 mul add M13 A mul -0.1875925 mul add CX add def
    /YL M21 A mul  0.9341724 mul M22 A mul  -0.303531 mul add M23 A mul -0.1875925 mul add CY add def
    /ZL M31 A mul  0.9341724 mul M32 A mul  -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def
    /XM M11 A mul  0.5773503 mul M12 A mul  0.7946545 mul add M13 A mul -0.1875925 mul add CX add def
    /YM M21 A mul  0.5773503 mul M22 A mul  0.7946545 mul add M23 A mul -0.1875925 mul add CY add def
    /ZM M31 A mul  0.5773503 mul M32 A mul  0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def
    /XN M11 A mul -0.5773503 mul M12 A mul  0.7946545 mul add M13 A mul -0.1875925 mul add CX add def
    /YN M21 A mul -0.5773503 mul M22 A mul  0.7946545 mul add M23 A mul -0.1875925 mul add CY add def
    /ZN M31 A mul -0.5773503 mul M32 A mul  0.7946545 mul add M33 A mul -0.1875925 mul add CZ add def
    /XO M11 A mul -0.9341724 mul M12 A mul  -0.303531 mul add M13 A mul -0.1875925 mul add CX add def
    /YO M21 A mul -0.9341724 mul M22 A mul  -0.303531 mul add M23 A mul -0.1875925 mul add CY add def
    /ZO M31 A mul -0.9341724 mul M32 A mul  -0.303531 mul add M33 A mul -0.1875925 mul add CZ add def
    /XP M11 A mul -0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def
    /YP M21 A mul -0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def
    /ZP M31 A mul -0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def
    /XQ M11 A mul -0.3568221 mul M12 A mul  0.4911235 mul add M13 A mul -0.7946545 mul add CX add def
    /YQ M21 A mul -0.3568221 mul M22 A mul  0.4911235 mul add M23 A mul -0.7946545 mul add CY add def
    /ZQ M31 A mul -0.3568221 mul M32 A mul  0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def
    /XR M11 A mul  0.3568221 mul M12 A mul  0.4911235 mul add M13 A mul -0.7946545 mul add CX add def
    /YR M21 A mul  0.3568221 mul M22 A mul  0.4911235 mul add M23 A mul -0.7946545 mul add CY add def
    /ZR M31 A mul  0.3568221 mul M32 A mul  0.4911235 mul add M33 A mul -0.7946545 mul add CZ add def
    /XS M11 A mul  0.5773503 mul M12 A mul -0.1875925 mul add M13 A mul -0.7946545 mul add CX add def
    /YS M21 A mul  0.5773503 mul M22 A mul -0.1875925 mul add M23 A mul -0.7946545 mul add CY add def
    /ZS M31 A mul  0.5773503 mul M32 A mul -0.1875925 mul add M33 A mul -0.7946545 mul add CZ add def
    /XT M11 0 mul M12 A -0.607062 mul mul add M13 A mul -0.794655 mul add CX add def
    /YT M21 0 mul M22 A -0.607062 mul mul add M23 A mul -0.794655 mul add CY add def
    /ZT M31 0 mul M32 A -0.607062 mul mul add M33 A mul -0.794655 mul add CZ add def
% Centres des faces : condition de visibilité
% FACE 1 pentagone régulier ABCDE
% OC1
    /XC1 XA XB add XC add XD add XE add 5 div def
    /YC1 YA YB add YC add YD add YE add 5 div def
    /ZC1 ZA ZB add ZC add ZD add ZE add 5 div def
% Normale à la face 1
    /NX1 XC1 CX sub def
    /NY1 YC1 CY sub def
    /NZ1 ZC1 CZ sub def
% rayon vers point de vue
    /RXvue1 XC1 XpointVue sub def
    /RYvue1 YC1 YpointVue sub def
    /RZvue1 ZC1 ZpointVue sub def
% produit scalaire
    /PS1 RXvue1 NX1 mul RYvue1 NY1 mul add RZvue1 NZ1 mul add def
% FACE 2 pentagone régulier EDILJ
% OC2
    /XC2 XE XD add XI add XL add XJ add 5 div def
    /YC2 YE YD add YI add YL add YJ add 5 div def
    /ZC2 ZE ZD add ZI add ZL add ZJ add 5 div def
% Normale à la face 2
    /NX2 XC2 CX sub def
    /NY2 YC2 CY sub def
    /NZ2 ZC2 CZ sub def
% rayon vers point de vue
    /RXvue2 XC2 XpointVue sub def
    /RYvue2 YC2 YpointVue sub def
    /RZvue2 ZC2 ZpointVue sub def
% produit scalaire
    /PS2 RXvue2 NX2 mul RYvue2 NY2 mul add RZvue2 NZ2 mul add def
% FACE 3 pentagone régulier EJMFA
% OC3
    /XC3 XE XJ add XM add XF add XA add 5 div def
    /YC3 YE YJ add YM add YF add YA add 5 div def
    /ZC3 ZE ZJ add ZM add ZF add ZA add 5 div def
% Normale à la face 2
    /NX3 XC3 CX sub def
    /NY3 YC3 CY sub def
    /NZ3 ZC3 CZ sub def
% rayon vers point de vue
    /RXvue3 XC3 XpointVue sub def
    /RYvue3 YC3 YpointVue sub def
    /RZvue3 ZC3 ZpointVue sub def
% produit scalaire
    /PS3 RXvue3 NX3 mul RYvue3 NY3 mul add RZvue3 NZ3 mul add def
% FACE 4 pentagone régulier AFNGB
% OC4
    /XC4 XA XF add XN add XG add XB add 5 div def
    /YC4 YA YF add YN add YG add YB add 5 div def
    /ZC4 ZA ZF add ZN add ZG add ZB add 5 div def
% Normale à la face 4
    /NX4 XC4 CX sub def
    /NY4 YC4 CY sub def
    /NZ4 ZC4 CZ sub def
% rayon vers point de vue
    /RXvue4 XC4 XpointVue sub def
    /RYvue4 YC4 YpointVue sub def
    /RZvue4 ZC4 ZpointVue sub def
% produit scalaire
    /PS4 RXvue4 NX4 mul RYvue4 NY4 mul add RZvue4 NZ4 mul add def
% FACE 5 pentagone régulier BGOHC
% OC5
    /XC5 XB XG add XO add XH add XC add 5 div def
    /YC5 YB YG add YO add YH add YC add 5 div def
    /ZC5 ZB ZG add ZO add ZH add ZC add 5 div def
% Normale à la face 5
    /NX5 XC5 CX sub def
    /NY5 YC5 CY sub def
    /NZ5 ZC5 CZ sub def
% rayon vers point de vue
    /RXvue5 XC5 XpointVue sub def
    /RYvue5 YC5 YpointVue sub def
    /RZvue5 ZC5 ZpointVue sub def
% produit scalaire
    /PS5 RXvue5 NX5 mul RYvue5 NY5 mul add RZvue5 NZ5 mul add def
% FACE 6 pentagone régulier CHKID
% OC6
    /XC6 XC XH add XK add XI add XD add 5 div def
    /YC6 YC YH add YK add YI add YD add 5 div def
    /ZC6 ZC ZH add ZK add ZI add ZD add 5 div def
% Normale à la face 6
    /NX6 XC6 CX sub def
    /NY6 YC6 CY sub def
    /NZ6 ZC6 CZ sub def
% rayon vers point de vue
    /RXvue6 XC6 XpointVue sub def
    /RYvue6 YC6 YpointVue sub def
    /RZvue6 ZC6 ZpointVue sub def
% produit scalaire
    /PS6 RXvue6 NX6 mul RYvue6 NY6 mul add RZvue6 NZ6 mul add def
% FACE 7 pentagone régulier KTSLI
% OC7
    /XC7 XK XT add XS add XL add XI add 5 div def
    /YC7 YK YT add YS add YL add YI add 5 div def
    /ZC7 ZK ZT add ZS add ZL add ZI add 5 div def
% Normale à la face 7
    /NX7 XC7 CX sub def
    /NY7 YC7 CY sub def
    /NZ7 ZC7 CZ sub def
% rayon vers point de vue
    /RXvue7 XC7 XpointVue sub def
    /RYvue7 YC7 YpointVue sub def
    /RZvue7 ZC7 ZpointVue sub def
% produit scalaire
    /PS7 RXvue7 NX7 mul RYvue7 NY7 mul add RZvue7 NZ7 mul add def
% FACE 8 pentagone régulier LSRMJ
% OC8
    /XC8 XL XS add XR add XM add XJ add 5 div def
    /YC8 YL YS add YR add YM add YJ add 5 div def
    /ZC8 ZL ZS add ZR add ZM add ZJ add 5 div def
% Normale à la face 8
    /NX8 XC8 CX sub def
    /NY8 YC8 CY sub def
    /NZ8 ZC8 CZ sub def
% rayon vers point de vue
    /RXvue8 XC8 XpointVue sub def
    /RYvue8 YC8 YpointVue sub def
    /RZvue8 ZC8 ZpointVue sub def
% produit scalaire
    /PS8 RXvue8 NX8 mul RYvue8 NY8 mul add RZvue8 NZ8 mul add def
% FACE 9 pentagone régulier MRQNF
% OC9
    /XC9 XM XR add XQ add XN add XF add 5 div def
    /YC9 YM YR add YQ add YN add YF add 5 div def
    /ZC9 ZM ZR add ZQ add ZN add ZF add 5 div def
% Normale à la face 6
    /NX9 XC9 CX sub def
    /NY9 YC9 CY sub def
    /NZ9 ZC9 CZ sub def
% rayon vers point de vue
    /RXvue9 XC9 XpointVue sub def
    /RYvue9 YC9 YpointVue sub def
    /RZvue9 ZC9 ZpointVue sub def
% produit scalaire
    /PS9 RXvue9 NX9 mul RYvue9 NY9 mul add RZvue9 NZ9 mul add def
% FACE 10 pentagone régulier NQPOG
% OC10
    /XC10 XN XQ add XP add XO add XG add 5 div def
    /YC10 YN YQ add YP add YO add YG add 5 div def
    /ZC10 ZN ZQ add ZP add ZO add ZG add 5 div def
% Normale à la face 6
    /NX10 XC10 CX sub def
    /NY10 YC10 CY sub def
    /NZ10 ZC10 CZ sub def
% rayon vers point de vue
    /RXvue10 XC10 XpointVue sub def
    /RYvue10 YC10 YpointVue sub def
    /RZvue10 ZC10 ZpointVue sub def
% produit scalaire
    /PS10 RXvue10 NX10 mul RYvue10 NY10 mul add RZvue10 NZ10 mul add def
% FACE 11 pentagone régulier OPTKH
% OC11
    /XC11 XO XP add XT add XK add XH add 5 div def
    /YC11 YO YP add YT add YK add YH add 5 div def
    /ZC11 ZO ZP add ZT add ZK add ZH add 5 div def
% Normale à la face 11
    /NX11 XC11 CX sub def
    /NY11 YC11 CY sub def
    /NZ11 ZC11 CZ sub def
% rayon vers point de vue
    /RXvue11 XC11 XpointVue sub def
    /RYvue11 YC11 YpointVue sub def
    /RZvue11 ZC11 ZpointVue sub def
% produit scalaire
    /PS11 RXvue11 NX11 mul RYvue11 NY11 mul add RZvue11 NZ11 mul add def
% FACE 12 pentagone régulier PQRST
% OC12
    /XC12 XP XQ add XR add XS add XT add 5 div def
    /YC12 YP YQ add YR add YS add YT add 5 div def
    /ZC12 ZP ZQ add ZR add ZS add ZT add 5 div def
% Normale à la face 12
    /NX12 XC12 CX sub def
    /NY12 YC12 CY sub def
    /NZ12 ZC12 CZ sub def
% rayon vers point de vue
    /RXvue12 XC12 XpointVue sub def
    /RYvue12 YC12 YpointVue sub def
    /RZvue12 ZC12 ZpointVue sub def
% produit scalaire
    /PS12 RXvue12 NX12 mul RYvue12 NY12 mul add RZvue12 NZ12 mul add def
% faceOne ABDCE
PS1 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YA def
    /Zcote ZA def
    /Xabscisse XA def
    CalcCoordinates
     moveto
    /Zcote ZB def
    /Xabscisse XB def
    /Yordonnee YB def
    CalcCoordinates
    lineto
    /Zcote ZC def
    /Xabscisse XC def
    /Yordonnee YC  def
    CalcCoordinates
    lineto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
    /Zcote ZE def
    /Xabscisse XE def
    /Yordonnee YE def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.1 0.1 0 setcmykcolor
fill
grestore
stroke
} if
% face2 EDILJ
PS2 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YE def
    /Zcote ZE def
    /Xabscisse XE def
    CalcCoordinates
     moveto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
    /Zcote ZI def
    /Xabscisse XI def
    /Yordonnee YI  def
    CalcCoordinates
    lineto
    /Zcote ZL def
    /Xabscisse XL def
    /Yordonnee YL def
    CalcCoordinates
    lineto
    /Zcote ZJ def
    /Xabscisse XJ def
    /Yordonnee YJ def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.15 0.15 0 setcmykcolor
fill
grestore
stroke
} if
% face3 EJMFA
PS3 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YE def
    /Zcote ZE def
    /Xabscisse XE def
    CalcCoordinates
     moveto
    /Zcote ZJ def
    /Xabscisse XJ def
    /Yordonnee YJ def
    CalcCoordinates
    lineto
    /Zcote ZM def
    /Xabscisse XM def
    /Yordonnee YM  def
    CalcCoordinates
    lineto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
    /Zcote ZA def
    /Xabscisse XA def
    /Yordonnee YA def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.2 0.2 0 setcmykcolor
fill
grestore
stroke
} if
% face4 AFNGB
PS4 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YA def
    /Zcote ZA def
    /Xabscisse XA def
    CalcCoordinates
     moveto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
    /Zcote ZN def
    /Xabscisse XN def
    /Yordonnee YN  def
    CalcCoordinates
    lineto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
    /Zcote ZB def
    /Xabscisse XB def
    /Yordonnee YB def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.25 0.25 0 setcmykcolor
fill
grestore
stroke
} if
% face5 BGOHC
PS5 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YB def
    /Zcote ZB def
    /Xabscisse XB def
    CalcCoordinates
     moveto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
    /Zcote ZO def
    /Xabscisse XO def
    /Yordonnee YO  def
    CalcCoordinates
    lineto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
    /Zcote ZC def
    /Xabscisse XC def
    /Yordonnee YC def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.3 0.3 0 setcmykcolor
fill
grestore
stroke
} if
% face6 CHKID
PS6 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YC def
    /Zcote ZC def
    /Xabscisse XC def
    CalcCoordinates
     moveto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
    /Zcote ZK def
    /Xabscisse XK def
    /Yordonnee YK  def
    CalcCoordinates
    lineto
    /Zcote ZI def
    /Xabscisse XI def
    /Yordonnee YI def
    CalcCoordinates
    lineto
    /Zcote ZD def
    /Xabscisse XD def
    /Yordonnee YD def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.35 0.35 0 setcmykcolor
fill
grestore
stroke
} if
% face7 KTSLI
PS7 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YK def
    /Zcote ZK def
    /Xabscisse XK def
    CalcCoordinates
     moveto
    /Zcote ZT def
    /Xabscisse XT def
    /Yordonnee YT def
    CalcCoordinates
    lineto
    /Zcote ZS def
    /Xabscisse XS def
    /Yordonnee YS  def
    CalcCoordinates
    lineto
    /Zcote ZL def
    /Xabscisse XL def
    /Yordonnee YL def
    CalcCoordinates
    lineto
    /Zcote ZI def
    /Xabscisse XI def
    /Yordonnee YI def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.4 0.4 0 setcmykcolor
fill
grestore
stroke
} if
% face8 LSRMJ
PS8 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YL def
    /Zcote ZL def
    /Xabscisse XL def
    CalcCoordinates
     moveto
    /Zcote ZS def
    /Xabscisse XS def
    /Yordonnee YS def
    CalcCoordinates
    lineto
    /Zcote ZR def
    /Xabscisse XR def
    /Yordonnee YR  def
    CalcCoordinates
    lineto
    /Zcote ZM def
    /Xabscisse XM def
    /Yordonnee YM def
    CalcCoordinates
    lineto
    /Zcote ZJ def
    /Xabscisse XJ def
    /Yordonnee YJ def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.45 0.45 0 setcmykcolor
fill
grestore
stroke
} if
% face9 MRQNF
PS9 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YM def
    /Zcote ZM def
    /Xabscisse XM def
    CalcCoordinates
     moveto
    /Zcote ZR def
    /Xabscisse XR def
    /Yordonnee YR def
    CalcCoordinates
    lineto
    /Zcote ZQ def
    /Xabscisse XQ def
    /Yordonnee YQ  def
    CalcCoordinates
    lineto
    /Zcote ZN def
    /Xabscisse XN def
    /Yordonnee YN def
    CalcCoordinates
    lineto
    /Zcote ZF def
    /Xabscisse XF def
    /Yordonnee YF def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.5 0.5 0 setcmykcolor
fill
grestore
stroke
} if
% face10 NQPOG
PS10 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YN def
    /Zcote ZN def
    /Xabscisse XN def
    CalcCoordinates
     moveto
    /Zcote ZQ def
    /Xabscisse XQ def
    /Yordonnee YQ def
    CalcCoordinates
    lineto
    /Zcote ZP def
    /Xabscisse XP def
    /Yordonnee YP  def
    CalcCoordinates
    lineto
    /Zcote ZO def
    /Xabscisse XO def
    /Yordonnee YO def
    CalcCoordinates
    lineto
    /Zcote ZG def
    /Xabscisse XG def
    /Yordonnee YG def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.55 0.55 0 setcmykcolor
fill
grestore
stroke
} if
% face11 OPTKH
PS11 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YO def
    /Zcote ZO def
    /Xabscisse XO def
    CalcCoordinates
     moveto
    /Zcote ZP def
    /Xabscisse XP def
    /Yordonnee YP def
    CalcCoordinates
    lineto
    /Zcote ZT def
    /Xabscisse XT def
    /Yordonnee YT  def
    CalcCoordinates
    lineto
    /Zcote ZK def
    /Xabscisse XK def
    /Yordonnee YK def
    CalcCoordinates
    lineto
    /Zcote ZH def
    /Xabscisse XH def
    /Yordonnee YH def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.6 0.6 0 setcmykcolor
fill
grestore
stroke
} if
% face12 PQRST
PS12 0 Condition { %
reduction reduction scale
1 setlinejoin
newpath
    /Yordonnee YP def
    /Zcote ZP def
    /Xabscisse XP def
    CalcCoordinates
     moveto
    /Zcote ZQ def
    /Xabscisse XQ def
    /Yordonnee YQ def
    CalcCoordinates
    lineto
    /Zcote ZR def
    /Xabscisse XR def
    /Yordonnee YR  def
    CalcCoordinates
    lineto
    /Zcote ZS def
    /Xabscisse XS def
    /Yordonnee YS def
    CalcCoordinates
    lineto
    /Zcote ZT def
    /Xabscisse XT def
    /Yordonnee YT def
    CalcCoordinates
    lineto
closepath
gsave
0.05 0.65 0.65 0 setcmykcolor
fill
grestore
stroke
} if
}
def
end