The Plotter and Comments

We present here a major Flash project for your enjoyment. This Flash-based Mandelbrot Plotter application allows you to create and save beautiful images of the Mandelbrot set. The application is full of features which give you a great amount of control over how the set is colored. The fractal plots can use discrete (stepped) coloring or continuous (smooth) coloring. Many gradient presets are available, but you can also create your own using the color curves or by entering colors explicitly. You can use this application to save your fractal images in either jpg or png formats. Click the screen shot below or this link to open the application in a new window:

Download

  • Download all source files corresponding to this effect: mandelbrot.zip

A Few Images Created with the Plotter

Here are a few examples of images exported from the plotter. Click a thumbnail or the text above it to open a high resolution image.

Mandelobrot Sun:
Icy:
Sakura:
Platinum:
Sawtooth:
Starry Night:

Quick Start Guide

To get started with generating some beautiful fractal images, simply use the mouse to draw a rectangle on the fractal plot, and hit the zoom selection button to zoom the plot in to your selection.

If you zoom in very close on the image, you may find that it becomes less detailed, with more black regions. To see more detail in the image, change the max iter parameter to a higher number (start with 1000). The higher this number, the more detail you will see (but the fractal will take longer to generate).

The easiest way to change the colors is to use one of the preset gradients, obtainable by clicking on the choose a preset gradient button at the bottom of the gradient editor. After selecting a gradient, click on the update button on the left of the fractal plot to change the coloring.

Smoother, better quality images can be obtained by checking the 4x oversampling box. Be aware that this will increase the rendering time by a factor of four.

More detailed information about the controls and parameters in the application can be found in the Help file here (also accessible through the Help button in the application).

About the Mandelbrot set

The Mandelbrot set is an example of a fractal. The word fractal has a precise mathematical definition, but loosely speaking a fractal is a geometric object which show complexity on any scale. When you zoom in on portions of the Mandelbrot set, you find copies of the set embedded inside, on a much smaller scale.

The set is named for Benoit Mandelbrot, the mathematician who studied and popularized this set in the 1980s. Benoit Mandelbrot passed away in October 2010. His pioneering work continues to inspire mathematicians and artists alike.

A short description of the mathematics behind the Mandelbrot set is contained in the help file for the application. More extensive information about Benoit Mandelbrot and The Mandelbrot set can be found at the following Wikipedia pages:

Benoit Mandelbrot

The Mandelbrot Set

Modifying Parameters in the Code for Advanced Control

There are a couple of modifications you can make with the source code which will allow you to do more. For convenience, these parameters can be found right at the top of the main fla file.

If you change the AUTHORING_MODE constant to true and recompile the swf file, then a button will appear on the gradient selector which will allow you to see the XML used to store the gradient. When the XML code appears, you can copy and paste it into the GradientData.xml file. Your gradient will then be available in the list of gradient presets (you will have to reload the swf).

The maximum width for exported fractals is set to a conservative value of 800 pixels, but you can increase this amount to a maximum of 2047 (this is the highest due to restrictions on bitmap sizes in Flash). To do this, change the MAX_WIDTH constant at the top of the fla file. Just be aware that large fractals may take a long time to render. This delay is highly dependent on the maximum iterations settings and the plot window; some images do not take that long. If this delay is acceptable, you can use this plotter to generate some very large images. You may need to increase the "Script time limit" in the publish settings to avoid timeouts (however it is presently set to 15 minutes, which may be enough).

Using the Source Code

This application makes use of the BitString, JPGEncoder, and PNGncoder classes, © 2008, Adobe Systems Incorporated, available here.

We are providing the complete source code for this application for your own perusal, inspiration, and learning; however if you want to copy large portions of the code for your own projects, please contact the author (dan@flashandmath.com) for permission.

Back to Advanced Tutorials              Back to Flash and Math Home

We welcome your comments, suggestions, and contributions. Click the Contact Us link below and email one of us.

Adobe®, Flash®, ActionScript®, Flex® are registered trademarks of Adobe Systems Incorporated.