Home » Archimedes archive » Acorn User » AU 1998-09.adf » Regulars » StarInfo/Stoner/CTKiss1K
StarInfo/Stoner/CTKiss1K
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/Stoner/CTKiss1K |
| Read OK: | ✔ |
| File size: | 0400 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
1REM Circles That Kiss 1K
2REM by Nigel Stoner 19/5/97
3REM from the equation nI=dI-radI
4REM NOT!
5t%=RND(-TIME):DIM cx%(1000),cy%(1000),cr%(1000)
6MODE27:GCOL6:OFF:COLOUR0,0,0,128:COLOUR6,180,180,240:COLOUR4,0,60,200
7cx%(0)=640:cy%(0)=512:cr%(0)=RND(32)+4:GCOL6:PROCbubble(cx%(0),cy%(0),cr%(0)):upto%=0:dia%=0
8FOR a%=1 TO 550:REPEAT:z=a%:REPEAT:z%=RND(z):cx%(a%)=cx%(z%)+RND(128)-64:cy%(a%)=cy%(z%)+RND(128)-64:z=z-0.2+(a% AND z%<0):UNTILPOINT(cx%(a%),cy%(a%))=0:min%=6144:FOR b%=0 TO a%-1:IF ABS(cx%(a%)-cx%(b%))<128ANDABS(cy%(a%)-cy%(b%))<128THEN
9dx%=(cx%(a%)-cx%(b%))^2:dy%=(cy%(a%)-cy%(b%))^2:dx%=dx%+(cr%(b%)^2ANDSGNdx%)-(cr%(b%)^2ANDNOTSGNdx%):dy%=dy%+(cr%(b%)^2ANDSGNdy%)-(cr%(b%)^2ANDNOTSGNdy%):dx%+=dy%:IFdx%<min%THENmin%=dx%:n%=b%
10ENDIF:NEXT b%:UNTILmin%>8ANDmin%<6144
11FORrad%=116 TO 1STEP -2:IF(cx%(a%)-cx%(n%))^2+(cy%(a%)-cy%(n%))^2<rad%^2 THENdia%=rad%-cr%(n%)
12NEXTrad%:cr%(a%)=dia%:PROCbubble(cx%(a%),cy%(a%),cr%(a%)):NEXT a%
13END
14
15DEFPROCbubble(x%,y%,r%)
16LOCAL c%,off%:off%=r%/4
17GCOL 3,1:FOR c%=0 TO 5:CIRCLEFILLx%,y%,r%:WAIT:NEXTc%
18GCOL6:CIRCLEFILLx%,y%,(r%):GCOL4:CIRCLEFILLx%,y%,(r%)-4:GCOL6:CIRCLEFILLx%-off%,y%+off%,r%*.2:GCOL7:CIRCLEFILLx%-off%,y%+off%,r%*.1:ENDPROC
� Circles That Kiss 1K � by Nigel Stoner 19/5/97 "� from the equation nI=dI-radI � NOT! ,t%=�(-�):� cx%(1000),cy%(1000),cr%(1000) 2�27:�6:�:�0,0,0,128:�6,180,180,240:�4,0,60,200 Xcx%(0)=640:cy%(0)=512:cr%(0)=�(32)+4:�6:�bubble(cx%(0),cy%(0),cr%(0)):upto%=0:dia%=0 �� a%=1 � 550:�:z=a%:�:z%=�(z):cx%(a%)=cx%(z%)+�(128)-64:cy%(a%)=cy%(z%)+�(128)-64:z=z-0.2+(a% � z%<0):��cx%(a%),cy%(a%))=0:min%=6144:� b%=0 � a%-1:� �(cx%(a%)-cx%(b%))<128��(cy%(a%)-cy%(b%))<128� �dx%=(cx%(a%)-cx%(b%))^2:dy%=(cy%(a%)-cy%(b%))^2:dx%=dx%+(cr%(b%)^2��dx%)-(cr%(b%)^2���dx%):dy%=dy%+(cr%(b%)^2��dy%)-(cr%(b%)^2���dy%):dx%+=dy%:�dx%<min%�min%=dx%:n%=b% �:� b%:�min%>8�min%<6144 X�rad%=116 � 1� -2:�(cx%(a%)-cx%(n%))^2+(cy%(a%)-cy%(n%))^2<rad%^2 �dia%=rad%-cr%(n%) <�rad%:cr%(a%)=dia%:�bubble(cx%(a%),cy%(a%),cr%(a%)):� a% � ��bubble(x%,y%,r%) � c%,off%:off%=r%/4 (� 3,1:� c%=0 � 5:ȏȐx%,y%,r%:Ȗ:�c% e�6:ȏȐx%,y%,(r%):�4:ȏȐx%,y%,(r%)-4:�6:ȏȐx%-off%,y%+off%,r%*.2:�7:ȏȐx%-off%,y%+off%,r%*.1:� �
00000000 0d 00 01 1a f4 20 43 69 72 63 6c 65 73 20 54 68 |..... Circles Th| 00000010 61 74 20 4b 69 73 73 20 31 4b 0d 00 02 1d f4 20 |at Kiss 1K..... | 00000020 62 79 20 4e 69 67 65 6c 20 53 74 6f 6e 65 72 20 |by Nigel Stoner | 00000030 31 39 2f 35 2f 39 37 0d 00 03 22 f4 20 66 72 6f |19/5/97...". fro| 00000040 6d 20 74 68 65 20 65 71 75 61 74 69 6f 6e 20 6e |m the equation n| 00000050 49 3d 64 49 2d 72 61 64 49 0d 00 04 0a f4 20 4e |I=dI-radI..... N| 00000060 4f 54 21 0d 00 05 2c 74 25 3d b3 28 2d 91 29 3a |OT!...,t%=.(-.):| 00000070 de 20 63 78 25 28 31 30 30 30 29 2c 63 79 25 28 |. cx%(1000),cy%(| 00000080 31 30 30 30 29 2c 63 72 25 28 31 30 30 30 29 0d |1000),cr%(1000).| 00000090 00 06 32 eb 32 37 3a e6 36 3a 87 3a fb 30 2c 30 |..2.27:.6:.:.0,0| 000000a0 2c 30 2c 31 32 38 3a fb 36 2c 31 38 30 2c 31 38 |,0,128:.6,180,18| 000000b0 30 2c 32 34 30 3a fb 34 2c 30 2c 36 30 2c 32 30 |0,240:.4,0,60,20| 000000c0 30 0d 00 07 58 63 78 25 28 30 29 3d 36 34 30 3a |0...Xcx%(0)=640:| 000000d0 63 79 25 28 30 29 3d 35 31 32 3a 63 72 25 28 30 |cy%(0)=512:cr%(0| 000000e0 29 3d b3 28 33 32 29 2b 34 3a e6 36 3a f2 62 75 |)=.(32)+4:.6:.bu| 000000f0 62 62 6c 65 28 63 78 25 28 30 29 2c 63 79 25 28 |bble(cx%(0),cy%(| 00000100 30 29 2c 63 72 25 28 30 29 29 3a 75 70 74 6f 25 |0),cr%(0)):upto%| 00000110 3d 30 3a 64 69 61 25 3d 30 0d 00 08 c7 e3 20 61 |=0:dia%=0..... a| 00000120 25 3d 31 20 b8 20 35 35 30 3a f5 3a 7a 3d 61 25 |%=1 . 550:.:z=a%| 00000130 3a f5 3a 7a 25 3d b3 28 7a 29 3a 63 78 25 28 61 |:.:z%=.(z):cx%(a| 00000140 25 29 3d 63 78 25 28 7a 25 29 2b b3 28 31 32 38 |%)=cx%(z%)+.(128| 00000150 29 2d 36 34 3a 63 79 25 28 61 25 29 3d 63 79 25 |)-64:cy%(a%)=cy%| 00000160 28 7a 25 29 2b b3 28 31 32 38 29 2d 36 34 3a 7a |(z%)+.(128)-64:z| 00000170 3d 7a 2d 30 2e 32 2b 28 61 25 20 80 20 7a 25 3c |=z-0.2+(a% . z%<| 00000180 30 29 3a fd b0 63 78 25 28 61 25 29 2c 63 79 25 |0):..cx%(a%),cy%| 00000190 28 61 25 29 29 3d 30 3a 6d 69 6e 25 3d 36 31 34 |(a%))=0:min%=614| 000001a0 34 3a e3 20 62 25 3d 30 20 b8 20 61 25 2d 31 3a |4:. b%=0 . a%-1:| 000001b0 e7 20 94 28 63 78 25 28 61 25 29 2d 63 78 25 28 |. .(cx%(a%)-cx%(| 000001c0 62 25 29 29 3c 31 32 38 80 94 28 63 79 25 28 61 |b%))<128..(cy%(a| 000001d0 25 29 2d 63 79 25 28 62 25 29 29 3c 31 32 38 8c |%)-cy%(b%))<128.| 000001e0 0d 00 09 ab 64 78 25 3d 28 63 78 25 28 61 25 29 |....dx%=(cx%(a%)| 000001f0 2d 63 78 25 28 62 25 29 29 5e 32 3a 64 79 25 3d |-cx%(b%))^2:dy%=| 00000200 28 63 79 25 28 61 25 29 2d 63 79 25 28 62 25 29 |(cy%(a%)-cy%(b%)| 00000210 29 5e 32 3a 64 78 25 3d 64 78 25 2b 28 63 72 25 |)^2:dx%=dx%+(cr%| 00000220 28 62 25 29 5e 32 80 b4 64 78 25 29 2d 28 63 72 |(b%)^2..dx%)-(cr| 00000230 25 28 62 25 29 5e 32 80 ac b4 64 78 25 29 3a 64 |%(b%)^2...dx%):d| 00000240 79 25 3d 64 79 25 2b 28 63 72 25 28 62 25 29 5e |y%=dy%+(cr%(b%)^| 00000250 32 80 b4 64 79 25 29 2d 28 63 72 25 28 62 25 29 |2..dy%)-(cr%(b%)| 00000260 5e 32 80 ac b4 64 79 25 29 3a 64 78 25 2b 3d 64 |^2...dy%):dx%+=d| 00000270 79 25 3a e7 64 78 25 3c 6d 69 6e 25 8c 6d 69 6e |y%:.dx%<min%.min| 00000280 25 3d 64 78 25 3a 6e 25 3d 62 25 0d 00 0a 1c cd |%=dx%:n%=b%.....| 00000290 3a ed 20 62 25 3a fd 6d 69 6e 25 3e 38 80 6d 69 |:. b%:.min%>8.mi| 000002a0 6e 25 3c 36 31 34 34 0d 00 0b 58 e3 72 61 64 25 |n%<6144...X.rad%| 000002b0 3d 31 31 36 20 b8 20 31 88 20 2d 32 3a e7 28 63 |=116 . 1. -2:.(c| 000002c0 78 25 28 61 25 29 2d 63 78 25 28 6e 25 29 29 5e |x%(a%)-cx%(n%))^| 000002d0 32 2b 28 63 79 25 28 61 25 29 2d 63 79 25 28 6e |2+(cy%(a%)-cy%(n| 000002e0 25 29 29 5e 32 3c 72 61 64 25 5e 32 20 8c 64 69 |%))^2<rad%^2 .di| 000002f0 61 25 3d 72 61 64 25 2d 63 72 25 28 6e 25 29 0d |a%=rad%-cr%(n%).| 00000300 00 0c 3c ed 72 61 64 25 3a 63 72 25 28 61 25 29 |..<.rad%:cr%(a%)| 00000310 3d 64 69 61 25 3a f2 62 75 62 62 6c 65 28 63 78 |=dia%:.bubble(cx| 00000320 25 28 61 25 29 2c 63 79 25 28 61 25 29 2c 63 72 |%(a%),cy%(a%),cr| 00000330 25 28 61 25 29 29 3a ed 20 61 25 0d 00 0d 05 e0 |%(a%)):. a%.....| 00000340 0d 00 0e 04 0d 00 0f 16 dd f2 62 75 62 62 6c 65 |..........bubble| 00000350 28 78 25 2c 79 25 2c 72 25 29 0d 00 10 17 ea 20 |(x%,y%,r%)..... | 00000360 63 25 2c 6f 66 66 25 3a 6f 66 66 25 3d 72 25 2f |c%,off%:off%=r%/| 00000370 34 0d 00 11 28 e6 20 33 2c 31 3a e3 20 63 25 3d |4...(. 3,1:. c%=| 00000380 30 20 b8 20 35 3a c8 8f c8 90 78 25 2c 79 25 2c |0 . 5:....x%,y%,| 00000390 72 25 3a c8 96 3a ed 63 25 0d 00 12 65 e6 36 3a |r%:..:.c%...e.6:| 000003a0 c8 8f c8 90 78 25 2c 79 25 2c 28 72 25 29 3a e6 |....x%,y%,(r%):.| 000003b0 34 3a c8 8f c8 90 78 25 2c 79 25 2c 28 72 25 29 |4:....x%,y%,(r%)| 000003c0 2d 34 3a e6 36 3a c8 8f c8 90 78 25 2d 6f 66 66 |-4:.6:....x%-off| 000003d0 25 2c 79 25 2b 6f 66 66 25 2c 72 25 2a 2e 32 3a |%,y%+off%,r%*.2:| 000003e0 e6 37 3a c8 8f c8 90 78 25 2d 6f 66 66 25 2c 79 |.7:....x%-off%,y| 000003f0 25 2b 6f 66 66 25 2c 72 25 2a 2e 31 3a e1 0d ff |%+off%,r%*.1:...| 00000400
.