1 DECLARE SUB ruut2 (x!, y!, z!, s!)
\r
2 DECLARE SUB ruut (x!, y!, z!, s!)
\r
3 DECLARE SUB kuus (x, y, z, s)
\r
4 DECLARE SUB porand ()
\r
5 DECLARE SUB addp (x, y, z)
\r
6 ' kursor keys and to z, w - rotate
\r
7 ' <SPACE> - speed down
\r
10 DECLARE SUB start ()
\r
11 DECLARE SUB addsq (x1%, y1%, z1%)
\r
12 DECLARE SUB getcor ()
\r
13 DECLARE SUB mulcor ()
\r
14 DECLARE SUB nait3d ()
\r
15 DECLARE SUB calcsin ()
\r
16 DIM SHARED xn(4000), yn(4000), zn(4000)
\r
17 DIM SHARED x(4000), y(4000), z(4000)
\r
19 DIM SHARED xo(4000), yo(4000), zo(4000)
\r
20 DIM SHARED point1(4000), point2(4000)
\r
21 DIM SHARED col(4000)
\r
22 DIM SHARED nump, numl
\r
23 DIM SHARED myx, myy, myz, mye, myk
\r
38 xn(nump + 1) = -100 + x
\r
40 zn(nump + 1) = -100 + z
\r
42 xn(nump + 2) = 100 + x
\r
44 zn(nump + 2) = -100 + z
\r
46 xn(nump + 3) = 100 + x
\r
48 zn(nump + 3) = 100 + z
\r
50 xn(nump + 4) = -100 + x
\r
52 zn(nump + 4) = 100 + z
\r
54 point1(numl + 1) = nump + 1
\r
55 point2(numl + 1) = nump + 2
\r
58 point1(numl + 2) = nump + 2
\r
59 point2(numl + 2) = nump + 3
\r
62 point1(numl + 3) = nump + 3
\r
63 point2(numl + 3) = nump + 4
\r
66 point1(numl + 4) = nump + 4
\r
67 point2(numl + 4) = nump + 1
\r
106 xn(nump + 8) = -150
\r
111 point1(numl + 1) = nump + 1
\r
112 point2(numl + 1) = nump + 2
\r
114 point1(numl + 2) = nump + 2
\r
115 point2(numl + 2) = nump + 3
\r
117 point1(numl + 3) = nump + 3
\r
118 point2(numl + 3) = nump + 4
\r
120 point1(numl + 4) = nump + 4
\r
121 point2(numl + 4) = nump + 1
\r
123 point1(numl + 5) = nump + 5
\r
124 point2(numl + 5) = nump + 6
\r
126 point1(numl + 6) = nump + 6
\r
127 point2(numl + 6) = nump + 7
\r
129 point1(numl + 7) = nump + 7
\r
130 point2(numl + 7) = nump + 8
\r
132 point1(numl + 8) = nump + 8
\r
133 point2(numl + 8) = nump + 5
\r
135 point1(numl + 9) = nump + 5
\r
136 point2(numl + 9) = nump + 1
\r
138 point1(numl + 10) = nump + 6
\r
139 point2(numl + 10) = nump + 2
\r
141 point1(numl + 11) = nump + 7
\r
142 point2(numl + 11) = nump + 3
\r
144 point1(numl + 12) = nump + 8
\r
145 point2(numl + 12) = nump + 4
\r
153 xn(nump + 1) = -150
\r
154 yn(nump + 1) = -125 + 201
\r
157 xn(nump + 2) = -150
\r
158 yn(nump + 2) = -125 + 201
\r
161 xn(nump + 3) = -150
\r
162 yn(nump + 3) = -125
\r
165 xn(nump + 4) = -150
\r
166 yn(nump + 4) = -125
\r
169 point1(numl + 1) = nump + 1
\r
170 point2(numl + 1) = nump + 2
\r
172 point1(numl + 2) = nump + 2
\r
173 point2(numl + 2) = nump + 3
\r
175 point1(numl + 3) = nump + 3
\r
176 point2(numl + 3) = nump + 4
\r
178 point1(numl + 4) = nump + 4
\r
179 point2(numl + 4) = nump + 1
\r
185 FOR x = -1000 TO 1000 STEP 250
\r
186 FOR z = -1000 TO 1000 STEP 250
\r
195 SUB kuus (x, y, z, s)
\r
199 FOR a = 0 + f TO 6 + f STEP 6.28 / 8
\r
204 xn(nump + b) = x1 + x
\r
206 zn(nump + b) = y1 + z
\r
210 point1(numl + 1) = nump + 1
\r
211 point2(numl + 1) = nump + 2
\r
214 point1(numl + 2) = nump + 2
\r
215 point2(numl + 2) = nump + 3
\r
218 point1(numl + 3) = nump + 3
\r
219 point2(numl + 3) = nump + 4
\r
222 point1(numl + 4) = nump + 4
\r
223 point2(numl + 4) = nump + 5
\r
226 point1(numl + 5) = nump + 5
\r
227 point2(numl + 5) = nump + 6
\r
231 point1(numl + 6) = nump + 6
\r
232 point2(numl + 6) = nump + 7
\r
235 point1(numl + 7) = nump + 7
\r
236 point2(numl + 7) = nump + 8
\r
239 point1(numl + 8) = nump + 8
\r
240 point2(numl + 8) = nump + 1
\r
257 myx = myx + SIN(deg1) * mye
\r
258 myz = myz + COS(deg1) * mye
\r
260 myx = myx + COS(deg1) * myk
\r
261 myz = myz - SIN(deg1) * myk
\r
266 C1 = COS(deg1): S1 = SIN(deg1)
\r
267 C2 = COS(Deg2): S2 = SIN(Deg2)
\r
275 x1 = (xo * C1 - zo * S1)
\r
276 z1 = (xo * S1 + zo * C1)
\r
278 y1 = (yo * C2 - z1 * S2)
\r
279 z2 = (yo * S2 + z1 * C2)
\r
287 x(a) = 320 + (x1 / z2 * 500)
\r
288 y(a) = 240 + (y1 / z2 * 500)
\r
296 IF xo(p1) = -1 OR xo(p2) = -1 THEN ELSE LINE (xo(p1), yo(p1))-(xo(p2), yo(p2)), 0
\r
297 IF x(p1) = -1 OR x(p2) = -1 THEN ELSE LINE (x(p1), y(p1))-(x(p2), y(p2)), col(a)
\r
357 FOR x = -100 TO 0 STEP 12.067 + .3
\r
358 FOR z = -100 TO 0 STEP 12.067 + .3
\r
359 kuus x, -125, z, 6.53
\r
360 ruut x + 6.033 + .15, -125, z + 6.033 + .15, 3.111 + .3
\r
364 FOR y = -100 TO 0 STEP 20.3
\r
365 FOR x = -100 TO 0 STEP 20.3
\r
366 ruut2 x, y, 200, 10
\r
373 SUB ruut (x, y, z, s)
\r
376 zn(nump + 1) = z + s
\r
378 xn(nump + 2) = x + s
\r
384 zn(nump + 3) = z - s
\r
386 xn(nump + 4) = x - s
\r
390 point1(numl + 1) = nump + 1
\r
391 point2(numl + 1) = nump + 2
\r
394 point1(numl + 2) = nump + 2
\r
395 point2(numl + 2) = nump + 3
\r
398 point1(numl + 3) = nump + 3
\r
399 point2(numl + 3) = nump + 4
\r
402 point1(numl + 4) = nump + 4
\r
403 point2(numl + 4) = nump + 1
\r
410 SUB ruut2 (x, y, z, s)
\r
411 xn(nump + 1) = x - s
\r
412 yn(nump + 1) = y - s
\r
415 xn(nump + 2) = x + s
\r
416 yn(nump + 2) = y - s
\r
419 xn(nump + 3) = x + s
\r
420 yn(nump + 3) = y + s
\r
423 xn(nump + 4) = x - s
\r
424 yn(nump + 4) = y + s
\r
427 point1(numl + 1) = nump + 1
\r
428 point2(numl + 1) = nump + 2
\r
431 point1(numl + 2) = nump + 2
\r
432 point2(numl + 2) = nump + 3
\r
435 point1(numl + 3) = nump + 3
\r
436 point2(numl + 3) = nump + 4
\r
439 point1(numl + 4) = nump + 4
\r
440 point2(numl + 4) = nump + 1
\r