REM ***** MAD TEDDY'S MANDELBROT SET SERIES: REGION #24 ***** REM x limits: -2.00005, -1.666717 REM y limits: -.125, .125 SCREEN 12 iterationlimit = 100 ylow = -1.25 / 10 yhigh = 1.25 / 10 xlow = -2.00005 xhigh = xlow + (yhigh - ylow) * 4 / 3 FOR i = 0 TO 479 FOR j = 0 TO 639 x = xlow + j * (xhigh - xlow) / 639 y = ylow + i * (yhigh - ylow) / 479 xc = x: yc = y iterations = 0 rsquared = 0 DO UNTIL rsquared >= 4 OR iterations > iterationlimit u = x * x - y * y + xc v = 2 * x * y + yc rsquared = u * u + v * v x = u: y = v iterations = iterations + 1 LOOP IF rsquared >= 4 THEN IF iterations > 100 THEN colour = 0 ELSE colour = 1 + iterations MOD 15 END IF ELSE colour = 0 END IF PSET (j, i), colour NEXT j NEXT i a$ = "" DO: a$ = INKEY$: LOOP UNTIL a$ = CHR$(27)