### This Image is Interactive! Click to Zoom!!

Click to zoom, shift + click to zoom out.

Command + drag or arrow keys to pan.

m key to change mapping modes.

a to set anti-aliasing.

The Mandelbrot formula **z’ = z ^{2} + c** is calculated for each pixel where its coordinates seed the

**a**and

**b**components of the complex number

**c = a + b**. The output of the equation is fed back in as the new value of

*i***z**and this is repeated until the magnitude of

**z’**reaches a predefined bailout value. The number of iterations required to reach the bailout value is used to map a colour to the pixel. This is known as the “escape time” algorithm.

### Mapping modes

Things start to get interesting when you play around with the mapping modes that convert the escape time to a colour. The standard mapping takes the escape time of the pixel as the index in an array of colour values. However, this approach results in colour banding around the fractal.

The method used here is a continuous, smooth mapping known as the “normalised iteration count” algorithm. There is a variation to this called shelf mapping, which reverses the gradient for each colour band around the fractal and gives an interesting layered result.

There are a couple of additional variations of the shelf mapping which use different bailout conditions to produce either spiky or puffy results. Zoom in and it’s like flying over an infinite forest of sea anemones!

The last mapping mode is binary decomposition, which although it sounds fancy is actually quite straight forward. If the angle between the real and imaginary parts of the final z is > 0 colour the pixel white otherwise colour it black.

You should enable the anti-aliasing option for best results with this mapping mode.

### Performance

The default zoom factor for each click is 2x magnification, but you can only zoom to a maximum of around 8e12. This is due to the limited precision of the Number data type in Actionscript 3.0. Once you reach the limit you might see glitches due to rounding errors. It would be interesting to implement an arbitrary precision floating point data type in Actionscript, but the performance would probably make impractical for anything fractal related.

If you are using Flash 10 then you should notice quite a speed increase compared to Flash 9. There seem to have been quite a few performance tweaks made in this latest release

this was made possible thanks to subblue

http://www.subblue.com/projects/mandelbrot