Mandelbrot Mandelbrot Is a Program That Explores the Dynamics of Iterating the Complex Function 2 + and a Variatio
Total Page:16
File Type:pdf, Size:1020Kb
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: 2 1. Orbit, which computes and plots the iterates 푧푛+1 = 푧푛 + 푐, 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 2 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 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 2 generating sequences of the form 푧푛+1 = 푧푛 + 푐 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.