10 REM BASIC MANDELBROT SET PLOTTER 20 REM BY N.MCLEAN 30 : 40 GOSUB 390 50 GOSUB 310 60 : 70 REM MAIN LOOP 80 FOR J=20 TO 180 STEP 1 90 FOR I=80 TO 240 STEP 2 100 Q=((I-80)/54)-2:W=((J-20)/54)-1.5 110 GOSUB 200 120 IF B=1 THEN 150 130 E=A AND 3 140 GOSUB 260 150 NEXT I,J 160 POKE 53280,2 170 GET A$:IF A$<>" " THEN 170 180 POKE 53265,27:POKE 53270,200:POKE 53272,21 190 END 199 REM THE MATHS 200 X=0:Y=0:A=0 210 C=(X*X)=(Y*Y):D=2*(X*Y) 220 X=C+Q:Y=D+W:Z=X+Y:A=A+1 230 IF Z<-2 OR Z>2 THEN B=0:RETURN 240 IF A>25 THEN B=1:RETURN 250 GOTO 210 259 REM PLOT POINT 260 CH=INT(I/8):RO=INT(J/8):LN=J AND 7 270 BY=8192+(RO*320)+(CH*8)+LN 280 BI=I AND 7 290 POKE BY,PEEK(BY)OR A(E,BI) 300 RETURN 309 REM SET UP BIT MAP 310 POKE 53265,PEEK(53265)OR 32 320 POKE 53270,PEEK(53270)OR 16 330 POKE 53272,PEEK(53272)OR 8 340 POKE 53280,0:POKE 53281,0 350 FOR X=1024 TO 2023:POKE X,152:NEXT X 360 FOR X=55296 TO 56295:POKE X,7:NEXT X 370 FOR X=8192 TO 16191:POKE X,0:NEXT X 380 RETURN 389 REM SET UP VARIABLES 390 DIM A(3,7) 400 FOR I=0 TO 3 410 FOR J=0 TO 7 420 READ A(I,J) 430 NEXT J,I 440 RETURN 450 DATA 0,0,0,0,0,0,0,0 460 DATA 64,64,16,16,4,4,1,1 470 DATA 128,128,32,32,8,8,2,2 480 DATA 192,192,48,48,12,12,3,3