REM ***** MAD TEDDY'S MANDELBROT SET SERIES: REGION #25 ***** REM x limits: .2505, .2838333 REM y limits: -.0125, .0125 SCREEN 12 iterationlimit = 100 ylow = -.0125 yhigh = .0125 xlow = .2505 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 + 0) MOD 15 REM ran 15 times, adding 0, 1, 2,... 14, REM for different frames of the animation END IF ELSE colour = 0 END IF PSET (j, i), colour NEXT j NEXT i a$ = "" DO: a$ = INKEY$: LOOP UNTIL a$ = CHR$(27)