Mandelbrot Canvas

This is a basic Mandelbrot plotter

preview black interior
MAX_ITER:
RED:
GREEN:
BLUE:
Hmm, seems canvas isn't working for your browser...
 

Some features:

  • fairly fast, once I stopped doing a single line at a time (previously I was using setTimeout calls to only do a line at a time, and wondered why it was so slow - it was idle 95% of the time!)
  • preview, allowing zooming in to interesting areas without waiting for whole thing to render
  • configurable iteration count, to allow compromise between speed and accuracy - but more importantly allowing the interesting areas to be found quickly and then recalculate at a higher iteration count as needed
  • ability to specify colour functions for the RGB components. All are functions of i, which is the integer number of iterations completed before bailing out (will be equal to MAX_ITER if within the set itself). The functions should return a value in the range 0-255
  • a position stack allowing unlimited 'back' operations