Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
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