Home
Applets
Message Boards
E-Cards
Go to a different applet:

Julia Set

The Julia set and the Mandelbrot set are two interesting but related fractals in the mathematical world.  For a more specialized applet manipulating the Mandelbrot set,  click here.   This applet, while it can manipulate the Mandelbrot set, is especially made to display the Julia set and use the Mandelbrot set as a reference.  This is relevant because of the close relation between the two- I like to think of the Julia set as sort of a cross section of the Mandelbrot set.  The basic concept and algorithm are below.
For the both the Mandelbrot and Julia sets, we are drawing the graph on the complex number plane (meaning that (0,0) is really just 0, and (1,1) is really 1+i, and (1,0) is really just 1).  In the Mandelbrot set, calculate for every point 'C' by referring first to point A0 whose value is 0.  For every An, An+1=An2+C.  Continue doing this and observe what happens- either it will hover around zero, slowly approaching it, or it will escape and go toward infinity.  If the value of An ever has an absolute value (distance from the origin) of 2 or more, it is obviously going to escape, and the number of iterations it takes before this takes place is the value of the Mandelbrot set at point C.  That integer value determines its color on the graph.  The straight black parts of the graph either have an infinite value (will never escape from the are close to the origin) or escape after more than 400 iterations.

In the Julia set, a value is chosen for C for the entire graph.  Then, for every complex value 'Z' on the graph, the value of A0 is Z, and for every value of An, An+1=An2+C.  This time, though, you'll notice that the same value of C is used for every point on the graph.  Like the Mandelbrot set, the value of each point is the number of iterations before the point 'escapes' from the origin.
The relation between these to complex fractals is interesting, as well- since the algorithm is so similar, it can be seen that the value at every point C in the mandelbrot set is the value at the origin in it's corresponding Julia set.  Also, while the Mandelbrot set is continuous- it's all connected, there is a big chunk in the middle where the number of iterations is infinite- the Julia set can either be connected or disconnected.  The Julia set will always be connected for values of C that are infinite in the Mandelbrot set.  That's why I included the Mandelbrot set in an applet specifically made for the Julia set.  This way, you can go to the Mandelbrot set (the program will save the last place you clicked on in the Mandelbrot set and designate it as 'C'), and then when you return to the Julia set, it will calculate the graph to that value of C.  The Julia set is of course much more interesting when the value of C is in a particularly interesting part of the mandelbrot set.  Experiment with it and enjoy.
The accuracy of fractals, (with the help of computers, luckily), is infinitely fine.  The picture you see generated before you isn't a saved bitmap.  If you click in two spots and then hit the "Set X/Y" button, the values in the rectangle between the two points will be put into the range and domain values in the text fields near the top (hit "reset X/Y" to choose different range values without redrawing).  Then hit "redraw" and see the area inside there graphed again to the resolution available.  This can theoretically be done infinitely, and can practically be done to your hearts desire, limited only by the precision of the numbers in Java (i.e.- the amount of memory it's taking to store the numbers)  Remember, too, that the 'x' values are really the 'real' values, while the 'y' values are really the 'imaginary' values.    Hopefully the rest of the buttons are self-explanitory or not important enough for you to care.  Feel free to look at the source code here if your interested.
Report bugs and give suggestions here.
Categories:
CS142
Fractals
These applets were developed by Matthew Reeder. Please get my permission before using these applets on your own site.
(And trust me, it will be easier if I help you use them :-p)
Julia Set.tag