The Mandelbrot set and other fractal sets

In the 70's and 80's, a French mathematician by the name of Benoit Mandelbrot was studying the concept of fractional dimensions.  He defined what it meant for a set of points to have 'dimensions' between the normal integer dimensions (e.g. 1, 2, or 3, etc.).  He presented as an example a set that arises from a very simple equation and yet has a very complex structure.

Consider a complex number c = cr + c i I that has the property that |c| < 2 (recall that |c| = sqrt( cr 2 + ci2)).   Let z1 start out to be 0 and set zi+1 = zi2 + c .  The Mandelbrot set is the set of points such that |zi| < 2  for all i .

With a description so simple, it is quite suprising to see the shape of the set that results.  In the xy plane we say that each point will represent a complex number by the convention that the point (x, y) will represent x + y I.  We cannot graph every point in the complex plane, just to the resolution of our picture.  For every point in our picture we assign a colour, black if the point is in the Mandelbrot set and some other colour depending on the number of steps before |zi| > 2.  The graph of the region -1 < x < 1 and -1 < y < 1 looks like the following image.

The Mandelbrot set are the points in black, the other colours in this picture are based on the number of iterations before |zi| is greater than 2.  One thing that is beautiful to see about this set is the self-similar behavior of the boundary.  No matter how much one enlarges the the view of the points near the edge of this set, the picture seems to stay just as complex and unusual.  There are programs (for example FRACINT) that can be used to zoom in on the Mandelbrot set.  You might try running one of them to see how it works.

For this project, create a function that produces a picture of the Mandelbrot set and allows you to zoom in and display parts of the boundary.  The better the picture you create as a final product, the better your grade will be.  The image created above was a crudely displayed with a very short Maple procedure.  You will probably have to use procedures other than the built in 'plot' functions to create something more detailed.  This image has a resolution of 160x160 pixels.

It will not take you long to produce a picture similar to the one above, there are probably functions on the web that will draw something similar in Maple.  With enough computer time, you might even be able to produce a very detailed image.  An 'A' project demonstrates that you have used some feature of the Mandelbrot set or computer programming which helps speed up drawing this picture.  A project that simply produces a lot of pretty pictures is (probably) worth a 'C.'

An alternative project:

Another interesting fractal arises in the study of Newton's method for finding the roots of an equation.  Say that we want to find the roots to equation f(z) = z3 -1.  Pick a point in the complex plane and iterate using Newton's method.  Eventually the process will settle towards one of the three roots of this equation 1, -1/2 + sqrt(3)/2 I or -1/2 - sqrt(3)/2 I.  If the point eventually ends up at the first root, colour the point red.  If it ends up at the second root, colour it blue.  If it ends up at the third root, colour it green.  One would expect to see a very ordinary picture with 1/3 of the points in the plane coloured with with red, green and blue.  Instead what we see is a suprisingly complex image.

Recall that Newton's method starts with a value z 1 and then we put zn+1 = z n - f(zn)/f'(zn).  In the case of the function f(z) = z3 -1, we are setting zn+1 = 1/2(zn + 1/z n2).  When we plot for each complex number a colour that depends on which root each point ends near we see a very colorful boundary between the three fields.

As an alternate project, create functions that allow you to view the above image in more detail.  You should also color each point with a darker/lighter color depending on how many iterations it takes to converge to a given root (i.e. points that take 30 iterations before they converge should be colored with light green/blue/red, while points that converge after 3 iterations should be colored with near black).  For this example you may also experiment with other equations such as x4-1 where you should see four different roots.  Do you see the same self-similar patterns in the image that arises?

Here is a gallery of pictures by produced by previous classes.

Mike Zabrocki
Math 2042