Fractal Demo

This aplet demonstrates how a Mandelbrot fractal is created. As the user moves the mouse pointer, it computes the complex series and draws lines between the points. If the series gets out of the gray circle (of radius 2) before the maximum number of iterations is reached, the initial point is painted in blue. Else, it becomes orange. The operating keys are : +, -, p, m, and the arrows. Enjoy !

The code

If you want this to work on Mac OS X, install Java 1.4 (only in developer preview at this time), and browse with Safari, as Mozilla and Internet Explorer use the old Java.