'=========================================================================== ' Subject: A SPIN ON 3D Date: 07-25-99 (11:59) ' Author: Marc Santa Code: QB, QBasic, PDS ' Origin: santa@tir.com Packet: GRAPHICS.ABC '=========================================================================== SCREEN 7, 0, 1, 0 CLS zz# = 0 GAIN: 'LOCATE 1, 1 'PRINT INT(zz# * 100) PCOPY 1, 0 IF A# = 1 THEN FOR C = 300 TO 319 FOR I = 100 TO 200 IF POINT(C, I) = 10 THEN FOR W = 1 TO 100 CIRCLE (C, I), W, 4 NEXT PCOPY 1, 0 GOTO VBALLS END IF NEXT NEXT END IF CLS C# = 160 R# = 100 z# = 1 cc# = 0 rr# = 1 IF A# = 0 THEN zz# = zz# + .0001 IF A# = 1 THEN zz# = zz# - .01 DO cc# = cc# + .01 rr# = rr# - .01 C# = C# + cc# R# = R# + rr# z# = z# + zz# IF INT(zz# * 100) = 3 THEN LOCATE 2, 1: PRINT "READY..." IF INT(zz# * 100) > 3 THEN A# = 1 IF cc# > 1 THEN GOTO GAIN PSET (C# / z#, R# / z#), 10 LOOP VBALLS: DIM X(1 TO 800) DIM Y(1 TO 800) DIM V(1 TO 800) DIM E(1 TO 800) FOR C = 320 TO 340 FOR R = 200 TO 220 t# = t# + 1 X(t#) = C Y(t#) = R NEXT NEXT DO CLS A# = A# + 1 IF A# = 100 THEN GOTO VBALL2 FOR I = 1 TO t# RANDOMIZE TIMER xx# = INT(RND * 7) - 2 yy# = INT(RND * 7) - 2 X(I) = X(I) - xx# Y(I) = Y(I) - yy# PSET (X(I), Y(I)), 10 NEXT PCOPY 1, 0 LOOP VBALL2: p# = 0 FOR C = 150 TO 170 FOR R = 90 TO 110 p# = p# + 1 V(p#) = C E(p#) = R NEXT NEXT YO: z# = 0 DO z# = z# + 1 IF z# = 150 AND n# = 10 THEN END IF z# = 150 THEN GOTO YA CLS FOR I = 1 TO p# A = X(I) B = Y(I) IF X(I) > V(I) THEN X(I) = X(I) - 1 IF X(I) < V(I) THEN X(I) = X(I) + 1 IF Y(I) > E(I) THEN Y(I) = Y(I) - 1 IF Y(I) < E(I) THEN Y(I) = Y(I) + 1 IF POINT(X(I), Y(I)) = 10 THEN X(I) = A Y(I) = B END IF PSET (X(I), Y(I)), 10 NEXT PCOPY 1, 0 LOOP YA: n# = n# + 1 FOR I = 1 TO p# - n# V(I) = E(I + INT(RND * n#)) E(I) = E(I + INT(RND * n#)) NEXT V(p#) = E(1) E(p#) = E(1) GOTO YO