Saturday, November 6, 2010

Fractal Visualizer in Javascript + HTML5

As a homage to recently deceased mathematician BenoƮt Mandelbrot, I have created a small javascript code using the Canvas element to draw a Mandelbrot Set.

The main innovation here is that you can navigate through the fractal by dragging and zooming with the mouse wheel, very much like Google Maps. And to make it responsive, the image is rendered a bit at a time with increasing resolution at each step, allowing you to move around the image without having to wait for the full computation.

NB: for now, only Chrome and Firefox are supported. The code might work in IE, but I didn't try it. Also, I had to reduce rendering speed in Firefox after it hogged my CPU to a halt.

So, without further ado, I give you the Fractal Visualizer:
Reset to initial position