Math
Home


A Doheny Page

The Mandelbrot Set - A brief explanation

	We start out with a number x, and a function (formula)  applied
to the number. For example, suppose x is the number; then 2·x is a
function. If we start out with x = 1, then 2·1 = 2 when the function is
applied to 1. So applying the function to a given number means we merely
double the number (when the function is 2x). 
	Next, we can iterate a function. Using the above example, we
start with the number 1; the result of applying the function is 2. Now we
take 2 and apply the function; we get four. Iterating means we start with
a number, get another number when we apply the function, then apply
the function to the number we got. Do this over and over, and we get
successive iterations of a function on a number.
	Notice in the above example that if we start with 1, and apply the
function, we get 2. Applying it to 2 we get 4, and so on. Successive
iterates lead away from 1, our original number. Successive iterates can
lead away from our original number, and never get closer to any one number.
Or, successive iterates can lead to a particular number, even the one we
started with.
	For example, if our function is x·x, and we start with x = 0.9,
successive iterates will lead to zero. A short sequence of the iterates are:
0.9, 0.81, 0.6551, 0.43046721, ...
	The Mandelbrot set is made using the function z·z + c, where z is
a complex number, and c is a real number constant. We pick a point in
the complex plane (think of the complex plane as the Cartesian coordinate
system, where the y-axis is the complex part, and the x-axis is the real part),
and iterate it in the function just given. If successive iterates lead away
from the original point, we color the starting point a certain color. If
successive iterates don't lead away, then we color the starting point a
different color.
	Notice that there are many different color points in the set, not
just two. If successive iterates lead away from the starting point, they
may do so slowly or quickly. We color the points depending on how 
slowly or quickly the iterates move away from them.

(My apologies to mathematicians who feel uncomfortable with my method
of explanation here; I don't mean to give a rigorous mathematical expose'.)
A BASIC program to generate a Mandelbrot set (written in QBASIC,
the Microsoft BASIC with DOS).

rem set up the screen domain and range
rem in the complex plane
SCREEN (12)
WINDOW (-1.5, -1)-(.5, 1)

rem go through the screen point by point to determine
rem the iteration "rate"
ss = .1
10 FOR x = -1.5 TO .5 STEP ss
FOR y = -1 TO 1 STEP ss
t = x
s = y
FOR i = 0 TO 16
imf = 2 * t * s
ref = t ^ 2 - s ^ 2
s = imf + y
t = ref + x
IF t ^ 2 + s ^ 2 > 4 THEN 40
30 NEXT i
40 LINE (x, y)-(x + ss, y + ss), i, BF
LINE (x, -y)-(x + ss, (-y) + ss), i, BF
60 NEXT y
NEXT x

rem pick points closer togeher, and do the same as above
rem to increase detail
ss = .5 * ss
GOTO 10
end


To return to the Dalton College Homepage, click icon.
Kevin R. Doheny (kdoheny@carpet.daltonstate.edu)