10
20
30 :
40 MODE 2
50 REPEAT
60 r%=RND(512):h%=RND(1280):v%=RND(1024):c%=RND(8)-1
70 IF RND(2)=1 PROCcircle(h%,v%,r%,c%) ELSE PROCfilledcircle(h%,v%,r%,c%)
80 UNTIL FALSE
90 DEFPROCcircle(h%,v%,r%,c%)
100 VDU 29,h%;v%;:GCOL 0,c%
110 x%=r%:y%=0
120 LET z%=x%/2
130 REPEAT
140 PLOT 69,x%,y%
150 PLOT 69,x%,-y%
160 PLOT 69,-x%,-y%
170 PLOT 69,-x%,y%
180 PLOT 69,y%,x%
190 PLOT 69,y%,-x%
200 PLOT 69,-y%,-x%
210 PLOT 69,-y%,x%
220 LET y%=y%+1
230 LET z%=z%-y%
240 IF z%<0 THEN z%=z%+x%:x%=x%-1
250 UNTIL x%<y%
260 ENDPROC
270 DEFPROCfilledcircle(h%,v%,r%,c%)
280 VDU 29,h%;v%;:GCOL 0,c%
290 x%=r%:y%=0
300 LET z%=x%/2
310 REPEAT
320 MOVE x%,y%:DRAW -x%,y%
330 MOVE y%,x%:DRAW -y%,x%
340 MOVE x%,-y%:DRAW -x%,-y%
350 MOVE y%,-x%:DRAW -y%,-x%
360 LET y%=y%+1
370 LET z%=z%-y%
380 IF z%<0 THEN z%=z%+x%:x%=x%-1
390 UNTIL x%<y%
400 ENDPROC