mandelbrot - alfred universityffrey/mandelbrot/notes.pdfmandelbrot mandelbrot is a program that...
TRANSCRIPT
Mandelbrot
Mandelbrot is a program that explores the dynamics of iterating the complex function ๐ง2 + ๐
and a variation (the burning ship factal). It contains five modes:
1. Orbit, which computes and plots the iterates ๐ง๐+1 = ๐ง๐2 + ๐, where ๐ง0 = 0 and c is a
fixed complex number.
2. Zoom, which allows the user to zoom in on specified parts of the Mandelbrot set,
3. Julia, which graphs specified Julia sets associated with the Mandelbrot set, and
4. Burning Ship, which graphs the Burning Ship fractal and allows the user to zoom in on
specified regions.
5. Multibrot, which graphs multibrot fractals and allows the user to zoom in on specified
regions.
Upon execution of Mandelbrot we need to choose a mode. Letโs begin by choosing the Orbit
mode. Upon selecting that mode, three windows will appear as in Figure 1. The one in the
middle is a rendering of the Mandelbrot set (the region colored in black) graphed in the complex
plane where the real part ranges from -2 to 0.5 and the imaginary part ranges from -1.25 to 1.25.
The window on the right displays that portion of the complex plane for which both the real and
imaginary parts range from -2.5 to 2.5. A circle whose center is at the origin and with radius 2 is
also displayed. The window on the left is the status window. The current value of the complex
number ๐ = ๐ + ๐๐ is located in the middle window by a โ+โ symbol and the values of its real
part a and imaginary part b are listed in the status window. Initially, c is set to zero. We can
change the complex number ๐ = ๐ + ๐๐ in two ways:
1. we can input the numbers a and b in their text boxes located in the status window, or
2. we can move the cursor to move the desired location, then click the mouse. For ipads,
simply touch the desired location on the screen.
Figure 1
Upon pressing the โGoโ button, a red dot appears at the origin in the right window and signifies
the location of ๐ง0 = ๐ฅ0 + ๐ฆ0๐. Also a window appears at the bottom of the screen giving the
real part (x) and the imaginary part (y) of the current iterate. Each time the โNextโ button is
pressed, the new iterate ๐ง๐+1 = ๐ฅ๐+1 + ๐ฆ๐+1๐ is graphed as a red dot in the right window and
the location of the old iterate ๐ง๐ = ๐ฅ๐ + ๐ฆ๐๐ changes from red to blue. If an iterate ๐ง๐ = ๐ฅ๐ + ๐ฆ๐๐ ever lies outside the circle of radius 2, then the complex number ๐ = ๐ + ๐๐ is not a part of
the Mandelbrot set, otherwise c is in the Mandelbrot set.
Upon selecting the Zoom mode, three windows will appear: The Mandelbrot set in the middle, a
blank window on the right and the status window on the left. Let us first look at the status
window. At the top are text boxes which give the current intervals for the real part a and
imaginary part b of the complex plane to be graphed in the right window. If, for example, if we
change the left endpoint of the screen a-interval from โ2 to โ1, then press the โRedrawโ button,
the program will plot a portion of the Mandelbrot set in the right window, as in Figure 2.
Figure 2
We note first of all that the โZoom Levelโ is now 1. Also we note that the program, if necessary,
will โsquareโ the graphing window; that is, it will redefine the screen a-interval or the screen b-
interval so that they have the same length. In this example the screen a-interval was shortened to
[โ1, 0.5], whose length is 1.5. The program extended it to have the same midpoint but new
length 2.5, the length of the longer b-interval. Thus, the program redefined the new screen a-
interval to be [โ1.5, 1].
Another way we can zoom in on portions of the Mandelbrot set is to use the โZoomโ button.
When it is pressed, we move the cursor to one corner of the zoom window, then press โOKโ. A
โ+โ symbol appears at that location. (On ipads simply touch the location of the corner). Then
we move the cursor to the diagonally opposite corner, the press โOKโ. Once the โZoom Itโ
button is pressed, the program automatically โsquaresโ the zoom window, increments the zoom
level by one, prints the new screen a- and b-intervals in the status window, and graphs the
zoomed portion of the Mandelbrot set in the right window. If the zoom level is zero, the middle
window is used to define the new zoom window; otherwise the right window is used. We can go
back to a previous zoom level by choosing its number in the zoom level menu. Figure 3 shows a
close-up view of the small โcopyโ of the Mandelbrot set that appears at the extreme left in the
original set.
Figure 3
Now what about the colors? Here is what the program is doing. For each pixel in the zoom
window, the program assigns it the appropriate complex number ๐ = ๐ + ๐๐. It then starts the
iterative process ๐ง0 = 0 and ๐ง๐+1 = ๐ง๐2 + ๐. If for some n, the value of ๐ง๐ is such that the sum
of the squares of its real and imaginary parts is greater than 4 (that is, ๐ง๐ lies outside the circle in
the complex plane whose center is at the origin and whose radius is 2), then c is not part of the
Mandelbrot set and the iteration stops and the pixel is assigned a color. Initially, if n is 5 or less
the pixel is colored cyan. If n is greater than 5 but is 10 or less, the pixel is colored blue. If n is
greater than 10 but is 20 or less, the pixel is colored red, and if n is greater than 20 but is 40 or
less, the pixel is colored yellow. If ๐ง41 still lies within the circle of radius 2, there is an excellent
chance that c actually lies within the Mandelbrot set, so its pixel is colored black. The cut-off
values for the various colors can be edited in the status window. Figure 4 shows the same
magnified portion of the Mandelbrot set as in Figure 3, but where the cut-off values for each of
the colors was doubled. We press the โRedrawโ button after we are finished editing the color
boxes in order to get the graph.
Figure 5 shows another โzoomed inโ region.
When at a zoom level other than level zero, all zooming is relative to the zoomed image
appearing in the right hand window. Figure 6 shows an image zoomed from the right window of
Figure 5.
When the Julia mode is selected, the screen appears as in Figure 7. Julia sets are created by
generating sequences of the form ๐ง๐+1 = ๐ง๐2 + ๐ where c is a fixed complex number and for
various initial values ๐ง0. For each value of ๐ง0, if the sequence generated is bounded, then ๐ง0. is a
point in the fractal. The image in the middle represents the Mandelbrot set (the black portion),
Figure 4
Figure 5
Figure 6
with the real part ranging from -2.0 to 0.5and the imaginary part ranging from โ1.25 to 1.25.
The black portion in the right hand image depicts the Julia set corresponding to ๐ = โ0.75.
That c value is shown in the middle image by a โ+โ symbol. The c value can be changed either
by typing in new values in the Selected Point text fields, or by repositioning the โ+โ symbol.
Figure 8 shows the Julia set where c is near the boundary of the Mandelbrot set.
Figure 7
The viewing window for the Julia set can be changed in two ways. First, we can enter new
numbers in the Real Range and Imaginary Range text fields. No portion of the new viewing
rectangle can go outside the original one. That is, the real and imaginary ranges must be
Figure 8
subintervals of [โ2, 2]. Also the new viewing window is automatically โsquaredโ so that the
aspect ratio remains unaltered. (This โsquaringโ option may extend the viewing window outside
the original one.)
The other way to alter the viewing window is by pressing the Zoom button. When the Zoom
button is pressed, a โ+โ cursor appears in the middle of the Julia image. The cursor can be
repositioned with the mouse and when the โOKโ button is pressed one corner of the new viewing
window is defined. Reposition the cursor to a new location and click the mouse to define the
diagonally opposite corner. We will have the opportunity to either cancel or accept the zoomed
window. As before the zoomed window is โsquaredโ before the new image is drawn and a new
zoom level is created. Figure 9 shows a zoomed portion of the Julia set of Figure 8.
For certain values of c, it is important to use a higher value for the yellow color threshold, for the
sequence may remain relatively stable for a long time before becoming unbounded. For
example, in Figure 9, when the yellow color threshold is increased from 40 to 80, the image of
Figure 10 is generated.
When the Burning Ship mode is selected, the screen looks like Figure 11. Note that the center
window is no longer the Mandelbrot set, but it is the โburning shipโ fractal. This fractal is
generated in much the same way that the Mandelbrot set is generated, except that rather than
generating the sequence ๐ง๐+1 = ๐ง๐2 + ๐ with ๐ง0 = 0, we generate the sequence ๐ง๐+1 =
(|Re(๐ง๐)| + ๐|Im(๐ง๐)|)2 + ๐ with ๐ง0 = 0, and where Re(๐ง๐) represents the real part of ๐ง๐
and Im(๐ง๐) represents the imaginary part of ๐ง๐. The burning ship mode status window is
identical to that of the Mandelbrot mode, so the options available for the burning ship fractal are
identical to those of the Mandelbrot set. This fractal gets its name from the fact that if we zoom
in on the lower left of the fractal, an image appears, as in Figure 12, that roughly resembles a
burning ship.
Figure 9
Figure 10
Figure 11
Figure 12
The last mode is the multibrot mode, and the multibrot fractals, like the burning ship fractal, are
generated in way similar to that of the Mandelbrot set. First, we fix an exponent ๐ โฅ 2. For
each pixel in the graphing window, the program assigns it the appropriate complex number ๐ =
๐ + ๐๐. It then starts the iterative process ๐ง0 = 0 and ๐ง๐+1 = ๐ง๐๐ + ๐. If for some n, the value
of ๐ง๐ is such that the sum of the squares of its real and imaginary parts is greater than 4 (that is,
๐ง๐ lies outside the circle in the complex plane whose center is at the origin and whose radius is
2), then c is not part of the multibrot set, the iteration stops and the pixel is assigned a color. If
๐ง๐ still lies within the circle of radius 2 after a specified โlargeโ n, there is an excellent chance c
lies within the multibrot set, so its pixel is colored black. When the exponent d is set to the value
2, the classic Mandelbrot set is generated. Figure 13 shows the screen when the multibrot mode
is selected. The fractal appearing in the leftmost window is a multibrot fractal corresponding to
the exponent ๐ = 3.
Figure 13
The status window for the multibrot mode has the same options as the status window for the
Mandelbrot set and the burning ship fractal plus the option of choosing the exponent d. When a
different exponent is chosen, the multibrot fractal with the new exponent is drawn in the middle
window. Figure 14 shows a multibrot set with ๐ = 4 and the rightmost window shows an
enlargement of the leftmost piece of the fractal. Remember, like the Mandelbrot set, the black
area represents the multibrot fractal and the colored areas are outside the fractal. The colors are
determined by how many iterations it took to โescapeโ outside a designated disk centered at 0 +
0๐. The exponent d also need not be an integer. Figure 15 displays a multibrot set with ๐ =
5 2โ .
Figure 14
Figure 15