Mandelbrot set: Difference between revisions

Content added Content deleted
(→‎{{header|Wren}}: Added image)
m (Replace deprecated functions)
Line 12,454: Line 12,454:
# for which the sequence z[n+1] := z[n] ** 2 + z[0] (n >= 0) is bounded.
# for which the sequence z[n+1] := z[n] ** 2 + z[0] (n >= 0) is bounded.
# Since this program is computing intensive it should be compiled with
# Since this program is computing intensive it should be compiled with
# hi comp -O2 mandelbr
# s7c -O2 mandelbr


const integer: pix is 200;
const integer: pix is 200;
Line 12,486: Line 12,486:
z0 := center + complex(flt(x) * zoom, flt(y) * zoom);
z0 := center + complex(flt(x) * zoom, flt(y) * zoom);
point(x + pix, y + pix, colorTable[iterate(z0)]);
point(x + pix, y + pix, colorTable[iterate(z0)]);
end for;
end for;
end for;
end for;
end func;
end func;
Line 12,504: Line 12,504:
end for;
end for;
displayMandelbrotSet(complex(-0.75, 0.0), 1.3 / flt(pix));
displayMandelbrotSet(complex(-0.75, 0.0), 1.3 / flt(pix));
DRAW_FLUSH;
flushGraphic;
readln(KEYBOARD);
readln(KEYBOARD);
end func;
end func;