# Exploring Fractals

## Abstract

Although fractal images can be intriguingly complex, fractals are more than just pretty pictures. In this project, you'll explore the mathematical properties of the famous Mandelbrot (illustration at right) and Julia sets. You'll learn about how these images are generated, and about the relationship between the Mandelbrot set and the Julia sets.## Objective

This project has three objectives:

- Explore. You should explore the complex patterns generated at the edges of the Mandelbrot set, and the relationship between a point in the Mandelbrot set and the corresponding Julia set.
- Understand. You will need to understand how an image of the Mandelbrot set is generated, and how the image of a Julia set corresponding to a point in the Mandelbrot set is generated. You should also understand the relationship between different points in the Mandelbrot set image and the characteristics of the Julia sets associated with each type of point.
- Explain. You should be able to explain
*in your own words*what you learned in numbers 1 and 2.

## Credits

Andrew Olson, Science Buddies

## Share your story with Science Buddies!

I Did This Project! Please log in and let us know how things went.Last edit date: 2013-01-10

## Introduction

What are fractals? Here's an often-used example. Imagine that you want to measure the length of a coastline. Pick any coastline you want, but for this example we'll use the coast of California. There are different ways you could go about making the measurement. For instance, you could take measurements from a map, or you could set off on a family vacation to drive along the whole coast and measure it that way. The first idea is certainly easier, so let's consider that one first.

You'll have to decide on which map to use, and also how to measure the squiggly coastline on that map. Let's say you decide to use a map of the continental United States, and for following the squiggly coastline you're going to use a pair of dividers (like a compass for drawing circles, but with two points instead of a point and a pencil). You use the map scale to adjust the points of your dividers to span 100 km, then you "walk" the dividers along the coastline on the map—from just north of Tijuana, Mexico, to just south of Brookings, Oregon—counting the steps your dividers make. You multiply the number of steps by 100 km, and you've got your answer, right? But wait, along the way you noticed that, with a spacing of 100 km, your dividers didn't quite follow all of the promontories and bays accurately. So you reset the dividers to 50 km, and measure again. This time, you get a bigger number. Which one is right? And then you start thinking, "Hmm, maybe to be *really* accurate, I need a more detailed map." So you get a map of just California, and you measure yet again, and get an even larger number. You begin to realize that the amount of coastline you measure depends on the size of your ruler.

Fractals are mathematical functions that behave in a similar way. As you "zoom in" on a fractal boundary, you find that each new level of magnification continues to show complex structure. No matter how much you magnify, you never reach a smooth line. Here, for example, are four successive magnifications of regions from a famous fractal, the Mandelbrot set. Starting from the upper left and moving clockwise, each step is a 10-fold magnification of the yellow box region in the previous image.

What makes this so interesting is that the complexity arises from simple mathematical expressions. For example, the images of the Mandelbrot set and Julia sets are generated using the function

*z*(Equation 1)

_{n+1}= f (z_{n}) = z_{n}^{2}+ cEquation 1 produces a series of numbers (*z _{0}, z_{1}, z_{2}, z_{3},*...). To get the next number in the series (

*z*), you take the number you have now (

_{n+1}*z*), square it, and a constant (

_{n}*c*). You keep on doing this, plugging in your newly-generated number to get the next one (this is called "iterating" the function). All you need to get started are two values:

*z*and

_{0}*c*. For the Mandelbrot set,

*z*varies and

_{0}*c*is fixed; for Julia sets,

*z*is fixed, and

_{0}*c*varies.

Probably the hardest part of this whole project is this: the variable *z* in Equation 1 is a complex number, but don't let that scare you. If you understand how to graph an (*x, y*) value, you can understand complex numbers (see the Bibliography for more information). For now, just think of each *z _{n}* as a pair of numbers (

*x, y*).

So how does Equation 1 end up producing the amazingly complicated Mandelbrot set images? Here's how it works. Remember that Equation 1 produces a series of numbers, and that each series begins with a value for *z _{0}* (

*c*is fixed at 0 for the Mandelbrot set). How each series behaves depends on what you pick for

*z*. For values far from zero, the series rapidly approaches infinity. For values closer to zero, the series can remain bounded. In fact, the Mandelbrot set is the set of all

_{0}*z*values for which Equation 1

_{0}*does*remain bounded. To generate the images shown above, the computer program treated the rectangular viewing area as if it was a small piece of the plane. So each pixel in that region corresponds to an (

*x, y*) coordinate. For each pixel, that (

*x, y*) value is plugged in for

*z*and Equation 1 is iterated. If the resulting series remains bounded, that pixel is colored black. If the resulting series heads off towards infinity, that pixel is assigned a color (or gray value, as in the examples above).

_{0}How does the computer program know if the series is heading off towards infinity? Each time the program iterates Equation 1, it checks to see if the resulting value is inside or outside of a circle of radius 2.0, with its center at the origin. If the value is inside this circle (called the "escape" region—you'll see why in a second), the program goes on to calculate the next value. If the value is outside the circle, it means the series is going to head off towards infinity (it's escaped!), so the program stops iterating Equation 1, colors the pixel in, and moves on to the next one. The color assigned to a pixel whose series has "escaped" depends on how many iterations (steps) it took before the series left the escape region. Every pixel whose series escaped in 1 step is assigned color 1, every pixel whose series escaped in 2 steps is assigned color 2, and so on. One last thing: the program mustn't keep iterating forever, so a limit is set on how many times to iterate for each pixel. If the series hasn't escaped before the limit is reached, the pixel is colored black. It's a simple procedure, but it produces some amazingly complicated images.

Here are some examples for four different starting points (circled in yellow). The white lines show the progression of points in the series. In the first row are points within the Mandelbrot set. For these particular points, an endless, repeating sequence resulted (the iterations end up back at the starting point). In the second row are points in the colored region of the image, thus we know that the corresponding series "escaped." The white lines show how many steps it took. For points further from the edge of the Mandelbrot set, it takes fewer iterations before the series "escapes" (see image at lower left). For points right on the edge of the set, it generally takes a large number of iterations before the series "escapes" (see image at lower right). You can explore this yourself with the Fractal Microscope program (see Bibliography), using its "Orbits" feature.

Do fractals have any uses besides generating intriguing images? As you might expect, there are applications in computer graphics. Fractals can be used to generate more realistic-looking objects from simple algorithms. Fractals have also been used in cell-phone antenna design (see Bibliography). One of the interesting things discoveries in mathematics (and a lot of scientific discoveries, for that matter) is that it can take awhile before someone realizes how to apply the new knowledge. Sometimes the ideas have to percolate through to completely different areas of science before someone realizes "Aha, this is just what I've been looking for to help me solve..." If you find something interesting, go ahead and study it. Do your background research to see how your ideas fit with what is already known. Do your work well, and publish your results. If you think it's interesting, chances are, someone else will find your results interesting, too. Your discoveries may even help someone solve a problem that you don't even know about.

Something that you can have fun exploring is the relationship between a point in the Mandelbrot set and the Julia set corresponding to that point. Remember that both sets come from the same equation, but with different starting values. For the Mandelbrot set, *z _{0}* varies and

*c*is fixed, while the reverse is true for Julia sets. The Bibliography has several different programs you can use to explore how the sets are related, and the Experimental Procedure will help you get started.

## Terms and Concepts

To do a project on fractals, you should do research that enables you to understand the following terms and concepts:

- fractal
- iteration
- complex number
- Mandelbrot set
- Julia sets

## Bibliography

- Three different programs to explore Mandelbrot and Julia sets:
- The Fractal Microscope lets you zoom in on the Mandelbrot set, explore Julia sets corresponding to points in the Mandelbrot set, and investigate the "escape" behavior of points in and around the Mandelbrot set with its "Orbits" feature:

http://www.shodor.org/master/fractal/software/mandy/index.html - The National Library of Virtual Manipulatives (NLVM) has an applet that helps you explore the relationship between the Mandelbrot set and Julia sets:

http://nlvm.usu.edu/en/nav/frames_asid_136_g_3_t_3.html - Professor David Joyce, Department of Mathematics and Computer Science at Clark University, has written an applet to explore the Mandelbrot set. It has a nice grayscale display option, and also the ability to vary the shape of the "escape" region. You can also explore different generating functions with this applet:

http://aleph0.clarku.edu/~djoyce/julia/MandelbrotApplet.html

- The Fractal Microscope lets you zoom in on the Mandelbrot set, explore Julia sets corresponding to points in the Mandelbrot set, and investigate the "escape" behavior of points in and around the Mandelbrot set with its "Orbits" feature:
- For an introduction to complex numbers, see:

http://www.clarku.edu/~djoyce/complex/ - For more on how fractals are generated, see the ThinkQuest site on Fractal Basics:

http://library.thinkquest.org/3288/basic.html - What are fractals?

http://www.jracademy.com/~jtucek/math/fractals.html - Uses of fractals:

- http://www.jracademy.com/~jtucek/math/uses.html
- Musser, George, Practical Fractals,
*Scientific American*, July, 1999.

## Materials and Equipment

- computer with Internet access
- Web browser
- printer

## Share your story with Science Buddies!

I Did This Project! Please log in and let us know how things went.## Experimental Procedure

- First, do your background research and make sure that you understand how a computer program generates images of the Mandelbrot set. It will make it much easier for you to understand how to use the programs.
- Use the Fractal Microscope and the NLVM applet to explore both the Mandelbrot set and the Julia sets. Your background research should give you some ideas of things to try to look for relationships between points in the Mandelbrot set and the corresponding Julia sets.
- Read the instructions for each program. The NLVM applet is simpler, but both programs have controls to help you with your explorations. The instructions for the Fractal Microscope are very helpful. Keep thinking back to how the images are generated. With your understanding of how the algorithms work to make the images, combined with the information in the instructions, you should be able to understand each of the program controls.
- Take notes as you explore. The Fractal Microscope has a Parameters window that you can open so you can keep track of where you are in the image. Write down the locations of interesting images, so that you can recreate them later.
- You can also save images from the Fractal Microscope, and download them to your computer for printing. Collect images that show how Julia sets relate to different points in the Mandelbrot set. Make sure to keep track of the starting points.
- For your display, you can have an image of the Mandelbrot set, surrounded by sample Julia set images, with arrows showing their c value on the Mandelbrot set.
- Remember objective #3: you should be able to explain what you've learned
*in your own words*. Practice by explaining your results to your parents or a friend.

## Share your story with Science Buddies!

I Did This Project! Please log in and let us know how things went.## Variations

- Another way to generate fractal images is called Iterated Function Systems (IFS). Instead of studying Mandelbrot and Julia sets, investigate how IFS-type fractals are generated. The Sierpinski Triangle, Von Koch snowflake, and various fern-like or tree-like fractal shapes are all well-known examples.

## Share your story with Science Buddies!

I Did This Project! Please log in and let us know how things went.## Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.Ask an Expert