# All Science Fair Projects

## Science Fair Project Encyclopedia for Schools!

Search                 Browse                 Forum               Coach                 Links                 Editor                 Help                 Tell-a-Friend                 Encyclopedia                 Dictionary

# Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

# Mandelbrot set

A rendering of the Mandelbrot set: black points represent the stable points under the iterative map

In mathematics, the Mandelbrot set is a fractal that is defined as the set of points c in the complex plane for which the iteratively defined sequence:

$z_0 = 0\,$
$z_{n+1} = {z_n}^2 + c$

does not tend to infinity.

The sequence is thus expanded mathematically as follows for each point c in the complex plane:

$c=x+iy \,$
$Z_0=0 \,$
$\begin{matrix}Z_1&=&Z_0^2+c \\ \ &=& x+iy\end{matrix} \,$
$\begin{matrix}Z_2&=&Z_1^2+c \\ \ &=&(x + iy)^2+x+iy \\ \ &=&x^2+2ixy-y^2+x+iy \\ \ &=&x^2-y^2+x+(2xy+y)i\end{matrix} \,$
$Z_3=Z_2^2+c=... \,$

and so on.

If we reformulate this in terms of the real and imaginary parts (X and Y coordinates of the complex plane), looking at each iteration, n replacing zn with the point xn + yni and c with the point a + bi, then we get

$x_{n+1} = {x_n}^2 - {y_n}^2 + a \,$

and

$y_{n+1} = 2{x_n} {y_n} + b \,$

The Mandelbrot set can be divided into an infinite set of black figures: the largest figure in the center is a cardioid. There is a (countable) infinity of near-circles (the only one to be actually an exact circle being the largest, immediately on the left of the cardioid) which are in direct (tangential) contact with the cardioid, but they vary in size, tending asymptotically to zero diameter. Then each of these circles has in turn its own (countable) infinite set of smaller circles which branch out from it, and this set of surrounding circles also tends asymptotically in size to zero. The branching out process can be repeated indefinitely, producing a fractal. Note that these branching processes do not exhaust the Mandelbrot set: further upwards in the tendrils, some new cardioids appear, not glued to lower level "circles". The largest of these, and the most easily visible from a view of the entire set, is along the "spike" which follows the negative real axis out, roughly from real values of -1.78 to -1.75

Contents

## History of the Mandelbrot set

The Mandelbrot set was first defined in 1905 by Pierre Fatou, a French mathematician working in the field of complex analytic dynamics. Fatou studied recursive processes like

$z \to z^2 + c\,$

Starting with some point z0 on the complex plane, successive points may be generated by repeatedly applying this formula. The sequence of points thus obtained is called the orbit of z0 under the transformation

$z \to z^2 + c\,$

Fatou realised that the orbit of z0 = 0 under this transformation would provide some insight into the behaviour of such systems. There are an infinite number of such functions - one for each value of c. Fatou did not have access to a computer capable of plotting the orbits of all these functions, but attempted to do so by hand. He proved that once a point moved to a distance greater than 2 from the origin, then the orbit would escape to infinity.

Fatou never saw the image of what we now call the Mandelbrot set as we do because the number of calculations required to generate this is far more than could be calculated by hand. Professor Benoît Mandelbrot was the first person to use a computer to plot the set.

Fractals were popularised by Mandelbrot in 1975 in his book . In this book, Mandelbrot used the term fractal to describe a number of mathematical phenomena that seemed to exhibit chaotic or surprising behaviour. All of these phenomena involved the definition of some curve or set through the use of some recursive functions or algorithms. The Mandelbrot set is one such phenomenon that is named after its discoverer.

## Relationship with Julia sets

The Mandelbrot set was created by Benoît Mandelbrot as an index to the Julia sets: each point in the complex plane corresponds to a different Julia set. The points within the Mandelbrot set correspond precisely to the connected Julia sets, and the points outside correspond to disconnected ones.

Intuitively, the "interesting" Julia sets correspond to points near the boundary of the Mandelbrot set; those far inside tend to be simple geometric shapes, while those well outside look like dust surrounded by blobs of color. Some programs, such as Fractint, let the user choose a point, and jump to the corresponding Julia set, making it easy to find Julia sets that the user is likely to enjoy.

The Mandelbrot set also contains structures that strongly resemble Julia sets; indeed, for any value c, the region of the Mandelbrot set near c resembles the center of the Julia set with parameter c.

## Plotting the set

Sample generated image with colouring given by the rate of divergence to infinity, the brighter the points the slower the divergence

It can be shown that once the absolute value of zn is larger than 2 (in cartesian form , when xn2 + yn2 > 22) the sequence will tend to infinity, and c is therefore outside the Mandelbrot set. This value, known as the bail-out value, allows the calculation to be terminated for points outside the Mandelbrot set. For points inside the Mandelbrot set, i.e. values of c for which zn doesn't tend to infinity, the calculation never comes to such an end, so it must be terminated after some number of iterations determined by the program. This results in the displayed image being only an approximation to the true set. Mandelbrot hobbyists quickly learn to recognize the "blobby" images caused by a program mistakingly placing points in the set, and will then up the iteration count (at the expense of slowing down the calculation of every point actually in the set).

### Adding color

Mathematically speaking, the pictures of the Mandelbrot set and Julia sets are "black and white". Either a point is in the set or it is not. Most computer-generated graphs are drawn in color. Under the most common rendering method, for the points that diverge to infinity, and are therefore not in the set, the color reflects the number of iterations it takes to reach a certain distance from the origin. This creates concentric shapes, each a better approximation to the Mandelbrot set than the last. One possible scheme is that points that diverge quickly are drawn in black; then you have brighter colors for the middle; then you have white for the points in the set, and near-white for the points that diverge very slowly.

In order to determine if the point, Z0, is going to be in the Mandelbrot set (traditionally coloured black) or outside the set (coloured according to the escape speed), the distance of the Zi must be calculated at each iteration in the sequence:

If $Z_i = X + iY \$, then $\|Z_i\| = \sqrt{X^2 + Y^2}$. Note that one of the many possible optimisations for calculating mandelbrots can be applied here. Rather than testing to see if $\sqrt{X^2 + Y^2} > 2$, we can simply test to see if $X^2 + Y^2 > 4 \$ — thus saving the square root operation.

So, if $\|Z_i\|^2 < 4$ then colour the point black, otherwise colour it according to the value of i. Using the number of iterations required to determine that the point has escaped is the easiest and most common way of recording the "speed" of escape. This number can be directly mapped to a colour via a lookup table or palette, or by use of some suitable algorithm.

So far, we have worked out how to tell if the point is outside the set — it moves more than a distance of 2 away from the origin. How do we tell it is inside the set? There are lots of strategies for this — this is not so simple. If it were, there would not be so many different algorithms out there for calculating mandelbrots. This is the essence of the problem. Clearly most points will not actually get to zero in a reasonable number of iterations. The simplest algorithm is to simply limit the number of iterations and if you have not gone outside the boundary by the time you have done your last iteration, then you assume the point is in the set.

Indeed, points nearer the set take longer to escape. This is why plotting slows down near the dark region — because more terms in the expansion are having to be calculated to determine the escape speed. When not near the set, one can "get away with" a lower maximum iteration count. The images below, of the same location, are created with iteration limits of 32, 64, 128, 256, 512, 1024, 2048 and 1000000, respectively. Note that there are diminishing returns in upping the iteration count past a point; these are also good examples of the "blobby" images one gets with a too-low iteration count. These images are centered at -1.7490110509, -0.0004525. The image is roughly 0.000417 of a unit wide, and located about halfway down the "valley" at the +x end of the largest mini-set.

|                                                                                                       |                                                                              |                                                                        |                                                                                                                                                                         |
|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| At a count of 32, the whole image is black, since it is completely inside the false-negative contour. | If we allow 64 iterations, some points are no longer falsely inside the set. | At 128 iterations, the image is blobby, but recognizable as a fractal. | 256                                                                                                                                                                     |
| At 512, we get a nice image.  The black dots up and to the left of each "wart" contain tiny cardoids. |                                                                              |                                                                        | Diminishing returns are quite obvious when we use a million iterations.  Even with periodicity checking, this one took 10-15 seconds to generate on an Athlon XP 2000+. |

#### Optimization

One way to improve calculations is to find out beforehand whether the given point lies within the cardioid. The cardioid's polar equation is

$\rho_c = {1 \over 2} - {1 \over 2} \cos \theta$

but with the center of polar coordinates located at (1/4,0) — the cardioid's cusp — instead of at the origin. Given point (x,y), calculate the following

$\rho = \sqrt{\left( x - {1 \over 4} \right)^2 + y^2},$
$\theta = \hbox{atn}_2 \left( y, x - {1 \over 4} \right),$
$\rho_c = {1 \over 2} - {1 \over 2} \cos \theta.$

If $\rho \le \rho_c$ then point (x,y) is in the Mandelbrot set (color it black), and the usual calculations can be skipped. To prevent having to do huge numbers of iterations for other points in the set, one can do "periodicity checking" - which means check if a point reached in iterating a pixel has been reached before. If so, the pixel cannot diverge, and must be in the set.

A portion of the Mandelbrot set centred at (0.282, -0.01)

### Art and the Mandelbrot set

Some people have a hobby of searching the Mandelbrot set for interesting pictures. They have a collection of pictures, along with the coordinates for generating that picture. For example, the image to the right is a closeup centred at coordinates (0.282, -0.01). Below are more examples of cool- and hot-looking Mandelbrot set regions:

There are many free fractal-generating programs available, such as those by Stephen Ferguson (Sterling Fractal and the Tierazon series) and many people write such programs themselves for the highest level of control over their pictures. Below is a min-cardioid, connected by filaments (too thin to be seen) to the main set (and other cardioids, some of which are actually in this image but too small to be seen).

## Other Mandelbrot sets

When people speak of the Mandelbrot set, they usually are referring to the set described above. Any function that maps to and from the complex number plane has a Mandelbrot set, which characterizes whether or not the Julia set corresponding to that function is connected.

Example:

Let fc(z) = z3 + c.

For each value of c, we draw the Julia set Jc of fc(z), and determine if it is connected or not. If Jc is connected, then c is in the Mandelbrot set of {fc}, otherwise c is not in the Mandelbrot set.

This can also be generalized to Julia sets parameterized by more than two real numbers. For example, a collection of Julia sets parametrized by three real numbers will have a three dimensional Mandelbrot set. Of course, only the 2-dimensional case will have an easily viewed picture.

## Mandelbrot set in song

The Australian band GangGajang has a song Time (and the Mandelbrot set) where the term Mandelbrot set is used liberally in the lyrics.

The American singer Jonathan Coulton has a song titled Mandelbrot Set about the history of the Mandelbrot set, and of Benoit Mandelbrot himself.

The Blue Man Group's first album Audio features tracks titled "Mandelgroove", "Opening Mandelbrot", and "Klein Mandelbrot". The album was nominated for a Grammy in 2000.

## External links

• The Chaos Hypertextbook. An introductory primer on chaos and fractals.
• Downloadable Mandelbrot Set Explorer Application
• Mu-Ency - Encyclopedia of the Mandelbrot Set
• Fractal Explorer
• Explore and Discover
• Julia and Mandelbrot Set Explorer, a CGI-based interface created by David Joyce, a Clark University professor.
• The Fractal Microscope provides a nice Java interface (figure to right). Unlike some other Java-based Mandelbrot set interfaces on the internet, this one works for Macintosh browsers (tested on these Mac OS X browsers: Safari, Mozilla, Camino, Internet Explorer).
• Detailed mandelbrot set, see bottom of page
• 3D Mandelbrot Set Explorer Applet
• A gallery of Fractal images and copies of Fractal-exploring programs.
• Realtime Mandelbrot Set Generator - Web based Mandelbrot Set Explorer.
• Color Cycling on the Mandelbrot Set
• Iterations and the Mandelbrot Set
• Mandelbrot and Julia sets
• Xaos, an open source fractal explorer with Mandelbrot/Julia exploration, other fractals, and autopilot mode for easy exploration
• Fract: a free software web zoomer for the Mandelbrot Set
• The Mandelbrot and Julia sets Anatomy

03-10-2013 05:06:04
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 21, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9013550877571106, "perplexity_flag": "middle"}