# Posted By

Zufolek on 06/07/09

# Statistics

Viewed 657 times
Favorited by 0 user(s)

# GW-BASIC Mandelbrot Set fractal explorer

/ Published in: Other
`1 SCREEN 13 PRINT "Basic Mandelbrot Explorer":PRINT4 PRINT "2007-2009 Zufolek":PRINT5 PRINT "Controls:"6 PRINT "8 - Up":PRINT "2 - Down"7 PRINT "4 - Left":PRINT "6 - Right"9 PRINT "5 - Zoom In":PRINT "0 - Zoom Out"11 PRINT "Space Bar - Show Coordinates"13 PRINT "i - Change # of Iterations"11 PRINT "Esc - Exit"15 PRINT:PRINT "More iterations means higher quality but slower display"17 PRINT:PRINT "Press any key to start"19 IF INKEY\$="" THEN 1920 N=4030 OX=2:OY=1:OU=10050 CLS100 D=N/4400 FOR X = 0 TO 319500  FOR Y = 0 TO 199505   X1=X/OU-OX:XX=X1510   Y1=Y/OU-OY:YY=Y1515   X2 = XX*XX520   Y2 = YY*YY525   IT = 0535   IF X2 + Y2 > 4  OR  IT = N  THEN 580540   YY = 2*XX*YY + Y1545   XX = X2 - Y2 + X1550   X2 = XX*XX555   Y2 = YY*YY560   IT = IT + 1565   GOTO 535580   A=IT-INT(IT/4)*4600   PSET(X,Y),A700  NEXT Y:Z\$=INKEY\$:IF Z\$>"" THEN 854800 NEXT X849 IF INKEY\$>"" THEN 849850 Z\$=INKEY\$852 IF Z\$="" THEN 850854 IF Z\$="4" THEN OX=OX+80/OU:GOTO 400856 IF Z\$="6" THEN OX=OX-80/OU:GOTO 400858 IF Z\$="8" THEN OY=OY+50/OU:GOTO 400860 IF Z\$="2" THEN OY=OY-50/OU:GOTO 400862 IF Z\$="5" THEN OU=OU*2:OX=OX-160/OU:OY=OY-100/OU:GOTO 400864 IF Z\$="0" THEN OX=OX+160/OU:OY=OY+100/OU:OU=OU*.5:GOTO 400866 IF Z\$="i" THEN LOCATE 1,1:INPUT "Iterations?",N:GOTO 100868 IF Z\$=" " THEN LOCATE 1,1:PRINT "(";160/OU-OX;",";100/OU-OY;") Zoom";OU/100:GOTO 850890 IF Z\$=CHR\$(27) THEN END899 GOTO 850`