1 ! : init-4D-demo ( -- space )
\r
3 ! espace de dimension 4 et de couleur 0,3 0.3 0.3
\r
6 { 0.3 0.3 0.3 } >>ambient-color
\r
7 { 100 150 100 150 100 150 100 150 } "4cube1" 4cube suffix-solids
\r
8 { 160 180 160 180 160 180 160 180 } "4cube2" 4cube suffix-solids
\r
10 { -100 -100 -100 -100 } >>position
\r
11 { 0.2 0.7 0.1 } >>color
\r
14 ! : init-3D-demo ( -- space )
\r
16 ! espace de dimension 4 et de couleur 0,3 0.3 0.3
\r
19 { 0.3 0.3 0.3 } >>ambient-color
\r
20 { 100 150 100 150 100 150 } "3cube1" 3cube suffix-solids
\r
21 ! { -150 -10 -150 -10 -150 -10 -150 -10 } "4cube2" 4cube suffix-solids
\r
23 { -100 -100 -100 -100 } >>position
\r
24 { 0.2 0.7 0.1 } >>color
\r
34 { 1 -1 -5 } cut-solid
\r
35 { -1 -1 -21 } cut-solid
\r
36 { -1 0 -12 } cut-solid
\r
37 { 1 2 16 } cut-solid
\r
39 : solid1 ( -- solid )
\r
43 { 1 -1 -5 } cut-solid
\r
44 { -1 -1 -21 } cut-solid
\r
45 { -1 0 -12 } cut-solid
\r
46 { 1 2 16 } cut-solid
\r
50 : solid2 ( -- solid )
\r
54 { -1 1 -10 } cut-solid
\r
55 { -1 -1 -28 } cut-solid
\r
56 { 1 0 13 } cut-solid
\r
57 ! { 1 2 16 } cut-solid
\r
62 : solid3 ( -- solid )
\r
67 { 1 0 16 } cut-solid
\r
68 { -1 0 -36 } cut-solid
\r
69 { 0 1 1 } cut-solid
\r
70 { 0 -1 -17 } cut-solid
\r
71 ! { 1 2 16 } cut-solid
\r
77 : solid4 ( -- solid )
\r
82 { 1 0 21 } cut-solid
\r
83 { -1 0 -36 } cut-solid
\r
84 { 0 1 1 } cut-solid
\r
85 { 0 -1 -17 } cut-solid
\r
90 : solid5 ( -- solid )
\r
95 { 1 0 6 } cut-solid
\r
96 { -1 0 -17 } cut-solid
\r
97 { 0 1 17 } cut-solid
\r
98 { 0 -1 -19 } cut-solid
\r
103 : solid7 ( -- solid )
\r
108 { 1 0 38 } cut-solid
\r
109 { 1 -5 -66 } cut-solid
\r
110 { -2 1 -75 } cut-solid
\r
115 : solid6s ( -- seq )
\r
116 solid3 clone solid2 clone subtract
\r
119 : space1 ( -- space )
\r
122 ! solid3 suffix-solids
\r
123 solid1 suffix-solids
\r
124 solid2 suffix-solids
\r
125 ! solid6s [ suffix-solids ] each
\r
126 solid4 suffix-solids
\r
127 ! solid5 suffix-solids
\r
128 solid7 suffix-solids
\r
129 { 1 1 1 } >>ambient-color
\r
131 { -100 -100 } >>position
\r
132 { 0.2 0.7 0.1 } >>color
\r
136 : space2 ( -- space )
\r
139 ! 4cube suffix-solids
\r
140 { 1 1 1 } >>ambient-color
\r
142 { -100 -100 } >>position
\r
143 { 0.2 0.7 0.1 } >>color
\r