Mandelbrot Set in HTML5 Canvas
As you might know, Benoît Mandelbrot sadly passed away two weeks ago. A great mathematician, he almost single-handedly created a new aspect to mathematics, fractal geometry. Having worked with fractals (using the open-source Apophysis) for several years, I felt I owed something to the man, so I thought I’d make a Mandelbrot set using the canvas tag.
You could ask me what exactly the Mandelbrot set is, and I could probably give you an explanation that might satisfy a ten-year-old (“Unicorns!”). However, you’d be far better off reading the Wikipedia article about it. While it’s awful to not know precisely what it is that your code does, in the case of fairly heavy maths like this, I’m going to let myself off. I’m no mathematician.
Click the box once to compute the set. Click again to zoom. Computing time will vary between browsers and computers. May lock up your browser for a few seconds.
Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line. – Benoît Mandelbrot (20 November 1924 – 14 October 2010)