home subscribe to email updates subscribe to RSS updates

Experiment: Mandelbrot Fractal

There comes a time in every programmer’s career when they are drawn to the Mandelbrot flame. Like the rest of us, I’ve known about it since I was a kid, but never have I really worried about checking it out. I guess I felt that the concept was familiar enough already - what could I gain from touching the code?

Michael Battle - Mandelbrot Fractal

It’s hard to explain just how awestruck I am at how wonderful and beautiful the pattern is. In many of my experiments I’m trying to formulate complex patterns from simple rulesets, in hope of tripping over that line where the emergent behavior becomes art. Having played with the code a little, I’ve now realised that the Mandelbrot set is my Mona Lisa.

Check it out for yourself.

Let me say straight off the top that 99% of the code used in the flash below is not my work… I figured that the exercise has been done a million times already and me having another go wont really help achieve much - I guess I didn’t even know if there would be more than one way to skin this incredibly sexy cat! So I Googled around and found the source for an AS3 viewer and had a crack at figuring out what was going on. My hope is that the lessons in this experiment will drive my work in new directions.

Metal Hurlant (killer name, by the way) was the AS3 gun that inspired me. Make sure you check out his wares via the links in the footnotes.

Instructions:

  1. click and hold to zoom in
  2. click and hold whilst pressing SPACE to zoom out

The demo below weighs in at a massive 2.5K.

The code uses a Successive Refinement algorithm that allows a low-res representation of the fractal to be displayed whilst zooming. Pretty freaking awesome.

It would be nice to implement continuous colouring to eliminate the banding. Have a look at the Wikipedia link below and let me know if you are able to figure out the maths.

Link: Metal Hurlant’s original blog post (with source code)
Link: Metal’s supersized fractal viewer
Link: Successive Refinement algorithm
Link: Mandelbrot on Wikipedia
Link: You’ll probably also be interested in the Buddhabrot variation

Have a look at the following screenshots and you’ll start to see (or perhaps you’ll just be reminded) at how amazing the Mandelbrot set is:

Michael Battle - Mandelbrot Fractal

Michael Battle - Mandelbrot Fractal


« Jobs on footloosemoose
AddThis Social Bookmark Button

Related Posts:

Comments:

isaac said,

March 22, 2008 @ 11:50 am

Wow, that’s beautiful! I’ve never really looked at one of these fractals in much detail, but it’s quite musical in it’s form: Repeating patterns that periodically combine into something completely unexpected.

The forms it creates makes me think that it would be useful in procedural generation of worlds and such. I’ll have to look into the code more!

RSS feed for comments on this post · TrackBack URI

Leave a Comment



« Jobs on footloosemoose