BoundaryScanPP.nb

Boundary scanning and complex dynamics A preprint version of a “Mathematical graphics” column from Mathematica in Education and Research . Mark McClure [email protected] Department of Mathematics University of North Carolina at Asheville Asheville, NC 28804 Abstract Colorful images of the Mandelbrot set and Julia sets are typically drawn using an escape time algorithm. However, it is the boundary of such a set which is truly fractal. We can use a standard technique from image processing to highlight the boundary.

ü Mathematica Initializations

1. Introduction The Mandelbrot set and its associated Julia sets are among the most well known mathematical images. There are many beautiful color images of these sets in [1]. Such images are generally produced using an escape time algorithm. This algorithm may be easily implemented with Mathematica, as we will show again here. In order to highlight the boundary of the set, we can use an additional image processing step as described in [2]. This boundary scanning technique, it turns out, benefits greatly from a very high level of resolution. As a result, we will use a Java implementation to speed up the escape time computations.

2. Complex dynamics In complex dynamics, we study the iteration of a function f :  Ø . That is, given f and an initial complex valued input z0 , we generate a sequence 8z0 , z1 , z2 , …<, where zn = f Hzn-1 L. Given z0 , this sequence is called the orbit of z0 under iteration of f . For example, here are the first few iterates of the point z0 = 1 ê 2 under the action of f HzL = z2 . In[1]:=

Out[2]=

f@z_D := z2 ; NestList@f, 1 ê 2., 4D

80.5, 0.25, 0.0625, 0.00390625, 0.0000152588<

1

BoundaryScanPP.nb

2

Note that the orbit tends to 0. For this function, it is not difficult to see that the orbit of z0 will tend to 0 if » z0 » < 1, while the orbit of z0 will diverge to ¶ if » z0 » > 1.

ü Julia sets In order to understand the global behavior of the dynamics of a function, we divide the complex plane into two regions. The Fatou set, F, is the set where the dynamics are stable in the sense that points close to one another have similar long term behavior. The Julia set, J, is defined to be the complement of the Fatou set and the dynamics of f are quite chaotic on J.

For example, our observations above suggest that the Fatou set for f HzL = z2 should consist of two disjoint parts, the interior and the exterior of the unit circle. The dynamics right on the unit circle are much more complicated, however. If » z0 » = 1, then we may find points as close as we like to z0 which tend to zero under iteration of f , and we may also find points as close as we like to z0 that tend to ¶ under iteration of f . Thus the unit circle is the Julia set for this function. Note that the Julia set forms the boundary of the two components of the Fatou set. More generally, we are interested in studying the iteration of functions of the form fc HzL = z2 + c. Although these ideas are more broadly applicable, it is this family of functions which lead to the Mandelbrot set. Furthermore, the necessary Java code is simplified by sticking to a single simple family. The escape time algorithm for fc is based on the following lemma: Suppose we iterate any function of the form fc starting from an initial value z0 . Then, there are only two possibilities: either the orbit diverges to ¶, or the orbit remains bounded by 2. Thus, the following code is a reasonable test to check if the complex number z0 lies in the Julia set of the function fc . In[3]:=

julia = Compile@8 8c, _Complex<, 8z0, _Complex<, 8bail, _Integer<<, Length@FixedPointList@#2 + c &, z0, bail, SameTest Ø HAbs@#D > 2 &LDDD;

The code simply iterates fc from the starting value z0 at most bail times until the absolute value of the result exceeds 2. The result is the length of the resulting partial orbit. Note that the partial orbit will include the starting point, thus the return value may be as large as bail + 1. For example, the following computation suggests that 1.618 is in the Julia set of f-1 . In[4]:=

julia@-1, 1.618, 100D

Out[4]=

101

The following computation, however, shows that 1.6181 is not in the Julia set of f-1 . In[5]:=

julia@-1, 1.6181, 100D

Out[5]=

10

In fact, the golden ratio j º 1.61804 is right on the boundary of the Julia set. This follows from the fact that it is a repulsive fixed point of the function. We may generate an image of the Julia set of f-1 by generating a table of such values and passing the result to ArrayPlot.

BoundaryScanPP.nb

data = Reverse@Table@julia@-1, a + b Â, 100D, 8b, -1.3, 1.3, 0.01<, 8a, -1.7, 1.7, 0.01
Note that it is tempting to use the NestWhileList command in place of FixedPointList in the definition of Julia. This will execute significantly more slowly, however, since NestWhileList does not compile.

ü The Mandelbrot set The Mandelbrot set may be thought of as an index of the Julia sets. Its definition is based on the following theorem: Suppose we iterate a function fc from the starting value 0. Then there are two possibilities. Either, the orbit remains bounded by 2, in which case the Julia set of fc is connected, or the orbit diverges to ¶, in which case the Julia set is totally disconnected. We may use this to generate pictures of the Mandelbrot set in much the same way we did for Julia sets. However, we fix 0 as the single starting point and we investigate the behavior for a large grid of possible values of the parameter c.

3

BoundaryScanPP.nb

4

mandel = Compile@8 8c, _Complex<, 8bail, _Integer<<, Length@FixedPointList@#2 + c &, 0, bail, SameTest Ø HAbs@#D > 2 &LDDD; mandelData0 = Reverse@Table@mandel@a + b Â, 100D, 8b, -1.3, 1.3, 0.002<, 8a, -2, 0.6, 0.002
Note that we used a very small step size of 0.002 in this example to generate a high resolution image. This will be particularly helpful when we pass the data to a boundary scanner.

3. Using Java We will discuss the boundary scanning technique in the next section. As mentioned, this technique requires a high level of resolution to produce satisfactory results. The time complexity of the process is clearly quadratic with respect to the resolution, thus speed is of the essence. We can drastically increase the speed by doing the computations in Java and processing the results in Mathematica. The essential Java methods are defined in the quadraticIterator class contained in the SupplementaryFiles folder distributed with this notebook. We can access those methods by first instantiating an object of the quadraticIterator class via the JLink package as follows. In[11]:=

Needs@"JLink`"D InstallJava@D; AddToClassPath@DirectoryName@ToFileName@"FileName" ê. NotebookInformation@EvaluationNotebook@DDDD <> "SupplementaryFiles"D; SetComplexClass@"Complex"D; quadraticIterator = JavaNew@"quadraticIterator"D;

BoundaryScanPP.nb

We can now access the two main methods escapeTimes and criticalEscapeTimes defined in this class. The general form of the escapeTimes method is as follows. quadraticIteratorü escapeTimes@c, z0Min, z0Max, bail, resRe, resImD;

This will return a resReäresIm array of escape time values for the Julia set of fc . The lower left hand corner of the corresponding rectangle in the complex plane is z0Min and the upper right hand corner is z0Max. Thus we may generate the image of an interesting Julia set as follows. data = quadraticIteratorü escapeTimes@ -0.73 + 0.216 Â, -1.6 - 1.1 Â, 1.6 + 1.1 Â, 500, 1000, 688D; ArrayPlot@Reverse@dataDD

This is a nice example of the type of image we are interested in. However, no boundary scanning was actually necessary since the Julia set essentially is its own boundary. There is a similar Java method called criticalEscapeTimes to generate images of the Mandelbrot set. The syntax is as follows. quadraticIteratorü criticalEscapeTimes@cMin, cMax, bail, resRe, resImD;

The parameters are very similar to the escapeTimes method, but cMin and cMax define the corners of the image in the parameter plane and all iterations start at 0. Note that 0 is the critical point of fc , hence the name criticalEscapeTimes. We can use this to create a nice zoom into the Mandelbrot set. Note that the bail out parameter is set to 1000, since we are zooming in fairly far. The resolution is again set high, since we will pass this data to a boundary scanner in the next section.

5

BoundaryScanPP.nb

6

mandelData1 = quadraticIteratorü criticalEscapeTimes@ -0.7351 + 0.19696 Â, -0.7348 + 0.19713 Â , 1000, 2000, 1132D; ArrayPlot@Reverse@mandelData1D, ColorFunctionScaling Ø True, ColorFunction Ø HIf@# ã 1, RGBColor@0, 0, 0D, Hue@#3ê4 DD &LD

4. Boundary scanning As described in chapter 45 of [2], many interesting image processing operations can be achieved via convolution with a kernel. Suppose we have a large two dimensional matrix, which might represent color values for an image. A kernel is a, typically much smaller, two dimensional matrix which is used to process the large matrix via convolution. The easiest way to describe convolution is to investigate the formula in a small, but arbitrary case.

ListConvolveAJ

In[20]:=

k11 k21

a i j 11 k12 j N, j j a21 j k22 j k a31

Out[20]//MatrixForm=

J

a22 k11 + a21 k12 + a12 k21 + a11 k22 a32 k11 + a31 k12 + a22 k21 + a21 k22

a12 a22 a32

a13 a23 a33

y z z z z E êê MatrixForm z z {

a23 k11 + a22 k12 + a13 k21 + a12 k22 N a33 k11 + a32 k12 + a23 k21 + a22 k22

If, for example, each ki j = 1 ê 4, then each possible 2 by 2 block in the larger matrix will be replaced by the average of the values in the block. This can be used to create a blur effect in an image. Now suppose we have a very large matrix representing an array of gray levels in an image. We would like a kernel which detects boundaries in that image. Such a kernel, suggested in [2], is ij 1 1 1 jj jj 1 -8 1 j k1 1 1

yz zz zz. z {

Note that in an essentially monochromatic region (i.e. the values are very close to one another), convolution with the kernel will return values close to zero. Values far from zero only arise near the boundaries. Let's apply this kernel to mandelData0 which we used to generate our first image of the Mandelbrot set.

BoundaryScanPP.nb kernel = 8 81, 1, 1<, 81, -8, 1<, 81, 1, 1< <; convolvedData = ListConvolve@kernel, mandelData0D; ArrayPlot@Abs@convolvedDataD, ColorFunctionScaling Ø True, ColorFunction Ø HGrayLevel@H1 - #L30 D &LD

Next, we apply the technique to the zoom of the Mandelbrot set we generated using the Java code. convolvedData = ListConvolve@kernel, Reverse@mandelData1DD; ArrayPlot@Abs@convolvedDataD, ColorFunctionScaling Ø True, ColorFunction Ø HGrayLevel@H1 - #L30 D &LD

7

BoundaryScanPP.nb

Finally, we look a couple more interesting Julia sets. data = Reverse@quadraticIteratorü escapeTimes@ -0.125 + 0.64952 Â, -1.3 - 1.3 Â, 1.3 + 1.3 Â, 1000, 1000, 1000DD; convolvedData = ListConvolve@kernel, dataD; ArrayPlot@Abs@convolvedDataD, ColorFunctionScaling Ø True, ColorFunction Ø HGrayLevel@H1 - #L30 D &LD

8

BoundaryScanPP.nb

data = Reverse@quadraticIteratorü escapeTimes@ Â, -1.3 - 1.3 Â, 1.3 + 1.3 Â, 1000, 1000, 1000DD; convolvedData = ListConvolve@kernel, dataD; ArrayPlot@Abs@convolvedDataD, ColorFunctionScaling Ø True, ColorFunction Ø HGrayLevel@H1 - #L200 D &LD

References [1] H. Peitgen and P. Richter. The Beauty of Fractals: images of complex dynamical systems. Springer, NY, 1986. [2] J. Glynn and T. Gray, The Beginner's Guide to Mathematica Version 4. Cambridge University Press, NY, 2000.

9

Boundary scanning and complex dynamics - Mark McClure

with this notebook. .... [2] J. Glynn and T. Gray, The Beginner's Guide to Mathematica Version 4. Cambridge University Press, NY, 2000. BoundaryScanPP.nb. 9.

3MB Sizes 0 Downloads 319 Views

Recommend Documents

Boundary scanning and complex dynamics - Mark McClure
with this notebook. .... [2] J. Glynn and T. Gray, The Beginner's Guide to Mathematica Version 4. Cambridge University Press, NY, 2000. BoundaryScanPP.nb. 9.

The connected locus for complex cubic iteration - Mark McClure
SupplementaryFiles directory, which should come with this notebook. The initialization .... 9 » a »2 +2 M, then the orbit of z0 will diverge to ¶. (See [4], page 266.) ...

The connected locus for complex cubic iteration - Mark McClure
SupplementaryFiles directory, which should come with this notebook. The initialization .... 9 » a »2 +2 M, then the orbit of z0 will diverge to ¶. (See [4], page 266.) ...

Generating Google™ maps - Mark McClure
complete information is presented at the Google Maps™ API reference [2]. ... and display a Google map: an HTML file for the webpage and a javascript file that ...

Generating Google™ maps - Mark McClure
If you view the HTML file in a web browser, you should see the ..... We can illustrate the algorithm using the first 360 points of the Mt. Mitchell path. dataXML ...

the prevalent dimension of graphs - Mark McClure
The extension of the various notions of \almost every" in Rn to infinite dimen- sional spaces is an interesting and difficult problem. Perhaps the simplest and most successful generalization has been through the use of category. Banach's application

Vibration of the Koch drum - Mark McClure
A preprint version of a “Mathematical graphics” column from .... More precisely, there are seven functions f0 , f1 , …, f6 that map the snow- flake onto the ...

Generating self-affine tiles and their boundaries - Mark McClure
Now for each pair Ha, bL where a and b are chosen from , we want MHa, bL to denote the set of pairs of digits. Hd, d'L so that b = A a ..... used by the program.

the prevalent dimension of graphs - Mark McClure
An easy but important property of is that it respects closure. That is. (E) = (E). Another ( F] p. 41) is that the limsup need only be taken along any sequence fcng1n=1 where c 2 (01) and we still obtain the same value. One problem with is that it is

Vibration of the Koch drum - Mark McClure
We begin by setting up the boundary of the snowflake. The level .... Norm@interiorGrid@@#DD - KochVertices@@nDDD § stepSize к 2 &D@@1DD;.

The Read-Bajraktarevic Operator - Mark McClure
0.4. 0.6. 0.8. 1. References. [1] Massopust, Peter R. Fractal functions, fractal surfaces, and wavelets. Academic Press, Inc., San Diego, CA, 1994. ReadBajPP.nb.

Vibration of the Koch drum - Mark McClure
The fundamental modes of vibration of this drum can be modelled by the eigenfunctions of the .... We begin by setting up the boundary of the snowflake.

"Decremental tag systems and random trees". - Mark McClure
1. Introduction. We fix a positive natural number m and consider sequences of the form xn ... tree construction we call the use it or lose it construction. In fact, our ...

"Decremental tag systems and random trees". - Mark McClure
We fix a positive natural number m and consider sequences of the form xn. = (x1,...,xn), where each ..... Sequences, http://www.research.att.com/~njas/sequences/.

Generating self-affine tiles and their boundaries - Mark McClure
For example, the image in figure 1 is a self-affine four-tile (i.e. it consists of four parts) ... Self-similarity and iterated function systems are, by now, fairly well known concepts. .... In figure 5, we see the image of figure 4 under the mapping

Parametric L-Systems and borderline fractals - Mark McClure
parameter and their application to borderline fractals. Note: To reduce the size of the ..... Maeder, R., The Mathematica programmer (Chapter 8). AP Professional ...

Complex networks: Structure and dynamics
Jan 10, 2006 - 255. 6.2. The Internet and the World Wide Web . ... Structure of the Internet . ..... Watts' pioneering book on the subject deals with the structure and the dynamics .... emerging, e.g., in mobile and wireless connected units.

ocsb-st-mark-boundary-map.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. ocsb-st-mark-boundary-map.pdf. ocsb-st-mark-boundary-map.pdf. Open. Extract. Open with. Sign In. Main menu.

A Stochastic Cellular Automaton for Three-Coloring ... - Mark McClure
Aug 24, 2001 - of the tiling maps each tile to another tile. Figure 2 shows part of such a tiling. ... dynamic images are available on the author's web page:.

Wealth dynamics on complex networks
Fax: +39-0577-23-4689. E-mail address: [email protected] (D. Garlaschelli). .... Random graphs, regular lattices and scale-free networks. The first point of ...

FIRE DYNAMICS SIMULATOR VERSION 6: COMPLEX GEOMETRY ...
tational and visualization tools specifically designed for large-eddy simulations .... model we need to first translate the available data from our original grid system to a ... point xvelo, the storage location for the staggered velocity component.

Epidemic dynamics on complex networks
small-world and scale-free networks, and network immunization. ... consisted of neurons connecting through neural fiber [5], the Internet is a network of many.

Scanning apparatus and method
24 Dec 2009 - 29, 1991 from Mr. Stephen Crampton of 3D Scan ners Ltd. to Mr. Michel Brunet of Vision 3D, Marked as Page Nos. M0083274-M0083275. Vision 3D document labeled “Potential Partners”, addressed to 3D. Scanners Ltd., dated Jan. 10, 1991,