September 27, 2009

Mandelbrot

In the spirit of drawing fractals using technology that was intended to do something else, here is an interactive Mandelbrot Set webpage implemented in Javascript. It works pretty comfortably in Chrome and okay in Firefox. IE may have some trouble with it.

In the pre-XGA graphics days, you couldn't render a very good-looking Mandelbrot set on a computer screen, so I used to write programs that rendered on laser printers. The cluster of word processing PCs in the basement of my school's English building would chug away through the night, iterating polynomials.

In this Javascript Mandelbrot implementation, click on a spot in any picture to zoom in. It uses table cells to draw pixels. Each iteration is rendered as soon as it is computed, so the pictures get more refined over time. More on this well-known fractal here or here.

Javascript Mandelbrot Explorer

Posted by David at September 27, 2009 10:16 PM
Comments

Hello, David. I have been playing with your mandelbrot grapher all this week. It is incredibly simple, elegant, effective. And it is beginning to affect the way I think. Thank you for chugging away, and thanks for iterating those polynomials. MANY THANKS.

Posted by: Keith at October 30, 2009 05:33 PM

Now all you need is an iPad app. ;)

Posted by: at January 4, 2011 10:01 PM

Hi David,
Many thanks for your Chrome (javascript) app. Am converting it to run in native Windows mode in C++ - had an interest in Mandelbrot some 25 years ago, but as you say, rendering on computers those days was tricky, so I did a lot more Julia sets in greyscales instead. Had several computers running overnight as well. Oh those were the days. Anyway, noticed a strange quirk - was using your explorer near the leading tip of the set, at -1.996,0 approx. Now by my 15th picture it was centred at -1.99638276428 with a width of 1.106e-8 approx. When I next clicked, I selected the tiny set at the left edge of the big set displayed in this picture, at about -1.99638276750,0 and a very strange thing happened: most of the picture converged (all of the right hand half). The next two pictures still had convergence problems (ie too many pixels converging) and then it seemed to sort itself.
Anyway, I haven't studied your convergence algorithm yet, or how it iterates from one picture to the next, but thought it a very strange effect.

Posted by: Simon at August 26, 2011 07:35 AM

Hi David,
I don't know how to modify your code, but I feel sure you would like the following suggestion as more computing power becomes available (3.3 GHz 4 core processors.) The current (Java?) applet doesn't make use of threading, and it could surprise people with performance if you supplemented the algorithm with code to make use of threading - it's a highly parallel process. Love the app.

Cheers,

James

Posted by: James Johnson at May 3, 2012 09:23 PM

Simple, genius code.
Kind regards
Maciej

Posted by: Maciej at March 6, 2014 06:57 AM

hi - I mentioned you on http://makeyourownmandelbrot.blogspot.co.uk/2014/08/pure-web-mandelbrot-explorers.html

(the site accompanies the book which introduces the surprising maths behind the fractals, and Python programming, all for complete beginners)

Posted by: Tariq at August 28, 2014 11:28 AM
Post a comment









Remember personal info?