Mandelbrot & Julia(Warning! Fractal maths involved. If you don't care about formulas, just play around with the beautiful graphics.) This is a little Java applet that I made to demonstrate the relationship between the Mandelbrot set and the Julia sets. In the left frame, you'll see the Mandelbrot set. As you drag the crosshair around using the mouse, the Julia set corresponding to the chosen point is plotted in the right frame. One could say that the Mandelbrot set is a map of the Julia sets. You'll find that the Julia sets are discontinuous outside the Mandelbrot set and that they gradually lose their fractal dimensions inside it, to become a perfect circle at the focal point (the origo, which is at the starting point in this example). Try moving the crosshair!
Here you can look at the (new and improved) Java source code for this applet. The theory behind:Both the Mandelbrot set and the Julia sets originate from the same iteration formula: "z := z*z - c", where z and c are complex numbers. An area in the (2-dimensional) complex number plane is chosen and for each point in that area the above formula is iterated, using that point as input in one of two ways: In the Mandelbrot case, the point is used as the value of c and z starts at zero. In the Julia case, the point is used as the starting value of z and c is chosen as a constant (in my applet the value of c is picked from a point in the Mandelbrot set). The formula is thus iterated for each point in the chosen area and if z does not approach infinity, that point is considered to be inside the Mandelbrot set and is colored black. The Mandelbrot set itself actually consists of only the set of points that lie at the borders of the black area. In my applet, though, the Julia sets are at first iterated in a different way which gives only a rough image but is much faster. This is acheived by iterating the inverse formula "z := sqrt(z + c)" and plotting each value of z in the complex plane, omitting the early "tune-in" iterations. Since sqrt() should really give two solutions (the positive solution and its negation), we choose randomly between the two at each iteration. |
|