Mandelbrot set viewerThe mandelbrot set was invented by Benoit Mandelbrot in 1970, who wanted to classify the Julia sets with it.
It is the set of all complex numbers c for which the following sequence remains bounded:
Starting with z0 = 0.
In practice you will calculate the numbers for the sequence for up to 100 or 300 iterations and if it remained bounded the pixel is colored black, otherwise white.
This will look like this. The y-axis is the imaginary part, the x-axis is the real part:
I did the same and colored the output, so I got this:
In addition the viewer allows you to zoom in. Theoretically this works indefenitely, but in practice there is a limit.
Just drag a rectangle with your mouse from up left to down right. You might find some gems this way.
I improved the coloring and got more smooth colors. See example pictures below for the current look.
I am still working on a good colormap, though.
Usage: Press s to save the current pictures as png in the current folder.
Drag with the mouse to zoom in.
Press r to zoom out.
To change init hue and hue factor press the update button.
Lines of code (by now): 250
Source on github: snip
Download program: http://uppit.com/h2dxfdtnruen/mandelbrot.jar
If you find some gems with the tool, share them here.