Home » Archimedes archive » Acorn User » AU 1998-09.adf » Regulars » StarInfo/Vibe/TrBall

StarInfo/Vibe/TrBall

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1998-09.adf » Regulars
Filename: StarInfo/Vibe/TrBall
Read OK:
File size: 0215 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > TRBALL
   20
   30DIM MD% 64:MD%!00=1:MD%!04=800:MD%!08=600:MD%!12=5:MD%!16=-1:MD%!20=-1:MODE MD%:OFF
   40
   50REPEAT
   60PROCC(RND(1600),RND(1200),RND(100)+50,RND(255),RND(255),RND(255))
   70UNTIL0
   80
   90DEFPROCC(XC%,YC%,RC%,CR%,CG%,CB%)
  100LOCAL X%,Y%,X1%,Y1%,D%,D1%,P%,R%,G%,B%
  110FORY%=-RC%TORC%STEP2:Y2%=Y%+YC%
  120D%=SQR(RC%*RC%-Y%*Y%)
  130FORX%=-D%TOD%STEP2:X2%=X%+XC%:D1%=SQR(X%*X%+Y%*Y%)
  140P%=POINT(X2%,Y2%):R%=P%AND&FF:G%=(P%>>8)AND&FF:B%=(P%>>16)AND&FF
  150R%=(CR%*(RC%-D1%)+R%*D1%)/RC%
  160G%=(CG%*(RC%-D1%)+G%*D1%)/RC%
  170B%=(CB%*(RC%-D1%)+B%*D1%)/RC%
  180GCOL R%,G%,B%:POINT X2%,Y2%
  190NEXT,
  200ENDPROC

� > TRBALL

P� MD% 64:MD%!00=1:MD%!04=800:MD%!08=600:MD%!12=5:MD%!16=-1:MD%!20=-1:� MD%:�
(
2�
<6�C(�(1600),�(1200),�(100)+50,�(255),�(255),�(255))
F�0
P
Z ��C(XC%,YC%,RC%,CR%,CG%,CB%)
d&� X%,Y%,X1%,Y1%,D%,D1%,P%,R%,G%,B%
n�Y%=-RC%�RC%�2:Y2%=Y%+YC%
xD%=�(RC%*RC%-Y%*Y%)
�.�X%=-D%�D%�2:X2%=X%+XC%:D1%=�(X%*X%+Y%*Y%)
�9P%=�X2%,Y2%):R%=P%�&FF:G%=(P%>>8)�&FF:B%=(P%>>16)�&FF
�!R%=(CR%*(RC%-D1%)+R%*D1%)/RC%
�!G%=(CG%*(RC%-D1%)+G%*D1%)/RC%
�!B%=(CB%*(RC%-D1%)+B%*D1%)/RC%
�� R%,G%,B%:Ȓ X2%,Y2%
��,
��
�
00000000  0d 00 0a 0e f4 20 3e 20  54 52 42 41 4c 4c 0d 00  |..... > TRBALL..|
00000010  14 04 0d 00 1e 50 de 20  4d 44 25 20 36 34 3a 4d  |.....P. MD% 64:M|
00000020  44 25 21 30 30 3d 31 3a  4d 44 25 21 30 34 3d 38  |D%!00=1:MD%!04=8|
00000030  30 30 3a 4d 44 25 21 30  38 3d 36 30 30 3a 4d 44  |00:MD%!08=600:MD|
00000040  25 21 31 32 3d 35 3a 4d  44 25 21 31 36 3d 2d 31  |%!12=5:MD%!16=-1|
00000050  3a 4d 44 25 21 32 30 3d  2d 31 3a eb 20 4d 44 25  |:MD%!20=-1:. MD%|
00000060  3a 87 0d 00 28 04 0d 00  32 05 f5 0d 00 3c 36 f2  |:...(...2....<6.|
00000070  43 28 b3 28 31 36 30 30  29 2c b3 28 31 32 30 30  |C(.(1600),.(1200|
00000080  29 2c b3 28 31 30 30 29  2b 35 30 2c b3 28 32 35  |),.(100)+50,.(25|
00000090  35 29 2c b3 28 32 35 35  29 2c b3 28 32 35 35 29  |5),.(255),.(255)|
000000a0  29 0d 00 46 06 fd 30 0d  00 50 04 0d 00 5a 20 dd  |)..F..0..P...Z .|
000000b0  f2 43 28 58 43 25 2c 59  43 25 2c 52 43 25 2c 43  |.C(XC%,YC%,RC%,C|
000000c0  52 25 2c 43 47 25 2c 43  42 25 29 0d 00 64 26 ea  |R%,CG%,CB%)..d&.|
000000d0  20 58 25 2c 59 25 2c 58  31 25 2c 59 31 25 2c 44  | X%,Y%,X1%,Y1%,D|
000000e0  25 2c 44 31 25 2c 50 25  2c 52 25 2c 47 25 2c 42  |%,D1%,P%,R%,G%,B|
000000f0  25 0d 00 6e 1d e3 59 25  3d 2d 52 43 25 b8 52 43  |%..n..Y%=-RC%.RC|
00000100  25 88 32 3a 59 32 25 3d  59 25 2b 59 43 25 0d 00  |%.2:Y2%=Y%+YC%..|
00000110  78 17 44 25 3d b6 28 52  43 25 2a 52 43 25 2d 59  |x.D%=.(RC%*RC%-Y|
00000120  25 2a 59 25 29 0d 00 82  2e e3 58 25 3d 2d 44 25  |%*Y%).....X%=-D%|
00000130  b8 44 25 88 32 3a 58 32  25 3d 58 25 2b 58 43 25  |.D%.2:X2%=X%+XC%|
00000140  3a 44 31 25 3d b6 28 58  25 2a 58 25 2b 59 25 2a  |:D1%=.(X%*X%+Y%*|
00000150  59 25 29 0d 00 8c 39 50  25 3d b0 58 32 25 2c 59  |Y%)...9P%=.X2%,Y|
00000160  32 25 29 3a 52 25 3d 50  25 80 26 46 46 3a 47 25  |2%):R%=P%.&FF:G%|
00000170  3d 28 50 25 3e 3e 38 29  80 26 46 46 3a 42 25 3d  |=(P%>>8).&FF:B%=|
00000180  28 50 25 3e 3e 31 36 29  80 26 46 46 0d 00 96 21  |(P%>>16).&FF...!|
00000190  52 25 3d 28 43 52 25 2a  28 52 43 25 2d 44 31 25  |R%=(CR%*(RC%-D1%|
000001a0  29 2b 52 25 2a 44 31 25  29 2f 52 43 25 0d 00 a0  |)+R%*D1%)/RC%...|
000001b0  21 47 25 3d 28 43 47 25  2a 28 52 43 25 2d 44 31  |!G%=(CG%*(RC%-D1|
000001c0  25 29 2b 47 25 2a 44 31  25 29 2f 52 43 25 0d 00  |%)+G%*D1%)/RC%..|
000001d0  aa 21 42 25 3d 28 43 42  25 2a 28 52 43 25 2d 44  |.!B%=(CB%*(RC%-D|
000001e0  31 25 29 2b 42 25 2a 44  31 25 29 2f 52 43 25 0d  |1%)+B%*D1%)/RC%.|
000001f0  00 b4 19 e6 20 52 25 2c  47 25 2c 42 25 3a c8 92  |.... R%,G%,B%:..|
00000200  20 58 32 25 2c 59 32 25  0d 00 be 06 ed 2c 0d 00  | X2%,Y2%.....,..|
00000210  c8 05 e1 0d ff                                    |.....|
00000215