NEW 100 REM PROGRAM TO DRAW MANDLEBROT SET 110 REM P. MAINWARING, MARCH 19TH 1990 120 *TV 255,1 130 ITERS=32 140 SCALE=1 150 XRANGE=-2.5 160 YRANGE=-1.5 170 DIM A(3),B(3) 180 FOR I=0 TO 3 190 READ A(I),B(I) 200 NEXT I 210 DATA 0,0,1,1,0,1,1,0 220 MODE 1 230 XSTP=4 240 YSTP=4 250 COLS=4 260 MAXX=1280/XSTP 270 MAXY=1024/YSTP 280 VDU 23;8202;0;0;0; 290 FOR I=0 TO 3 300 FOR J=A(I) TO MAXY/SCALE STEP 2 310 FOR K=B(I) TO MAXX/SCALE STEP 2 320 CR=XRANGE+K*4/(MAXX/SCALE) 330 CI=YRANGE+J*3/(MAXY/SCALE) 340 ZM=0:ZR=0:ZI=0:ZR2=0:ZI2=0 350 IT=0 360 REPEAT 370 Z1=ZR2-ZI2+CR 380 Z2=2*ZR*ZI+CI 390 ZR=Z1 400 ZI=Z2 410 ZR2=ZR*ZR 420 ZI2=ZI*ZI 430 ZM=ZR2+ZI2 440 IT=IT+1 450 UNTIL IT=ITERS OR ZM>=4 460 X%=K*XSTP:Y%=1023-J*YSTP 470 PRINT TAB(0,0);RIGHT$("000"+STR$(X%),4); 480 PRINT ","+RIGHT$("000"+STR$(Y%),4)+")"; 490 GCOL 0,COLS-1-INT(IT/(ITERS/(COLS-1))):PLOT 69,X%,Y% 500 NEXT K 510 NEXT J 530 NEXT I 999 END RUN