Leif, Mandelbrot, and Sierpinski in JavaScript and HTML 5

I felt like trying out the canvas element in HTML5 and what better way than by implementing Leif again?

Tested in Google Chrome 3.0, Opera 10 and Firefox 3.5. Chrome was by far the fastest.
In Opera I have to reload the page for the picture to show. I would love to know why.

Start and stop Leif by clicking in the picture.

Reload image | Randomize | Mandelbrot | Sierpinski
Toggle Light Contour | New pos | Slower | Faster
Toggle Dark Contour | New pos | Slower | Faster

Other pictures: Sunset | House | Kafka

PS. Thanks to James Black for answering my question concerning a memory problem with this. DS.

jonas@plea.se Blog