10.22.2010

The Mandelbrot set

When Benoit Mandelbrot died last week, I declared on Facebook (while drinking) that I would like to draw the Mandelbrot set.  Well, I've done the most rudimentary job possible.  I basically followed a tutorial from the SciPy website to accomplish it, which makes it even less impressive.  Nevertheless, I followed through.  I've attached an image as proof.
Not very impressive.  I've got a few things I plan on adding to it as a way of getting better at programming:
  • Dynamic zooming.  I was looking at using the Google Maps widget to enable arbitrary zooming, but the calculation speed of the set in sample javascript implementations I've seen is less than speedy, even in Chrome.  This might be ok as long as I don't demand instant drawing as the set is zoomed.
  • Multi-core calculation.  This obviously wouldn't be for a web version, but would be a good exercise in learning how to use multiple cores for this sort of calculation.
Basically, this is an excuse to learn how to program things slightly less trivial than command-line data munging scripts.  They are very useful, don't get me wrong!  I'd just like to learn some more advanced programming concepts.

2 comments:

  1. Man I would love to learn how to do this. Is there a tutorial or some resource I could learn the Mandelbrot set?

    ReplyDelete
  2. Just googling will usually do it. This seems to be a nice overview:

    http://home.olympus.net/~dewey/mandelbrot.html

    ReplyDelete