Preface
Some people can read a musical score and in their minds hear the music ... Others can see, in their mind's eye, great beauty and structure in certain mathematical functions ... Lesser folk, like me, need to hear music played and see numbers rendered to appreciate their structures. Peter B. Schroeder The line between science and art is a fuzzy one; the two are fraternal philosophies formalized by ancient Greeks like Eratosthenes, the astronomer and poet, and Ictinus, the architect of the Parthenon. Computer graphics helps reunite these philosophies by providing scientific ways to represent natural, mathematical, and artistic objects. I hope that this book will appeal to a broad audience due to the amazing array of topics from cancer growth simulations to seaweed and leave vein development, from logic to genetics, art, artificial intelligence, and fun games played in higher dimensions. The numerous color figures and computer codes should encourage reader involvement and experimentation. Each of this book's six major sections has an introduction mentioning the latest research, references, and updates in the field. Additionally, the book presents information on the latest practical applications of fractals and on the use of fractals in commercial products such as antennas and reaction vessels. In short, fractals are increasingly finding application in practical products where computer graphics and simulations are integral to the design process. In this book, the computer is often used to explore scientific realms like a microscope revealing hidden worlds full of intricate beauty. Today, mathematicians, chemists, and physicists have begun to enjoy and present bizarre mathematical patterns in new ways - ways sometimes dictated as much by a sense of aesthetics as by the needs of logic. Moreover, computer graphics allows non-mathematicians to experience some of the pleasure mathematicians take in their work and to better appreciate the complicated and interesting graphical behavior of simple formulas. Computers, chaos, and freedom - three words which may never before have appeared together in a single sentence. However, computers and computation are now providing humankind with an unlimited landscape for exploration, and unparalleled aid for the imagination. This book is meant to be a stimulus for the imagination - an energizing elixir for scientific creativity. This book is also about some of the many things which researchers do with a computer: simulating, uisualizing, speculating, inventing, and exploring. Some of the topics in the book may appear to be curiosities, with little practical application or purpose. However, I have found all of these experiments to be useful and educational, as have the many students, educators, and scientists who have written to me during the last few years. Keep in mind that throughout history, experiments, ideas and conclusions originating in the play of the mind have found striking and unexpected practical applications. I urge you to explore all of the topics in this book with this principle in mind. I would like to thank Professor Jose Encarna9ao, Editor-in-Chief of Compw/er5 and Graphics, and Annette Leeuwendal and Cristina Cushing from Elsevier for making this book possible. I created the fractal on the book cover using the methods described on pages 415-423. Clifford A. Pickover Yorktown Heights, New York
Introduction
I wonder whether fractal images are not touching the very structure of our brains. Is there a clue in the infinitely regressing character of such images that illuminates our perception of art? Could it be that a fractal image is of such extraordinary richness, that it is bound to resonate with our neuronal circuits and stimulate the pleasure I infer we all feel. P.W. Atkins
1. Chaos and Graphics Section of Computers and Graphics In 1989, Professor Jose Encamagao, Editor-in-Chief of the international journal Computers and Graphics, invited me to edit and found the journal's "Chaos and Graphics" section. The goal of my on-going section is to provide visual demonstrations of complicated and beautiful structures that can arise in systems based on simple rules. The section also presents papers on the seemingly paradoxical combinations of randomness and structure in systems of mathematical, physical, biological, electrical, chemical, and artistic interest. Topics include: iteration, cellular automata, bifurcation maps, fractals, dynamical systems, patterns of nature created from simple rules, and aesthetic graphics drawn from the universe of mathematics and art. This book is a smorgasbord of papers from the "Chaos and Graphics" section of Computers and Graphics. Regretfully, I could not include all papers published over the years due to space limitations. Although I have attempted to place the papers in six major categories (Geometry and Nature; Attractors; Cellular Automata, Gaskets, and Koch Curves; Mandelbrot, Julia and Other Complex Maps; Iterated Function Systems; and Computer Art), naturally many of the topics overlap.
2. The Fractal Goose Little did I know that I would have my first encounter with fractals when I was a boy, before the word "fractal" was coined, and before computers were used to explore the intricacy of fractal shapes. It all started when I found a tattered book titled The Story of an African Farm at a garage sale. It was written by Olive Schreiner and published in 1883. In the book was an early, poignant description of the fractal geometry of nature and, in particular, a fascinating description of blood vessel branching: A gander drowns itself in our dam. We take it out, and open it on the bank, and kneel looking at it. Above are the organs divided by delicate tissues; below are the intestines artistically curved in a spiral form, and each tier covered by a delicate network of blood vessels standing out red against the faint blue background. Each branch of the blood-vessels is comprised of a trunk, bifurcation and rebifurcating into the most delicate, hair-like threads, symmetrically arranged. We are struck with its singular beauty. And, moreover - and here we drop from our kneeling into a sitting position this also we remark: of that same exact shape and outline is our thorn-tree seen against the sky in mid-winter; of that shape also is delicate metallic tracery between our rocks; in that exact path does our water flow when without a furrow we lead it from the dam; so shaped are the antlers of the homed beetle. How are these things related that such union should exist between them all? Is
it chance? Or, are they not all the fine branches of one trunk, whose sap flows through us all? That would explain it. We nod over the gander's insides. Today, scientists have come a long way in characterizing and modeling the century-old goose's guts. These days computer-generated fractal patterns are everywhere. From squiggly designs on computer art posters to illustrations in the most serious of physics journals, interest continues to grow among scientists and, rather surprisingly, artists and designers. The word "fractal" was coined in 1975 by mathematician Benoit Mandelbrot to describe an intricatelooking set of curves, many of which were never seen before the advent of computers with their ability to quickly perform massive calculations. Fractals often exhibit self-similarity which means that various copies of an object can be found in the original object at smaller size scales. The detail continues for many magnifications - like an endless nesting of Russian dolls within dolls. Some of these shapes exist only in abstract geometric space, but others can be used as models for complex natural objects such as coastlines and blood vessel branching. Interestingly, fractals provide a useful framework for understanding chaotic processes and for performing image compression. The dazzling computer-generated images can be intoxicating, motivating students' interest in math more than any other mathematical discovery in the last century. Benoit Mandelbrot, the father of fractals, informally defines fractals as "shapes that are equally complex in their details as in their overall form. That is, if a piece of a fractal is suitably magnified to become of the same size as the whole, it should look like the whole, either exactly, or perhaps only after slight limited deformation." Like the ever-decreasing cats in Dr. Seuss's The Cat in the Hat Comes Back, certain aspects of fractal patterns can be made more apparent when one knows where to magnify the objects. In this book, the various contributors use the computer as a microscope to search for beautifiil forms in geometrical space. Physicists are interested in fractals because the practical side of fractals is that they can sometimes describe the chaotic behavior of real-world things such as planetary motion, fluid flow, the diffusion of drugs, the behavior of inter-industry relationships, and the vibration of airplane wings. (Many times chaotic behavior produced fractal patterns.) Traditionally when physicists or mathematicians saw complicated results, they often looked for complicated causes. In contrast, many of the shapes in this book describe the fantastically complicated behavior of the simplest formulas. The results should be of interest to artists and non-mathematicians, and anyone with imagination and a little computer programming skill. Some readers may wonder why scientists and mathematicians use computer graphics to display mathematical results. Science writer James Gleick said it best: Graphic images are the key. It's masochism for a mathematician to do without pictures ... [Otherwise] how can they see the relationship between that motion and this. How can they develop intuition? So while we may enjoy fractals for their sheer beauty, the computer graphics methods may be used to visualize interesting manifestations of chaotic, or irregular, behavior arising from simple formulas. Get set for the erratic side of nature and mathematics - the discontinuous, infinitely-detailed monstrosities.
3. Chaos To ancient humans. Chaos represented the unknown, the spirit world - menacing, nightmarish visions that reflected man's fear of the irrational and the need to give shape and form to his apprehensions. Today, chaos theory is an exciting, growing field that usually involves the study of wide-ranging phenomena exhibiting a sensitive dependence on initial conditions. Although chaos often seems totally "random" and unpredictable, it often obeys strict mathematical rules derived from equations that can be formulated and studied. One important research tool to aid
in the study of chaos is computer graphics. From chaotic toys with randomly blinking lights to wisps and eddies of cigarette smoke, chaotic behavior is generally irregular and disorderly; other examples include weather patterns, some neurological and cardiac activity, the stock market, and certain electrical networks of computers. Chaos theory has also often been applied to a wide range of visual art. In physics, there are certain famous and clear examples of chaotic physical systems. We can list a few examples here: thermal convection in fluids, supersonic panel flutter in supersonic aircraft, particles impacting on a periodically vibrating wall, various pendula and rotor motions, nonlinear electrical circuits, and buckled beams. Francis Moon in all his books (for example. Chaotic Vibrations) gives many more examples.
4. New Practical Fractals Fractals are increasingly finding application in practical products where computer graphics and simulations are integral to the design process. As one example. Amalgamated Research Inc., of Idaho, USA, manufactures space-filling fractal conduits. These devices contain many root-like outlets and are designed to minimize turbulence. The company's engineered fractal cascade (EFC) can draw or inject fluid simultaneously throughout a mixing vessel. Amalgamated Research's basic invention replaces random scaling and distribution of free interfluid turbulence with the geometrically-controlled scaling and distribution of fluid flow through "engineered" fractals. This means that EFCs can be used as fiinctional alternatives to turbulence, acting as engineered eddy cascades. Engineering applications include control of flows in chromatography, adsorption, absorption, distillation, aeration, scrubbing, extraction and reactor processes. (For more information, see http://www.arifractal.com/.) Another company. Fractal Antenna Systems Inc. based in Fort Lauderdale, Florida, is developing a branching "Fractenna" for hand-held telephony. As the company's name implies. Fractal Antenna Systems develops antennas using fractal geometric patterns with designs repeated at many size scales. The company's trade secrets do not permit us to know all the details at this time, but this highly efficient sender and receiver of electrical waves is said to be no bigger than a small coin. Fractal antennas hold great promise, because these miniature, virtually-invisible devices may be used in everything fi-om wireless LANs to cell phones and televisions. Most cellular and wireless devices use wand antennas protruding from cases. Fractennas can be incorporated in the wireless or cellular device's casing, making them virtually unbreakable. A third practical use of fractals is the fiberoptic faceplate - an array of millions of opticalfiber tubes packed into a thin cylindrical pipe. The composite tube acts as an image-plane transfer device. This means that an image entering one surface exits the other surface as an undistorted digitized image, regardless of the shape of the optical tube. You can use these tubes like periscopes by bending them in order to see around a corner. Several years ago, Lee Cook, a fiberoptic researcher the Galileo Electro-Optics Corporation in Sturbridge, Massachusetts, was interested in preparing arrays of optical waveguides that were perfect as possible. Analysis of certain recursive tilings led Cook and his colleagues to conclude that the edges of optically useftil tilings were fractal in nature. This led to the development of assembly techniques and fractal array structures that allowed the Galileo researchers to prepare highly ordered fiber arrays. One patent has already been granted on these techniques, and Incom, Inc. of Charlton, Massachusetts, has recently purchased Galileo's fractal fiberoptic technology. Fractal fiberoptics (a trademarked term) may have been the first engineered fractal materials with optically usefiil properties. A fractal fiber-array, which consists of fibers of fibers (called multi-multifibers), results in an extremely high degree of internal order and an optically
useful packing in the fiberoptic. This increased order produces a markedly improved image contrast. The perimeters of these new multi-multifibers are exactly analogous to afi*actalGosper snowflake. (To create a Gosper snowflake, recursively transform each face of an equilateral hexagon into three segments of equal length so as to preserve the original area of the solid.) What does the fiiture of fractals hold? Aside from obvious applications in education and art, four fields come to mind for especially increased growth: geology, medicine, astronomy, and pure math. All of these fields benefit because fractal geometry provides a language and conceptual framework for ill-defined geometries, and the power law inherent in fractals condenses their description. For example, fractals will be increasingly used to estimate the strength of rocks under shearing forces, in the analysis of breast mammograms, and in analyzing the randomness of transcendental numbers such as Jt and e. (For more information on practical applications, see http://www.math.vt.edu/people/hoggard/FracGeomReport/node7.html) Dr. Bruce Elmegreen of IBM is currently using fractals to explaining the relative proportion of high-to low-mass stars in the ,sky. The ultimate goal of his work is to explain how the Earth and solar system formed from tenuous, cosmic gas. I asked fractal expert Professor Michael Frame of Union College and Yale University, "What scientific areas would benefit most by using fractals?" He replied: Currently, the largest deficiency is in statistics. Common statistical methodologies don't usually make use of the scale invariance characterizingfi-actals,and as we accumulate more evidence that many real data sets exhibit the long-term dependence and long-tailed distributions that can arise in scaling processes, the need for appropriate statistical tests is apparent. When proper fractal statistics are developed, I imagine the impact in allfieldswill be considerable. Materials science will probably be affected to a great degree. DLA (diffusion-limited aggregation) and turbulence remain two of the biggest puzzles. With enough computational power to do proper statistics on DLA clusters and turbulent flow patterns, we may begin to develop some real understanding of these processes. On a different level, the perceived complexity of our surroundings depends in part on the language with which we describe them. Finding a better language is the main task of science, of literature, of art, of music. To the extent that many natural processes exhibit scaling, fractals provide an important component of any language. As we develop our ability to understand and analyze fractals, our language for understanding the world improves and simplifies. I thank Professor Frame for the advice and support he has provided over the years regarding the "Chaos and Graphics" section of Computers and Graphics and for bringing several interesting references to my attention for the section introductions of this book.
For Further Reading For up-to-date information sources on the world wide web regarding fractals, chaos, and graphics see: http://sprott.physics.wisc.edu/pickover/home.htm. The most celebrated fractal program is the freeware Fractint. Developed through collaboration between its main authors ("The Stone Soup Group") and hundreds of interested programmers and artists, Fractint features numerous fractal types and hundreds of control options. Fractint can be found at http://spanky.triumf ca. Other popular and versatile programs for Windows 95 are listed at http://www.geocities.com/SoHo/Lofts/5601/. A useful source for beginners is the FAQ (Frequently Asked Questions) at http://fractal.mta.ca/sci.fractals-faq/. This FAQ is posted monthly to sci.fractals, a Usenet newsgroup covering fractals, mathematics, and software. The FAQ document is a beginner's reference on fractals, and includes images, papers, bibliographies, answers to commonly asked questions, and archive listings of fractal software. Another related newsgroup is sci.nonlinear. Finally, the Infinite Fractal Loop is a web ring dedicated to fractal art and includes some of the foremost artists in the field (http://www.fractalus.com/ifl/). The following lists some classic and recent reading in the field of fractals, chaos, and graphics:
(1) Avnir, D., Ofer, B., Lidar, D. and Malcai, O. (1998) Is the geometry of nature fractal? Science. January 2, 279(5347): 3 9 ^ 0 . (2) Avnir, D., Biham, O., Lidar, D., and Malcai, O. (1997) On the abundance of fractals. In Fractal Frontiers, M. Novak and T. Dewey, eds. World Scientific: River Edge, New Jersey. (3) Bamsley, M. (1988) Fractals Everywhere. Academic Press: New York. (4) Briggs, J. (1992) Fractals. Simon and Schuster: New York. (5) Chaos Demonstrations, a program which contains examples of Julia sets and over 25 other types of chaotic systems. This peer-reviewed program won the first annual Computers in Physics contest for innovative educational physics software. Contact the Academic Software Library, Box 8202, North Carolina State University, Raleigh, NC 27695-8202, Tel. (800) 955-TASL or (919) 515-7447. Chaos Demonstrations is by J. C. Sprott and G. Rowlands, and it requires an IBM PC or compatible. (6) Gleick, J. (1987) Chaos. Viking: New York. (7) Hellemans, A. (1997) Chaos keeps data under wraps. Science. May 2; 276 (5313): 679. (Article on optical communications.) (8) Malcai, O., Lidar, D., Biham, O., and Avnir, D. (1997) Scaling range and cutoffs in empirical fractals. Physical Review. E56: 2817-2820. (9) Mandelbrot, B. (1984) The Fractal Geometry of Nature. Freeman: New York. (10) Mandelbrot, B. (1998) Is nature fractal? Science. 279(5352): 783-786. (11) Moon, E (1987) Chaotic Vibrations. John Wiley and Sons, New York. (Moon gives many practical examples of chaos in real physical systems.) (12) Moon, F. (1998) Applied Dynamics: Modern Methods and Applications. Wiley: New York. (13) Peitgen, H., and Richter, P. (1986) The Beauty of Fractals. Springer: Berlin. (14) Perry, J. (1997) Estimating chaos in an insect population. Science. June 20; 276 (5320):1881. (15) Pickover, C. (1990) Computers, Pattern, Chaos and Beauty. St. Martin's Press: New York. (16) Pickover, C. (1991) Computers and the Imagination St. Martin's Press: New York. (17) Pickover, C. (1995) Keys to Infinity, Wiley: New York. (18) Pickover, C. (1995) The Pattern Book: Fractals, Art and Nature. World Scientific: River Edge, New Jersey. (19) Pickover, C. (1996) Fractal Horizons: The Future of Fractals. St. Martin's Press: New York. (20) Schroeder, M. (1991) Fractals, Chaos, Power Laws. Freeman: New York. (21) Spedding, V (1997) Fractals give clues to nature's chaos. Scientific Computing World. December, 34: 24-25. (22) Sprott, C. (1993) Strange Attractors. M&T Books: New York. (23) Stevens, C. (1989) Fractal Programming in C. M&T Books: New York. (24) Stewart, I. (1989) Does God Play Dice? (The Mathematics of Chaos). Basil Blackwell: New York. (25) Strasmich, M. (1998) Great Media Company (Catalog of Science, Fractal, and Computer Art Books), PO Box 598, Nicasio, CA 94946. This fine company distributes books, videos, prints, and calendars. (26) Vreeswijk, C. and Sompolinsky, H. (1996) Chaos in neuronal networks with balanced excitatory and inhibitory activity. Science. December 6; 274 (5293): 1724. (27) Wegner, T., and Peterson. M. (1991) Fractal Creations. Waite Group Press: California. (28) Williams, N. (1997) Fractal geometry gets the measure of life's scales. Science. April 4; 276 (5309): 34. (29) YLEM - Artists using science and technology. This newsletter is published by an
organization of artists who work with video, ionized gases, computers, lasers, holograms, robotics, and other nontraditional media. It also includes artists who use traditional media but who are inspired by images of electromagnetic phenomena, biological self-replication, and fractals. Contact: YLEM, Box 749, Orinda, CA 94563.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V All rights reserved
Part I. Geometry and Nature
"Whatever can be done once can alvv^ays be repeated," begins Louise B. Young in The Mystery of Matter w^hen describing the shapes and structures of nature. From the branching of rivers and blood vessels, to the highly convoluted surface of brains and bark, the physical w^orld contains intricate patterns formed from simple shapes through the repeated application of dynamic procedures. Questions about the fundamental rules underlying the variety of nature and mathematical shapes have led to the search to identify, measure, and define these patterns in precise scientific terms. Our seemingly chaotic w^orld is actually highly structured. From an evolutionary standpoint, biological themes, structures, and "solutions" are repeated w^hen possible, and inanimate forms such as mountains and snovv^flakes are constrained by physical law^s to a finite class of patterns. The apparently intricate fabric of nature and the universe is produced from a limited variety of threads w^hich are, in turn, organized into a multitude of combinations. The idea that nature and mathematics are inextricably linked is not nev^ - and neither is the application of that idea in computer graphics. Computer graphics, in general, provides a w^ay to represent all kinds of biological objects (for an excellent book on techniques for simulating nature, see Rivlin (1986)). The Fibonacci sequences, as w^ell as a number of published papers, address the generation of mathematically derived morphological models for plants (Jena, 1984). Researchers have explored the use of rules based on the law^s of nature, such as logarithmic spirals for sea shells (Kawaguchi, 1982) or tree branching patterns determined from the study of living specimens (Aono, 1984). Other papers describe the generation of plant leaf vein patterns (Kolata, 1987) and woodgrains (Yessios, 1979). Bloomenthal (1985) describes methods for simulating tree bark, leaves, and limbs. These and other successes provide continuing incentive for more research on the mathematical basis of natural forums. More recent discussions by David Avnir and colleagues at the Hebrew^ University of Jerusalem raise interesting questions on the degree to which fractals actually describe the irregular face of nature (Avnir, et al. 1998). This article points readers to other recent papers investigating fractal geometry's role in describing intricate natural structures and phenomena.
For Further Reading (1) Aono, M., Kunii, L. (1984) Botanical tree image generation. IEEE Computer Graphics and Applications, 4: 10-34. (2) Aqvist, J. and Tapia, 0. (1987) Surface fractality as a guide for studying protein-protein interactions. Journal of Molecular Graphics. 5(1) 30-34. (3) Avnir, D., Ofer, B., Lidar, D. and Malcai, O. (1998) Is the geometry of nature fractal? Science. January 2, 279(5347): 39-40. (4) Batty, M. and Longley, P. (1994) Fractals Cities: A Geometry of Form and Function. California: Academic Press. (This book describes the development and use of fractal geometry for understanding and planning the physical form of cities; shows how fractals enable cities to be simulated through computer graphics.) (5) Bloomenthal, J. (1985) Modeling the mighty maple. Computer Graphics (ACM SIGGRAPH). San Francisco. 19(3) 305-311.
(6) Briggs, J. (1992) Fractals. New York: Simon and Schuster. (7) Costantino, R., Desharnais, R., Gushing, J. and Dennis, B. (1997) Chaotic dynamics in an insect population. Science. January 17; 275 (5298):389. (8) Family, F. (1988) Introduction to droplet growth processes: simulation theory and experiments. In Random Fluctuations and Pattern Growth: Experiments and Models. Stanley, H., Ostrowsky, N. (eds.) Kluwer: Boston. (9) Feder, J. (1988) Fractals. Plenum: New York. (10) Glass, L. and Mackey, M. (1988) From Clocks to Chaos: The Rhythms of Life Princeton University Press: New Jersey. (11) Hassell, M. (1974) Insect Populations. Journal of Animal Ecology. 44: 283-296. (12) lUert, C , and Pickover, C (1992) Generating irregularly oscillating fossil seashells. IEEE Computer Graphics and Applications, May, 12(3): 18-23. (13) Kadanoff, L. (1986) Fractals: where's the physics? Physics Today. February, 6-7. (14) Kawaguchi, Y (1982) A morphological study of the form of nature. SIGGRAPH July '82 Proceedings: Boston. 16(3): 223. (15) Kolata, G. (1984) Esoteric math has practical result. Science. 225: 494-495. (16) Landini, G. (1991) A fractal model for periodontal breakdown in periodontal disease. Journal of Periodontal Research 26: 176-179. (17) Marder, M. (1997) Roughing it. Science. August 1; 277 (5326):647. (Fractals and computational material science.) (18) Musgrave, K. (1989) The synthesis and rendering of eroded fractal terrains. Computer Graphics (ACM-SIGGRAPH) July 23(3): 41-50. (19) Nottale, L. (1991) The fractal structure of the quantum space-time. In A. Heck and J. Perdang, Applying Fractals in Astronomy New York: Springer. (20) Pickover, C. (1996) Fractal Horizons: The Future of Fractals. St. Martin's Press: New York. (21) Rivlin, R. (1986) The Algorithmic Image. Microsoft Press: Redmond, WA. (22) Robinson, A. (1985) Fractal fingers in viscous fluids. Science 228: 1077-1080. (23) Taylor, C. (1990) Condoms and cosmology: the "fractal" person and sexual risk in Rwanda. Social Science and Medicine. 31(6): 1023-1028. (24) West, B. and Goldberger, A. (1987) Physiology in fractal dimensions. American Scientist 75: 354-365. (This article describes the fractal characterization of the lungs' bronchial tree, the Weierstrass fiinction, the fractal geometry of the heart, and "fractal time".) (25) West, B. (1990) Fractal Physiology and Chaos in Medicine. World Scientific: River Edge, New Jersey. (26) Williams, N. (1997) Fractal geometry gets the measure of life's scales. Science. April 4; 276 (5309):34. (27) Yessios, C. (1979) Computer drafting of stones, wood, plant and ground materials. Computer Graphics (ACM-SIGGRAPH) August '79 Proc, Chicago 13(2): 190.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
Chaos and Graphics
CHAOS GAME VISUALIZATION OF SEQUENCES H. JOEL JEFFREY
Computer Science Dept., Northern Illinois University, DeKalb, IL 60115 Abstract—Iterated function systems can be used to produce a representation of complex images. It was recently shown that one can produce visual representation of the structure of long (2-100 K) sequences by reversing the IPS technique, using afixedset of affine maps and having map selection controlled by the sequence. The resulting Chaos Game Representation (CGR) is a 1-1 map between plotted points and subsequences. Nonuniformity of distribution of subsequences produces nonuniformity in the CGR. The CGR is a picture of the sequence, often with visually striking features corresponding to sets of subsequences, thus a new set of questions and areas of investigation. This paper presents the technique, several examples using DNA sequences as examples of nonrandom sequences whose structure is of great independent interest, algorithms for approximating arbitrarily closely subsequences corresponding to observable features of the CGR, and a description of a program based on these algorithms that has useful for exploring features of CGRs. Finally, several extensions to the basic CGR algorithm are proposed.
INTRODUCTION
It seems to be very difficult for human beings to develop intuition for long sequences of letters or numbers. We seem to be very good at recognizing and using patterns and structures, and comparatively poor with long sequential presentations. (A unique discussion of this fact, with some very far-reaching implications may be found in [ 5 ].) Converting a sequence, which is basically a uni-dimensional set of inputs, into a graphical form that presents the data in a way that allows visual grasp of the overall pattern, as well as detailed analysis, expands our capabilities as investigators in two ways. It makes standard investigations easier or more efficient, and allows entirely new questions and areas of investigation to develop. An excellent example of this phenomenon is the Mandelbrot set. The graphical presentation of the set is both highly motivating and provocative of many questions that quite literally could not occur without it (e.g., what is the angle of any of the smaller copies of the large cardiod?). Chaos game representation [4] is a technique for converting the one-dimensional sequence into a twodimensional form that preserves subsequence structure while providing a provocative visual representation. Further, CGR can be used to approximate any set of subsequences in terms of other sequences with a known structure. 1. THE CHAOS GAME
The chaos game is an algorithm which allows one to produce pictures of fractal structures using paper and pencil or, obviously, a computer. In simplest form, it proceeds as follows: 1. Locate three dots on a piece of paper as the vertices of a triangle, and label them with the numerals 1 through 6 (1 and 2 for the first vertex, 3 and 4 for the second, 5 and 6 for the third). 2. Pick a point anywhere on the paper and mark it. This is the initial point.
3. Roll a 6-sided die. Since the vertices are labelled, the number that comes up on the die is a label on a vertex. Place a mark halfway between the previous point and the indicated vertex. For example, if 3 is rolled, place a mark on the paper halfway between the previous point and the vertex labelled " 3 . " 4. Continue to roll the die, on each roll marking the paper at the point half way between the previous point and the indicated vertex. This procedure is the Chaos Game [ 1 ]. In general, the mathematical subset of the plane defined in the limit, is known as the attractor. Figure 1 is a picture of this attractor after 50,000 repetitions; it is the Sierpinski Triangle. The result of the Chaos Game on other than three points is not, as one might think, a four-, five-, etc., pointed Sierpinski-like figure. For five points, six, or seven initial points the chaos game produces a figure with visible patterns (pentagons within pentagons, a striated hexagon, or heptagons within heptagons), but for eight or more point the game yields essentially a filled-in polygon, except that the center is empty. With four initial points, however, the result is different: It is a square uniformly and randomly filled with dots. 1.1. Iterated function systems Mathematically, the chaos game is described by an iterated function system (IFS)[1]. An IFS is a set of pairs of Hnear mappings, each pair of the form x = ax -\- by -\- e,y = ex + dy -\- /. Each pair of maps gives the function for computing the new value of the x and y coordinates. If vertices are at (0, 0), (0, 1), and (1, 0), and 3 is rolled, vertex 2 is indicated, and the coordinates of the new point are given by x = 0.5 • (x + 0) = 0.5x, and 3; = 0.5 • (y + 1.0) = 0.5>^ + 0.5. With three vertices, and one map per coordinate, we need six maps. We can write the maps in a compact
Reprintedfrom Comput. & Graphics Vol 16, No. I, pp. 25-33, 1992
H. JOEL JEFFREY
Table 2. IFS code for thefiUed-insquare. w
a
b
c
d
e
f
P
1 2 3 4
0.5 0.5 0.5 0.5
0 0 0 0
0 0 0 0
0.5 0.5 0.5 0.5
0 0 0.5 0.5
0 0.5 0 0.5
0.25 0.25 0.25 0.25
3. CHAOS GAME REPRESENTATION OF DNA SEQUENCES
Intuitively, nonrandomness means that a sequence has "structure." More mathematically, it means a nonuniformity of subsequences[6]. If a sequence of numbers is used to produce an attractor for an IFS tabular form as follows. We let w{x, y) = (ax -\- by code, as described above, and that attractor has visually + e, ex -\- dy + / ) , and then the map is given by the observable structure then we have revealed some unsix coefficients a through/f For the Sierpinski triangle, derlying structure in the sequence of numbers, or some the maps are: nonuniformity of subsequences. Thus, if the IFS for 16, 8, or 4 points is controlled by a poor (/>., not very random) random number generator, the attractor disw, 0.5 0 0 0.5 0 0 plays nonuniformity (i.e., visually observable subsets W2 0.5 0 0 0.5 0 0.5. or features). Since a DNA sequence can be treated formally as a W3 0.5 0 0 0.5 0.5 0.5 string composed from the four letters "a," "c," "g," and "t" (or "u"), it is an obvious candidate for testing Since the choice of map is determined by a die (or the CGR to see whether in fact visually interesting fearandom number generator), each map has an asso- tures were present. ciated probability, all equal in the case of the unloaded Specifically, we experimented with several DNA sedie. If the probabilities are not equal, the shape of the quences, as follows: Instead of "rolling a 4-sided die," attractor is unchanged, but the shading may be [1]. use the next base (a, c, g, t/u) to pick the next point. In tabular form, including the probabilities, we can Each of the four corners of the square is labelled "a," use the compact notation, which is known as the IFS "c," "g," or "u;" if a "c," for example, is the next base, eode (Table 1). Table 2 presents the IFS code for the then a point is plotted half way between the previous filled-in square. point and the "c" corner. Example: Thefirst6 bases of the GenBank sequence 2. NONRANDOM SEQUENCES HUMHBB (human beta globin region, chromosome 11) are "gaattc": Quite by chance, the author and a colleague (G. M. Henry) discovered that in these cases the random 1. Thefirst"g" is plotted halfway between the center number generator can make a very significant differof the square and the "g" corner. ence. As noted above, with a good random number generator, the Chaos Game on 8 points produces an 2. The next base, "a," is plotted halfway between the point just plotted and the "a" corner. almost-filled octagonal. However, when the game is played using Turbo Pascal 3.0, which has aflawedran- 3. The base "a" is plotted half way between the previous point and "a" corner. dom number generator[6], elaborate patterns are vis4. Next, "t" is plotted half way between the previous ible, resembling a circle within a circle, the circles conpoint and the "t" corner, etc. nected by 8 (or, respectively, 16) spidery lines. Further, not all flawed random number generators Plotting these six bases, we obtain Fig. 2. produce a visible pattern from Chaos Game; using DOS As with the initial points of the Sierpinski triangle, Basic (Version 2.1) RND, which is a quite poor ran- little significance is visible. However, if we continue dom number generator, the Chaos Game on eight for the entire 73,357 bases of HUMHBB, we obtain points produces no visible patterns. Fig. 3. The CGR of HUMHBB is a good example of the point of this visualization technique, for it illustrates a number of the characteristics of CGRs in general, Table 1. IFS code for the Sierpinski Triangle. and of a certain class of vertebrate DNA sequences in w a b c d e f particular: P Fig. 1. The resuU of the chaos game on three points.
1 2 3
0.5 0.5 0.5
0 0 0
0 0 0
0.5 0.5 0.5
0 0 0.5
0 0.5 0.5
0.33 0.33 0.33
1. Perhaps the most obvious characteristic of this CGR is the almost empty area in the upper right quadrant (the g-quadrant). A smaller copy of this "scoop"
Chaos game visualization
_ . . . . , - ,...,-.. . , - ^ . . . - . . r - •. . - rj.Mf: ^*^- • •.-.;• " "T- •.t'?'^'''^rS -'•'•^'.••':: - . • ' . : ^ ' ' 2 ^
' .'.^ •'•''•V* - - ' -T- ;* ^>n'^""
Fig. 2. CGR of the first six bases of HUMHBB. appears in the upper left, or c-quadrant, presenting a double-scoop appearance. As discussed in the next section, each point in the CGR corresponds to exactly one subsequence (starting from the first base), up to resolution of the screen. Therefore, this graphic pattern indicates repeated patterns in the gene sequence. The same is true of any other visible pattern. The "double-scoop" corresponds to a comparative sparseness of CG pairs in the sequence; a random sequence with all CG pairs has a CGR with a completely empty double-scoop area. (This is discussed in more detail in Section 4.) 2. Note that any base v^U always be plotted somewhere in the quadrant with its label since a base is always plotted half way toward its comer. 3. The CGR has self-similarity: There is a copy of the double scoop at the top of the a- and t-quadrants. Further, this continues: If we examine the picture in horizontal "strips" (in halves, quarters, etc.), we see that at the top of each quarter-strip there are four copies; at the top of each eighth-strip there are eight, and so forth. 4. A rather noticeable feature of this CGR is the set of curves on the top of the upper left quadrant of the plot, curving from the solid block up and to the right.
Fig. 4. The shadedfilled-insquare (see Table 3). 5. The self-similarity and division into quadrants, subquadrants, etc., is a consequence of the nonuniform probabilities of subsequences in general, rather than a particular property of DNA sequences, as may be seen by examining Fig. 4, the attractor for the IFS in Table 3 [1]. The usefulness of the CGR for investigating DNA sequence structure is currently under investigation. 4. PROPERTIES OF THE CGR OF A SEQUENCE
In this section we discuss the relation between the CGR and the sequence itself. We shall assume that the sequence is a string over an alphabet of four letters {a, b,c, d], which label a square beginning at the lower left corner in clockwise order. THEOREM 1. There is a one-to-one map between the sequence and the interior of the square, in which the kth point plotted on the CGR of a sequence corresponds to the first k-long initial subsequence of the sequence, and no other subsequence (up to the resolution of the screen). Thus, there is a one-to-one correspondence between the subsequences (anchored at the start) of a sequence and points of the CGR. Proof (By induction on k.) Assign coordinates of (0,), (0, 1), (1, 1), and (1,0) to the a-, b-, c-, and d-vertices of the square, respectively. For A: = 1, the only point present is located at ( i , i ) , ( | , i ) , ( i , i ) , o r ( | , \). Conversely, if a point is at (5, | ) , it can only have come from the letter "a" (and similarly for "b," "c," or"d"). Now suppose we have a point at location {x,y) and assume (without loss of generality) that next letter is Table 3. IFS code for the shadedfill-insquare.
Fig. 3. CGR of human beta globin region on chromosome 11 (HUMHBB) (73,357 bases).
w
a
b
c
d
e
f
P
1 2 3 4
0.5 0.5 0.5 0.5
0 0 0 0
0 0 0 0
0.5 0.5 0.5 0.5
0 0 0.5 0.5
0 0.5 0 0.5
0.1 0.2 0.3 0.4
8
H. JOEL JEFFREY
a. Then the next point is at (x/2, y/2). Conversely, if a point corresponding to (x, y) is present in the CGR, there is another point (w, u) such that (x, y) = W/(w, r), / = 1,2, 3, or 4. By the induction hypothesis (w, u) corresponds to the initial /c-long sequence s. Therefore, {x,y) corresponds to the (A: + 1 )-long sequence sa,sb,sc, or sd, (depending on whether / = 1, 2, 3, or 4, and we have the result. The definition of the chaos game is that a point is plotted half-way between the previous point and the vertex with its label; mathematically, the new x-coordinate is \ • Xow (for letters "a" and "b") or ^ • (Xow + 1) (for "c" and "d"). Therefore, any sequence is always plotted somewhere in the quadrant of square with that label: for any string 5, sa is plotted somewhere in the 0, For each string t of length /c, Remove the ^image of the primary image. It should be noted that if t is of the form xa, then the /-image of the primary image is the a-image of the x-image of the primary image, and therefore the above algorithm may be formulated recursively. 6. SUBSEQUENCES CORRESPONDING VISUAL FEATURES
It is common, when using the CGR to investigate a set of sequences (e.g., a set of DNA sequences for the same protein in several species) to find a feature of the CGR and want to identify the sets of subsequences that correspond to the feature. Figure 10, for example, shows the CGR of 15 concatenated coding sequences in the human globin region on chromosome 11. (Not all the DNA sequence actually codes for proteins.) An easily identifiable feature is the roughly oval area marked on the figure in which the density of the points is several times that of the CGR as a whole. This indicates a set of subsequences several times more fre-
Id
Fig. 11. Subquadrant-subsequence correspondence. quent than average; we would like to be able to easily identify the subsequences corresponding to this feature. 6.1. Approximation of features Recall from the above section that the a-image of the primary square is the {pvbarp - Wa(^), for some q in the CGR, that the a-image is contained in the aquadrant, and similarly for the b-, c-, and d-images. The points in the a-quadrant correspond to any subsequence ending in "a," and conversely any subsequence ending in "a" produces a point in the a-quadrant. The a-quadrant is thus the a-image of the entire CGR, and similarly for the b-, c-, and d-quadrants. Figure 11 illustrates the fundamental correspondence of string to subquadrant. Let us denote by J the map corresponding to a, and similarly for 5, c, and d. Then any sequence s ~ SiS2' • * s„ defines a map s„s„-i • • • Ji, such that if the sequence / corresponds to point p of the CGR, the sequence ts corresponds to sip) = s„s„-i • • - Si(p). From the definition of the IFS maps, if the CGR is based on the unit square, the square of side length 1, with lower left corner = (0,0) (as in Theorem 2), then the center is at (^, ^), and centers of the a-, b-, c-, and d-quadrants are at ( i , | ) , ( i , | ) , ( | , | ) , a n d ( | , 1), respectively. The center of the aa-subquadrant is then at ( | , g), the ca-subquadrant (the upper-right, or c-, subquadrant of the a-quadrant) is at ( | , g), etc. Using binary representation, we have Table 4. The center of each subquadrant is represented by two bit strings, the x- and ^-coordinates in binary with the binary point dropped. Since the corners of the CGR are at (0, 0), (I, 0), (1, I), and (1, 0), only two operations are involved Table 4. Centers of quadrants, binary representation. Quadrant
Fig. 10. Fifteen concatenated coding sequences of HUMHBB.
a b c d aa ca
Center (.01, (.01, (.11, (.11, (.001, (.011,
.01) .11)
.11) .01) ,001) .011)
11
Chaos game visualization in finding a new point in the CGR, whether the center or comer of a subquadrant or any other point: multiplying by 5 and multiplying by 5 and then adding | . The5mapof(x, );)is(x/2, );/2 + \);cis{x/2 + ^, y/2 + ^); dis (x/l + ^, y/2). Multiplying by ^ is represented in binary by prefixing a 0, and if the leftmost bit of a number is 0, then adding 5 is represented by simply changing that 0 to 1. Therefore, the combination of multiplying by and adding 5 is represented by prefixing a 1. Therefore, if a location is given by bit strings x and y, we can describe the a, b, c, and J maps as shown in Table 4. Now let us consider the converse: Suppose we have a point p whose coordinates are given by bit-strings x and y (e.g., 101, 011). The left-most bits of jc and y are 1 and 0, respectively. Examining Table 5, we see that the only map that can produce this pair of leftmost bits is J, and thus p = J(01, 11). Continuing, if q is the preimage of/?, then the leftmost bits of ^ are 0 and 1, so ^ = b{ {,_ 1). Similarly, (1, 1) = c(0, 0). Thus, (101,011) = d{b{c((0,0)))), which means that (101, 011) is the point corresponding to subsequence "cbd." (Note the reversal as we go to the string from the composition of maps.) The correspondence of bit-pairs to maps is summarized in Table 6. 6.2. Algorithms Based on the above analysis, we can define algorithms for locating, resizing, and moving a box corresponding to any subquadrant of a CGR, as follows: 1. Define the initial subsequence to be "a." 2. To draw a box corresponding to a subsequence, find the corners of the box byfindingthe image of each of the comers of the CGR under the map corresponding to the sequence: If 5 = 51^2 • • • 5„, then 5((0, 0)) = s„s„-i • • • 5i((0, 0)), and similarly for (0, 1),(1, 1), and (1,0). 3. To move a box, (a) Convert the subsequence corresponding to the current box to the corresponding x and y bitstrings. (b) Add/subtract 1 to/from the x and/or y bitstrings: Up: Add 1 to the y bit-string Down: Subtract 1 from the y bit-string Left: Subtract 1 from the x bit-string Right: Add to the x bit-string. (c) Convert the new x and y bit strings to a sequence of letters. (d) Redraw the box. 4. To enlarge a box, delete the rightmost letter of the subsequence, and draw the box corresponding to the sequence.
Table 6. Map to bit-pair correspondence. Map
Bit pair
c h c d
0,0 0, 1 1,1 1,0
5. To shrink a box, append "a" to the subsequence and redraw the box corresponding to the sequence. (Any letter could have been used; "a" is an arbitrary choice.) These algorithms only allow boxes to be defined and moved in units of quadrants, subquadrants, subsubquadrants, etc. In other words, one cannot use them to define a box of side length 5 centered at the point (5, 5). Such a box would not correspond to a single subsequence; the sequences that correspond to this box are the four subquadrants corresponding to subsequences "ag," "ct," "ga," and "tc" (Fig. 12). The above algorithms allow the definition of a set of subquadrants of any size, each corresponding to a set of subsequences with afixedsuffix, that approximate any area (or combination of areas) of a CGR as closely as desired. In essence, the feature of interest is covered with a set of squares of varying sizes, approximating the feature as desired. 6.3. Description ofprogram The above algorithms have been implemented in a working program for analyzing CGRs. The program is approximately 1,600 lines of Turbo Pascal 5.0, running on an IBM AT or PS/2 with EGA or VGA monitor. The program produces a CGR from a user-specified sequence file and then allows the user to define and move a box on the CGR. The eight outer keys of the keypad permit movement of the box in any direction (including diagonals). A user may at any point elect to retain a box; it is redrawn in another color and the subsequence defining the box is added to an on-
Table 5. CGR maps in binary. a{x, y) = (Qjc, 0>') b{x, y) = (01, \y) c{x,y) = i\x, \y) d{xy) = {lx,Oy)
Fig. 12. Square not corresponding to a single subsequence.
12
H. JOEL JEFFREY
screen list. This on-screen list may be edited, and deleted sequences (and their corresponding boxes) are removed. Figure 13 demonstrates the use of the CGR analysis program to find the subsequences that define features of a CGR. In lower-left quadrant of the CGR of the human alpha-1 antitrypsin gene (HUMAIATP) is an irregularly shaped figure that is visibly sparser. The figure shows that the area is approximated by the subquadrants for six different sequences, from four to six bases in length. (Most of the figures in this paper were produced with this program.) It would be very difficult to recognize such a set of sequences via ordinary statistical analysis methods, for the area does not correspond to a single comparatively rare subsequence (such as a single tetranucleotide, for example). Rather, it corresponds to a set of comparatively rare sequences, of different lengths. Finding such sets might be possible in principle, by examining or otherwise processing sets of frequency counts, but some of the sets are large enough to effectively preclude effective human pattern recognition. (The whole point of the CGR, and other visualization techniques, is to avoid long sequences of data.) For example, there are 4^ = 1,024 sequences of length 5, and 4^ = 4,096 of length 6. Further, the "tgatca"-square is part of the sparse area. It is difficult to see how such a set of sequence characteristics might be discovered by examining these large sets of frequency counts other than via CGR analysis. Figure 14 is a good example of using the CGR, together the CGR approximation algorithm, to recognize and analyze features of a sequence that in all likelihood would not occur without it. Figure 14 is the CGR of the amino acids of the bacteriophage PT7. Note the somewhat star-shaped region approximately one quarter of a side length from the right edge. This region results from the absence of a somewhat complex set of subsequences of amino acids missing from the DNA sequence. Traditional statistical analysis would be unlikely to reveal such a feature, as it produces statistics on the relative frequency of subsequences (usually of a single length), and the star shape results from the absence of several subsequences of several lengths.
k' \iC
\
I
cgaa aatca tatca attca cggaa tgatca
la
.*/ • y-r''^' *-^ ^''.v"/ " .;; , " ^ '-,/:
'•,\l
X^: '
:;^, ,;-,
^. 'L
• ' ./ '* ' "''
.., /.
, ^ - ? " *
\
* -'',\^* 1 '
~
1
'
'
Fig. 13. Approximating an irregular feature of HUMAIATP.
Fig. 14. CGR of bacteriophage PT7 (using amino acids). 7. RELATED WORK
Symbolic dynamics[2], a topic in dynamical systems theory, associates strings of symbols with orbits of a dynamical system. It is a powerful tool for analyzing the orbits. It would be interesting to find out whether this approach can be reversed, finding dynamical systems whose behavior is represented by a given sequence. To date we have relied solely on visual characterization of the patterns found in CGRs, both as to recognizing features and judging similarity of features. An objective, mathematical measure is needed. The pattern recognition literature reveals little in the way of a formal definition or characterization of "pattern" that is directly applicable. However, digital image enhancement techniques are clearly applicable. The Hausdorff distance[l] has been used to formalize similarity of patterns, and may prove useful in defining similarity of CGRs. To our knowledge CGR is the first attempt to use particular sequences of numbers (or symbols) to control the chaos game, and thereby analyze/characterize the sequences themselves. Since the approach is new, so far as we know, we conclude with some open questions and extensions of the technique, most of which have been barely, if at all, explored. (We invite the reader to take this list as provocative, in the spirit of initiating a brain-storming session, rather than in any way complete or exhaustive.) 8. EXTENSIONS AND OPEN QUESTIONS
8.1. Pattern recognition and similarity To date, all work with CGRs has relied on using them as an aid to human intuition, presenting a great deal of information visually. We do not view this as a fault, as visualization of scientific information is, in our view, a valuable and growing field. However, there is no reason to limit CGRs to this use. Specifically, the great body of image enhancement and pattern recognition work can be applied to CGRs. These approaches may well improve the usefulness of the CGR as a visualization method, and provide the obvious possibilities of standard feature extraction. The above-mentioned Hausdorff distance as a measure of similarity of CGRs is a formalization related to these developments that seems quite useful. For ex-
13
Chaos game visualization ample, it may be that one can find CGRs that are representative of groups of DNA sequences, and the Hausdorff distance from an unknown DNA sequence to the representative CGRs provides information as to what the unknown sequence codes for. In some applications this may be a necessary step in applying CGRs to a large body of sequences. For example, biologists typically believe this step is necessary. We feel a cautionary note is in order, however: human visual processing is far superior to any currently known technology, so there well be human-recognizable characteristics of CGRs that are resistant to current technology. 8.2. Sequences over larger alphabets The CGR technique presented in this paper works only for sequences over an alphabet of four letters. For larger alphabets of size « > 4, one might think of defining the CGR on a regular «-gon. Although this can be done, it does not provide a good visualization of the sequence, because a random sequence on an ngon does not produce a filled-in polygon. The following approach does work: Divide the unit square (as with the standard CGR) into n equal nonoverlapping portions covering the square {i.e., a tiling of the square). This tiling defines n maps of an IFS code in which map k defines the mapping of the unit square onto tile k. A random input sequence then produces afilled-inunit square, as with the standard CGR, and so any nonuniformity in the input sequence produces a nonuniformity in the density of areas of the CGR, and vice versa. We therefore have the same conditions that permit the standard CGR to represent a sequence on four letters. We have experimented with this approach in DNA sequences. In a DNA sequence three bases (letters) define one amino acid; such ordered triples are known as codons. Each codon defines one amino acid (the building blocks of proteins), although there are only 20 amino acids; several codons code for the same amino acid. In addition, there are three "stop codons" and a particular "start" codon which control cellular machinery that produces the protein based on the DNA sequence, so a total of 24 equivalence classes of codons are present. We have produced a CGR in which the unit square is divided into 24 (4 by 6) squares, and the CGR is produced by 24 mappings onto these squares. If two codons code for the same protein, the
same map is used. The result is a CGR with identifiable areas of greater or lesser density. We have also produced a CGR using only the codons for the 20 amino acids, with a 4 X 5 tiling of the square. The usefulness of this approach to biological investigations remains unknown. 8.3. Natural language representation The input sequence for a CGR can be any sequence. The CGR analysis program discussed above ignores any input letters not in the four-element alphabet. English text files can, and in fact have been used produce CGRs with visual features. (As illustrated in [4], such CGRs are unUke those of DNA sequences.) An application in which this might prove useful is in establishing authorship of texts. One part of such work depends on syntactic and stylistic characteristics of texts, rather than semantics or historical references. It is conceivable the CGRs of works of various authors, or bodies of texts, may show distinctive characteristics. The standard CGR is in certain respects poorly suited to this application, as it is based on only four letters, but the extension to larger alphabets discussed above addresses this difficulty. A somewhat different extension would be to very large sets of maps, perhaps 100 (10 X 10 tiling) or 10,000 (100 X 100 tiUng). This would allow plotting of points corresponding to words, and the result would be a visualization of the sequences of words used. Since in some sense a grammar of defines the possible legitimate sequences of words of the language, this graphical representation of text may prove useful in natural language processing in general, as well as authorship analysis. REFERENCES
1. M. F. Barnsley, Fractals Everywhere, Springer-Verlag, New York (1988). 2. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, Addison Wesley Publishing, Redwood City, CA (1989). 3. J. Feder, Fractals, Plenum Press, New York (1988). 4. H. J. Jeffrey, Chaos game representation of genetic sequences. Nucleic Acids Research 18(8), 2163-2170 (1990). 5. P. G. Ossorio, "What Actually Happens"—The Representation ofReal World Phenomena, University of South Carolina Press, Columbia, SC (1978). 6. S. K. Park and K. W. Miller, Random number generators: Good ones are hard to find. Com. of the ACM, 31( 10), 1192-1201(1988).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
15 Chaos and Graphics
TUMOR GROWTH SIMULATION WERNER DCCHTING
University of Siegen, Dept. of Electrical Engineering, Holderlinstr. 3, D-5900 Siegen, West Germany Abstract—This paper gives a survey of the author's work on systems analysis, control theory, cellular automata, and computer science applied to complex biological systems. Mathematicians have long been interested in cellular automata theory and the game 'iife"[l]. However, only recently have physicians been able to look, via 2D- and 3D-computer graphics, directly at normal and malignant cells in a three-dimensional tissue. This recent development makes it possible to simulate different kinds of tumor treatment and to look to the pathological state of cells in the surrounding tissue. In medicine, one characteristic feature of malignant tumors is uncontrolled proliferation[2], Therefore, from the viewpoint of control theory, a main question is: How is the growth of normal and malignant cells regulated? This question can be studied at different levels: (i) molecular biology level (genes and oncogenes), (ii) cellular level (cell-cycle processes), and (iii) organ level. At present, the experimental data about the control mechanisms at the first level are still very diffuse. For this reason we have focused on constructing feedback control models which describe the cell division of normal and tumor cells at the cellular level. This work led to the hypothesis postulated in 1968[3]: Cancer may be interpreted as a structurally unstable closed-loop control circuit. At that early time, we mainly studied the dynamic behavior and the stability conditions in the time domain by applying block-oriented simulation languages [4]. With the increasing progress in computer science, we extended our first approaches and developed models which additionally describe the spatial behavior of tumor growth. Some of the oversimplifying assumptions underlying the following approaches are: constant volume of a cubic cell, constant cell phase duration, only horizontal and vertical communication between neighboring cells, a limited tissue volume, and neglect of side-effects, metastases, and immunologic reactions. The design philosophy for constructing a computer model of tumor growth requires modular-structured subsystems[5]: (i) feedback control models which describe the cell division of normal and tumor cells including experimentally gained data of cell-cycle phase durations, (ii) heuristic cell-production and interaction rules describing the cell-to-cell communication, for instance distance-dependent cell division rules, and (iii) transport equations for simulating cell movement. Details of the simulation strategy are as follows: • the cell-cycle phase durations of cells are generated by a pseudorandom number generator;
• the knowledge base of cell production rules comprises the following observations: • a normal cell can only divide if there is an empty position in its neighborhood; furthermore, its division is limited to a distinct number of cell cycles; • a tumor cell can divide even if there is no empty space available for a daughter cell; this rule is restricted by a distant-dependent statement as follows: For in vitro tumor growth, if the distance between the dividing tumor cell and the nutrient medium is more than three cell layers, the tumor cell will transfer to the resting (dormant) state GO and later on into the phase of necrosis (cell death). These statements have been transformed into algorithms, and we have written modular-structured subprograms in FORTRAN IV. The simulation run can be considered as a row-to-row computation of the cell algorithm for each individual cell. The input data for a simulation run are: • initial configuration of normal and malignant cells • cell-cycle phase durations of normal and malignant cells • information of cell loss rate • information about the structure of the capillary network • treatment schemes including dose rate and treatment intervals. As for the first example, we fed the computer model with the experimentally gained data of the cell-cycle phase durations of the adenocarcinoma of a mouse. The division of a cell is going on along this series of phases: Gl in which proteins and ribonucleic acid are synthesized, S in which DNA is duplicated, G2 in which the cell synthesizes RNA and protein molecules required for transit through this phase, M leading to cell division, GO in which the cell is resting, and N in which the cell is dying. The simulation run starts by inoculating a single tumor cell living in the state of mitosis (M) into the center of the cell space of a nutrient medium. According to the cell-interaction and production rules, the tumor continuously grows to become a tumor spheroid [ 6 ]. Figs. 1 a and 1 b only show the tumor configuration in the steady state at T = 300 units of time. It is very important to know in which phase of the cell cycle a tumor cell is residing because the sensitivity of tumor cells differs from cell phase to cell phase. This is a decisive fact for tumor treatment
Reprinted from Comput. & Graphics Vol 14, Nos. 3/4, pag. 505-508, 1990
16
WERNER DOCHTING
Fig. la. Tumor spheroid at T = 300 units of time.
Fig. lb. Cross-section of the tumor spheroid at T = 300 units of time. (Symbols: O = N Phase, ^ = GO Phase, ^ = M Phase, Of = G1, S and G2 Phases.)
Fig. 2a. Initial configuration of a single tumor cell placed in a tissue segment (cortex) at T = 1 unit of time.
Fig. 2b. Spread oftumor cells and capillaries at T= 120 units of time.
Tumor growth simulation
17
tions to the model developed so far. Then, in the in vivo model of a segment of the brain of a rat (Fig. 2a) we have introduced a single tumor cell which will divide according to the cell-division rules of a tumor cell. The simulation result (Fig. 2b) impressively demonstrates the spread of tumor cells at T = 120 units of time. Furthermore, it can be clearly seen in Fig. 2b that new capillaries have been formed to supply the tumor with oxygen and glucose. This process is called neovascularization. Thus, further rapid tumor growth is possible. The aim of our work is not only to predict spatial tumor growth but also to simulate and to optimize different kinds of tumor treatment (surgery, radiation and chemotherapy). Thus, algorithms describin^cancer treatment had to be developed [ 8 ], for example by introducing a "Linear Quadratic Model" for computing the number of lethally hit tumor cells as a function of radiation dose rate. In this way it is possible to test different clinical treatment schemes (standard and nonstandard schedules) on in vitro tumor spheroids Fig. 3a. Cross-section of an irradiated tumor spheroid at T by computer experiments. Fig. 3a illustrates the slice = 350 units of time. (Symbols: ® = N Phase, O = GO Phase, of a tumor spheroid which has been irradiated. A com* = M Phase, - F F F Q [ + + + + A ] [ -- — I ] F F f h P7: h - • F F F Q [ + + + + A ] [ — —IjFFfi pg: i-»• FFFQ[+++fp]FFfi —IjFFfk p^: j - • F F F Q [ + + + + A ] [ p,o: k — + F F Q [ + + + + A ] [ — —IjFFfI p , , : 1 -H- F F F Q [ + + + + A [ -IjFFfm IjFFfn p,2: m -*- - F F F Q [ + + + + A ] [ /7,3: n - • F F F Q [ + + + + A ] [ — — I j F F f o P H : 0 - > FFFQ[ fpJFFfc
Pi.b-^c
P2:h^c
py. c - • F d d d e [ + + + + + m ] [
mjddfc
Delayed cell elongation P4: d - * e Ps: e - • g P6: g - * h P?: h - • i Ps: i -*- J P9: J -^^ k p,o: k - • F F
Indeterminate pg. j -»• abF
Branch Piiim ->^ nofF Pi2. n - • fFF P\3'- o-*p A ir-l--4-4_-l--l--l-l41Po
P\4- P -*• f^[ Aj[++T-T-++rijrQ Piy q ^ fF[ -—B][+++++I]Fr p,6: r -^ fF[ -C][++++J]Fs Pn: s -»• fF[ Dir+++KlFt PiB-1 ^ f F [ — E K + + L 1 F Right branchlets Px9. A - • BF P20: B — Ff+C P2i:C-^Ff+D /722: D ->• Ff+E P23: E - • F f + G /724: G — Ff+ L^y? branchlets P25: H ^ IF P26:1 - ^ F f - J /727: J - • F f - K /728: K — F f - L P29: L — F f - M pyo: M - * Ff-
py. c - * F F F z [ + + + k ] [ -rjFFfd -rJFFfe 774: d ^ F F F z [ + + + k ] [ Ps: e -* FFFz[+++fj]FFfg -rjFFfh Pel g - > F F F z [ + + + k ] [ ;77: h -^ F F F z [ + + + k ] [ —-rjFFfi Ps: i - > FFFz[ fjJFFfc branch
Left determinate branch PxQ. k - > ImfF A.:l->fF /7i2: m - • n Pxi. n - • f F F [ — A ] F o Pu: 0 — fFF[—B]Fp Pis: p ^ f F F [ — C ] F q p,6: q ^ f F F [ — D ] F /?/^/z? determinate Pif. r - ^ stfF Pis. s - > fF /7i9: t - » •
branch
u
/72o: u -»• fFF[4-+A]Fv ;72i: V -*• fFF[++B]Fw ;722: w - • fFF[++C]Fx /723: X - * f F F [ + + D ] F
Indeterminate branch P15: p -»• abF Left determinate branch /7,6: A - • BCfFFF PM'. B — fF p.g: C ^ D p,9: D - • fFFFE P20. E -^ f F F [ - P ] F G P21: G - * f F F [ - P ] F H P22. H - ^ f F F [ - P ] F
Branchlets P24- A - • fFB P25: B ->• fFC /726: C — fFD /727: D - * fF
/?/^/z/ determinate branch P23:1 ^ JKfFFF P24: J - * fF P25: K - • L P2(,: L — fFFFM P27: M - • fFF[+P]FN P28: N — fFF[+P]FO P29: 0 - • fFF[+P]F
Cell elongation P2s: z -*• Fz
Branchlet p^: P — fFfF Cell elongation P3.:Q-^FQ
A developmental sequence for Antithamnion densum is shown in Fig. 4. The sequence begins with a single cell that represents the initial apical cell of the upright axis that develops during spore germination. The axiom of the L-system (co) is identified with this single cell (initial apical cell). Figure 4 shows the sequence of images resulting from the first 12 iterations of the L-system for ^. densum. The main axis consists of a string of cells. The cells of the main axis result from cell divisions only by the apical cell at the tip of the filament. The first apical cell division that occurs on the first iteration results in a basal cell that remains diminutive thereafter and does not branch. The second and subsequent apical cell divisions (iterations) result in axial cells of the main axis that do branch, and it is the pattern of this branching that distinguishes the three different species of Antithamnion. Branching occurs following mitosis in intercalary cells, which generates a lateral apical cell. This new apical cell develops into a new branch. The growth of the new branch then proceeds by apical cell division in a manner similar to that of the main axis. On the first apical cell division in the branch, as in the main axis, a diminutive non-branching basal cell is produced.
Subsequent apical cell divisions in the branch also result in cells that branch. Antithamnion produces two types of branches. The first type, apparent in all three species studied here (Figs. 1, 2, and 3), is opposite determinate branching. These branches are arranged in opposite pairs along the main axis. They are determinate in the sense that they grow to a certain number of cells in length and then cease to grow thereafter. The second type of branch is called indeterminate, and these branches are indeterminate in the sense that they continue to grow more or less indefinitely. Using these definitions of determinate and indeterminate, then the main axes of all of the species of modelled here are indeterminate and continue to grow on each iteration. All of the species have opposite pairs of determinate branches. The shapes of these determinate branches are different for the different species (note especially A. pterocladellum in Fig. 1), but they are all similar in that they grow to a certain number of cells in length and cease to grow thereafter. In A. densum and A. tenuissimum (Figs. 2 and 3) the pattern of pairs of opposite determinate branches is interrupted periodically by the formation of an in-
21
Lindenmayer systems and seaweed X \ \ \ X "^Vy '
-A'
V
t I
N N ^
11>
! /;>: / / / / ^
"c^^ **.^ \ \ V\ \ \ \
X f
AN \ \ N
>V \ \ \
^'
/ ;"
*' > ^x / / / /^^ N
f
/'>- - '" '
/ / Fig. 1. Image generated by the L-system for^. pterocladellum (18 iterations). determinate branch. These indeterminate branches are smaller replicas of the main axis, and they show the same pattern of opposite pairs of determinate branches with periodic indeterminate branches. The plants thus show the fractal property of self-similarity. The L-system models achieve this self-similarity by making recursive calls which replicate the main axis. These calls are made by p^ in the L-system for A. densum and by Pi5 in the L-system for A. tenuissimum (see Table 1). In the models the depth of self-similarity, or number of recursive calls, depends upon the number of iterations. This is true to life in that the actual plants continue to grow in this self-similar way to at least four levels of recursion. The images shown in Figs. 2 and 3 represent relatively young plants, and higher degrees of self-similarity are possible in older plants. 4. CONCLUSIONS
The results of this investigation make it clear that L-systems can be used to successfully capture many of the structural features of real plants, several species in the genus Antithamnion. The L-systems presented here generate images that look very much like the plants they are intended to represent. A comparison of the
\. \
•
""V
\
\
Fig. 2. Image generated by the L-system for A. densum (15 iterations).
22
JOHN D . CORBIT and DAVID J. GARBARY
'^^f^^M Fig. 5. Photograph of an actual specimen oi A. tenuissimum (From A. Athanasiadis, A comparative study of Antithamnion tenuissimum and three varieties of ^4. Crucialum, including var. scandinavicum var. nov. (Rhodophyceae). Nord. J. Bot. 6, 703-709, 1986). For comparison with the simulation shown in Fig. 3.
Acknowledgements—We thank Paul D. Bourke, Kenelm W. Philip, and John Quinn for encouraging our studies of Lsystems. In addition we thank A. Athanasiadis for providing the negative with which Figure 5 was produced. This work was supported by a grant from the Natural Sciences and Engineering Research Council of Canada to DJG.
Fig. 3. Image generated by the L-system for A. tenuissimum (24 iterations).
1
•1 • I 10
Fig. 4. Developmental sequence showing the first 12 iterations in the development of ^. densum.
REFERENCES 1. A. Lindenmayer, Mathematical models for cellular interactions in development: I. Filaments with one-sided inputs. / Theor. Biol. 18, 280-299 (1968). 2. A. Lindenmayer, Mathematical models for cellular interactions in development: II. Simple and branching filaments with two-sided inputs. / Theor. Biol. 18, 300315(1968). 3. P. Prusinkiewicz and J. Hanan, Lindenmayer Systems, Fractals, and Plants, Lecture Notes in Biomathematics No. 79, Springer-Verlag, New York (1989). 4. P. Prusinkiewicz and A. Lindenmayer, The Algorithmic Beauty of Plants, Springer-Verlag, New York (1990). 5. D. Saupe, A unified approach to fractal curves and plants. In H.-O. Peitgen and D. Saupe (Eds.) The Science of Fractal Images, Springer-Verlag, New York, 272-286 (1988). 6. R. A. Morelli, R. E. Walde, E. Akstin, and C. W. Schneider, L-system representation of speciation in the red algal genusDipterosiphonia (Ceramiales, Rhodomelaceae). / Theor. Biol. 149, 453-465 (1991). 7. R. E. Norris, Species of Antithamnion (Rhodophycae, Ceramiaceae) occurring on the Southeast African coast (Natal). J. Phycol. 23, 18-36 (1987). 8. I. A. Abbott and G. J. Hollenberg, Marine Algae of California, Stanford University Press, Stanford, CA (1976). 9. D. Garbary, D. Belliveau and R. Irwin, Apical control of band elongation in Antithamnion defectum (Ceramiaceae, Rhodophyta). Can. J. Bot. 66, 1308-1315 (1988). 10. A. Athanasiadis, Evolutionary biogeography of the North Atlantic Antithamnioid algae. In D. J. Garbary and G. R. South (Eds.) Evolutionary Biogeography of the Marine Algae ofthe North Atlantic, Springer-Verlag, Berlin (1990). 11. A. Athanasiadis, A comparative study of Antithamnion tenuissimum and three varieties of ^. cruciatum, including var. scandinavicum var. nov. (Rhodophyceae). Nord. J. 5o/. 6, 703-709(1986).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
23
Chaos and Graphics
GENERATING FRACTALS FROM VORONOI DIAGRAMS KEN SHIRRIFF
Computer Science Division, 571 Evans Hall, University of California, Berkeley, CA 94720 Abstract—This paper describes how to generate fractal patterns by recursively creating Voronoi diagrams on a set of points. These patterns resemble such things as leaf veins and roadmaps. By varying the degree of subdivision and the distribution of points, different output patterns can be obtained.
Voronoi diagrams can be used to generate interesting fractal patterns that resemble leaf veins, roadmaps, and cracked pottery glaze. The patterns are generated by recursively creating a Voronoi diagram inside each Voronoi polygon. (A Voronoi diagram consists of nearest-neighbor polygons. Given a set of points, the Voronoi polygon around each point is the region of the plane closer to the selected point than to any other point [1].) To generate the fractal images, we start with a small set of points and draw the Voronoi diagram of these points. Then, we use a denser set of points and compute a new Voronoi diagram inside each region of the first diagram. That is, for each region, we consider only the points inside that region, and draw a Voronoi diagram
clipped to that region. We repeat this process recursively, building a new Voronoi diagram inside each region of the higher level diagram. Listing 1 gives a pseudocode description of the algorithm. Figure 1 demonstrates execution of the algorithm through four levels. The first point set consists of 5 points; the next sets are 25, 125, and 625 points, The output can be varied in several ways. The most obvious parameters are the number of points at each level and the total recursion depth. Figure 2 uses 10, 100, 1000, and 10000 points in four levels of recursion, Thus, each polygon is subdivided into an average of 10 subpolygons. The line thickness is halved at each level to emphasize the higher levels. In Fig. 3, the number of points at each level is computed with fac-
"max—level" is the number of levels to do. ''num—points" is an array of the number ofpoints at each level "pointset" is an array of sets of points. "drawing^area" is the initial screen region. "v or ^polygons" is a set of Voronoi polygons. "generate—points" generates a set of points. "intersect" intersects a set ofpoints with a region, returning a set of points. "voronoi—diagram" generates the Voronoi polygons of a set of points. "draw" draws polygons clipped to a region. function main(max_level, num_points) pointset [ max_level ] = generate—points (num_points [ max_level ]) for i = 1 to max_level-1 pointset [ i ] = first num_points [ i ] points o/pointset [ max_level ] end for draw_fractal( 1, drawing—area) function draw—fractal (level, region) points = intersect (pointset [ level ], region) vor—polygons = voronoi—diagram( points) draw (vor—polygons, clipped to region) if (level < max—level) for i in points draw—fractal (level +1, vor—polygons [ i ]) end for end if Listing 1. Pseudocode for the Voronoi fractal algorithm. Reprintedfrom Comput. & Graphics Vol. 17, No. 2, pag. 165-167, 1993
24
K. SHIRRIFF
Fig. 1. Iterations of the algorithm over four levels, showing results after 5, 25, 125, and 625 points.
Fig. 4. Nonuniform distribution on a disk. The levels have 10, 100, 1000, and 10000 points.
torials: the levels have 2!, 3!, 4!, 5!, 6!, 7!, and 8! points. This results in more subdivision in deeper levels. Finally, a small degree of subdivision at each level, for instance by using 3, 9, 27, and 81 points, gives a more angular result than larger subdivisions. The distribution of points can be changed to affect the output. Figure 4 uses a distribution of points in a circle, weighted towards the edge. The result is somewhat reminiscent of Escher. Figure 5 uses a nonuniform distribution in the plane; the first level is weighted to the left, the second to the bottom, the third to the right, and the fourth to the top. As a result, polygons on different scales shrink in each of the four directions. A final way to vary the output is, for each polygon, randomly decide if it is to be subdivided or not subFig. 2. A Voronoi fractal generated by subdivision by 10. The four levels have 10, 100, 1000, and 10000 points.
Fig. 5. Nonuniform distribution on a square. Successive levels Fig. 3. A Voronoi fractal with more subdivision at lower levels. are weighted towards the left, bottom, right, and top, and have 10, 100, 1000, and 10000 points respectively. The levels have 2!, 3!, 4!, 5!, 6!, 7!, and 8! points.
25
Generating fractals from Voronoi diagrams divided. This creates an image with voids of various sizes, and with a smaller fractal dimension. However, the result is not particulariy pleasing, and a sample image is not included. Acknowledgements—This research was supported by an IBM Graduate Fellowship. The initial Voronoi diagram code was
written by Steven Fortune and is described in [2]. I wish to thank Clifford Pickover for his helpful comments. REFERENCES
1. F. P. Preparata and M. I. Shamos, Computational Geometry, Springer-Veriag, New York (1985). 2. S. Fortune, A Sweepline Algorithm for Voronoi Diagrams, Algorithmica 2, 153-174 (1987).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
27
Chaos and Graphics
CIRCLES WHICH KISS: A NOTE ON OSCULATORY PACKING CLIFFORD A. PICKOVER
IBM Thomas J. Watson Research Center, Visualization Systems Group, Yorktown Heights, NY 10598 Abstract—This paper provides a light introduction to simple graphics techniques for visualizing a large class of shapes generated by osculatory packing of circles and spheres.
This note provides several simple recipes for graphically interesting structures based on the osculatory packing of finite areas using circles and spheres. The problem of covering a finite area wdth a given set of circles has received frequent attention [ 1 ]. As background, the densest packing of non-overlapping uniform circles is the hexagonal lattice packing where the ratio of covered area to the total area (packing fraction) is 0 = 7r/VT2 = 0.9069. The limiting packing fraction for nested hexagonal packing of circles, with k different circle sizes is 0A= 1 - ( I -0.9069)*
(1)
This applies to cases where each of the uncovered areas, or interstices, is also hexagonally packed by smaller circles. For larger values of k,k approaches unity (1). Past work has usually defined a distribution of circles as osculatory if any available area is always covered by the largest possible circle [1]. If the original area to be covered is a tricuspid area (Fig. 1), then the first circle to be placed must be tangent to the three original larger circles. This kind of packing is also often referred to as Apollonian packing[2]. In contrast to past work, the criterion for osculatory packing is relaxed here: each successively placed circle on the plane need only be tangent to at least one previous circle (tangent-l packing). To generate the artisticfiguresin this paper, a circle center is randomly placed within the available interstice. The circle then grows until it becomes tange. to its closest neighbor. The process is repeated several thousand times. One easy way to simulate this on a computer is to determine the distances dt from the newly selected circle center to all other circles / on the plane. Let di = di - r,
the plane. In this case the circle center is discarded, and a new attempt to place a circle is made. Circle center distributions were chosen in three ways in order to generate artistic patterns. In Figs. 2-3, the circle centers were selected using a uniform white noise generator. Fig. 2b is a magnification of a tiny area of Fig. 2a. In Fig. 3, an upper bound is used for the largest allowed circle size. Figs. 4a and 4b are created from Brownian (random walk) noise. To create these figures, the center positions of the newly placed circles were computed from:
Xi = Xi-i + Xi + r/_iCOs(27rX2) y, = y,., + X3 + r/-isin(2irX2)
(3)
where X is a random number. Fig. 5 shows tangent-1 spheres with a Gaussian-white center distribution. The Gaussian noise was produced by
Gj = {\/n) 2
h
(4)
where Xk are random numbers on (0,1), and n - 5. Note that n can have different values for the x and y directions. Fig. 5 shows a simple, easy-to-implement model of soap bubbles produced by ray-tracing a Gaussian osculatory distribution of spherical shells (Eq.
(2)
where r, is the radius of circle /. min{5/} is then the radius of the new circle. Note that if there exists a negative 8i then the selected center is within a circle on
Fig. I. Tricuspid interstices in standard osculatorv* packing.
Reprintedfrom Comput. & Graphics Vol. 13, No. 1, pag. 63-67, 1989
28
Fig. 2a. Tangent-1 osculatory packing for white distribution of circle centers.
Fig. 2b. Magnification of a small section of Fig. 2a.
Circles which kiss
29
Fig. 3. Osculatory packing for white distribution of circle centers with an upper bound for allowed circle radii.
2 is extended to three dimensions). Two light sources were used to produce the figure, and the picture resolution is 1024 X 1024. Figs. 6a and 6b show covering area vs. time plots for circles placed on a 100 X 100unit plane. "Time" indicates the number of attempts to place a circle. For a white distribution of circles (Fig. 6a), the value for the covering area rapidly achieves a plateau as available voids arefilled.For the Brownian distribution, the covering area function has a very different shape. The various intermediate plateaus indicate packed domains in which the wandering circles temporarily get trapped (because surrounding voids are scarce). Since the circle sizes are not constrained to some minimum radius, the wandering circle can always "squeeze" its way out of a tightly packed area. The fractal dimensions D for these pictures can be computed from the mass-radius power law relationship m ^ r^.m(r) is the combined area of all circles contained within a measuring circle of radius r. By observing the change in mass as a function of r, the dimension can be empirically computed. For the white osculatory tangent-1 packing, D ^ 1. Statistical self-
similarity of the packing in Fig. 2 indicates that successive magnifications will have a similar appearance. For the brown distributions in Figs. 4a and 4b, D '^1.8. Interestingly, recent research has used similar circle placement techniques to model thin-film growth and the kinetics of droplet formation [ 3 ]. Thin films play an increasingly important role in a variety of applications, from microelectronics to biochemical sensors. This note provides another example of interesting graphical behavior in chaotic systems. For additional information on the distribution of circle radii in standard Apollonian packing, and for packing of hyperspheres in «-dimensional space, see [1, 4 ] . Over the last few years, mathematicians have begun to enjoy and present bizarre mathematical patterns in new ways—ways sometimes dictated as much by a sense of aesthetics as by the needs of logic [5, 6]. Moreover, computer graphics allows non-mathematicians to experience some of the pleasure that mathematicians take in their work and to better appreciate the very complicated and interesting graphical behavior of certain simple formulas.
30
Fig. 4a. Brownian distribution of circle centers.
Fig. 4b. Brownian distribution of circle centers. The total covering area is visually accented by filling these regions.
31
Circles which kiss
Fig. 5. Soap bubbles in the moonlight. This figure was produced by ray-tracing a Gaussian osculatory distribution of spherical shells.
2
4 Time
Covering Area for White Distribution Fig. 6a. Covering area function for white tangent-1 packing.
REFERENCES 1. H. Kausch-Blecken, V. Schmeling and N. Tschoegl, Osculatory packing of finite areas with circles. Nature 225, 1119-1121 (1970). 2. D. Boyd, The residual set dimensions of the Apollonian packing. Mathematika 20, 170-174 (1973). B. Mandelbrot, The Fractal Geometry of Nature, Freeman, New York (1983).
Covering Area for Brownian Distribution Fig. 6b. Covering area function for brown tangent-1 packing.
3. F. Family and P. Meakin, Getting the drop on thin films. Science News 134, 124 (1988). (See also June 25, 1988 Phys. Rev. Lett.) 4. M. Gardner, Packing of circles and spheres. Scien. Amer. 218, 130-135(1968). 5. C. Pickover, Computers, Pattern, Chaos and Beauty, St. Martin's Press, New York (1990). 6. I. Peterson, Portraits of equations. Science News 132(12), 184-186 (1987) (and cover picture).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
33 Chaos and Graphics
GRAPHICAL IDENTIFICATION OF SPATIO-TEMPORAL CHAOS ARUN V. HOLDEN
Centre for Nonlinear Studies, The University of Leeds, Leeds LS2 9JT, UK and A. V. PANFILOV
Institute of Biological Physics, USSR Academy of Sciences, Pushchino, 142292 Moscow Region, USSR Abstract—A graphical method for identifying spatio-temporal chaos in irregular spatio-temporal patterns is illustrated using numerical solutions of partial differential equations that model cardiac tissues.
Chaos is irregular, complicated behaviour that has been produced by nonlinear systems that can be systems of equations or actual biological, chemical, engineering, or physical systems [1]. The behaviour appears as a continuous or discrete time series and the actual system can be modeled by a nonlinear recursion (a map) or nonlinear ordinary differential equations. The irregularity is produced by a deterministic system and shows long-term unpredictability—this is due to sensitivity of initial conditions. Although the possibility of chaotic behaviour has been known in principle since the work of Poincaire, the current enthusiasm for chaos [ 2 ] is based on the availability of computers for numerical experiments, and computer graphics for displaying the results of these numerical and laboratory experiments. Although, formally, a mathematician would require proof of the existence of a strange attracting set and a scientist would require a positive maximal Lyapunov exponent as indices of chaos, in practice, chaos is identified graphically by the reconstruction of a low order, strange (apparently with a fractal structure) attractor from numerical solutions or experimental observations. This can be done by using the method of delays, by plotting the variable x(t) against its earlier values x(t — r ) , x{t — 2T), • • • [3]. The reconstructed attractor is then quantified, by estimation of the spectrum of Lyapunov exponents, and the various dimensions and entropies of the attractor that can be defined [4, 5]. These methods can be appUed to time series, but most processes of interest are not simply time series, but spatially extensive. Thus, they are spatio-temporal patterns, and can be represented in discrete space by discrete time, discrete state (cellular automata), or discrete time-continuous state (coupled map lattice) models. In continuous space, a continuous time, continuous state model is a partial differential equation. These spatially extensive systems and their models can exhibit periodic, patterned or irregular behaviours. A major question is whether spatio-temporal irregularity (in a model or in experimental observations) is due to
deterministic nonlinear processes, and hence is spatiotemporal chaos. One approach is to ignore the spatial aspects, as in Lorenz's truncation of the Navier-Stokes equations, to three nonlinear ordinary differential equations [6]. Although this has been remarkably successful, it is not satisfactory in situations where spatial effects are of interest. In discrete space models, spatio-temporal chaos can be considered as a pattern that does not repeat itself as long as the model is iterated [7]: the determinism is guaranteed by a simple model. This is not applicable to experimental observations. We have been interested in modelling wave phenomena in cardiac tissue [8], where recirculation of electrical activity is associated with arrhythmias and ventricular fibrillation. Cardiac tissue is described by a reaction-diffusion equation, where the nonlinear
Fig. 1. Difference in electrical potential between two runs with similar initial conditions; red: —ve^ blue: -\-ve, yellow: no difference. To begin, the difference is apparent only at the fast front of the rotating vortex; with time, the difference increases and spreads throughout the medium. However, the vortex structure is still apparent as new vortices arise.
Reprintedfrom Comput. & Graphics Vol 15, No. 2, pag. 201-302, 1991
34
ARUN V. HOLDEN and A. V. PANFILOV
"reaction" components describe the electrical behaviour of the cell membrane. These equations are complicated, and so are investigated by numerical methods. Numerical solutions of 2D reaction-diffusion equations can show spiral wave solutions (or vortices), which are believed to correspond to the recirculation of excitation seen in ventricular fibrillation [ 9 ] . Our numerical computations have shown an instability in these spiral waves for a particular model of cardiac tissue: the rotating spiral wave breaks down as a result of interactions between the fronts and backs of successive waves [10, 11]. This spatio-temporal irregularity is obtained in numerical solutions of deterministic partial differential equations, however, if it is spatio-temporal chaos, it is necessary to demonstrate a sensitivity to initial conditions. To demonstrate such sensitivity to initial conditions, we take two integrations with very similar initial conditions and plot the difference between them; this method could be used with spatio-temporal data with similar initial conditions. The results are displayed in Fig. 1. Initially, there is hardly any difference between the two runs, and this difference is only apparent at the steeply rising wavefront of the spiral wave. As tip fragmentation occurs, a difference becomes visible at the centre of the vortex, and this difference increases and spreads outward from the centre of the vortex.
REFERENCES 1. A. V. Holden (ed.), Chaos, Manchester University Press, Manchester, UK; Princeton University Press, Princeton NJ(1986). 2. I. Stewart, Does God Play Dice? The Mathematics of Chaos, Blackwell, Oxford (1989). 3. N. H. Packhard, J. P. Crutchfield, J. D. Farmer, and R. S. Shaw, Geometry from a time series. Phys. Rev. Lett. 45,712-716(1980). 4. A. Wolf, Quantifying chaos with Lyapunov exponents, In Chaos, A. V. Holden (ed.), Manchester University Press, Manchester, UK (1986). 5. P. Grassberger, Estimating the fractal dimensions and entropies of strange attractors. In Chaos, A. V, Holden (ed.), Manchester University Press, Manchester, UK (1986). 6. E. Lorenz, Deterministic nonperiodic flow. / Atmos. Sci. 20, 130-141 (1963). 7. S. Wolfram, Universality and complexity in cellular automata, Physica lOD, 1-36 (1984). 8. A. V. Holden, M. Markus, and H. G. Othmer (eds.), Nonlinear Wave Processes in Excitable Media, Plenum, New York (1990). 9. A. T. Winfree, When Time Breaks Down. The ThreeDimensional Dynamics of Electrochemical Waves and Cardiac Arrhythmias, Princeton University Press, Princeton, NJ( 1987). 10. A. V. Panfilov and A. V. Holden, Self-generation of turbulent vortices in a two-dimensional model of cardiac tissue. Phys. Lett. A., 151, 23-26 (1990). 11. A. V. Panfilov and A. V. Holden, Spatio-temporal irregularity in a two-dimensional model of cardiac tissue. Int. J. Bifurcation and Chaos, 1, 219-255 (1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
35
Chaos and Graphics
MANIFOLDS AND CONTROL OF CHAOTIC SYSTEMS H E L E N QAMMAR^ and A. V E N K A T E S A N Department of Chemical Engineering, University of Akron, Akron, OH 44325, U.S.A. Abstract—^Because of the erratic oscillations in chaotic systems, it is often desirable to control them to a steady state. When a controller is added it creates a new dynamical system whose properties are influenced by the underlying chaotic system. Increasing the amount of control has a dramatic effect on the manifolds and the basin for the desired stable steady state. Therefore, it is important to understand the effect of the unique properties of chaotic systems when developing new controller designs to yield optimum performance. 1. INTRODUCTION
The control of chaos has recently attracted much attention [1-8]. The existing control techniques can be classified as (1) feedback where the error between the actual and desired response is used to perturb the chaotic system and (2) nonfeedback where a small driving force is added to the chaotic system and thus the effectiveness of these controllers must consider the unique properties of the chaotic system. These properties include sensitivity to initial conditions, existence of a dense set of unstable orbits within the chaotic attractor, ergodicity of the chaotic motion, fractal structure of the chaotic attractor, and the existence of a homoclinic tangle within which the chaotic attractor is embedded. It is important to remember that adding a controller creates a new dynamical system. If the desired response, also called the reference state, is away from the chaotic attractor then we are not concerned with the structure of the chaotic attractor but only with the structure of the manifolds for the reference state. This state should be stable and have a large, non-sparse basin of attraction so that the controlled system quickly converges to the reference state and is relatively insensitive to noise. The degree to which the controlled system obtains these attributes depends on the properties of the underlying chaotic system. To understand the influence of the underlying system we shall show how the stable manifold and the basin for the desired reference state change as the interaction between the controller and chaotic system becomes stronger.
undergoes an exothermic, free-radical reaction to form polyvinyl acetate. The reaction takes place in a continuously stirred reactor (CSTR). Heat from the reaction is transferred to cooUng water in the jacket surrounding the reactor. A mathematical model of a laboratory-scale reactor was developed and verified by Teymour and Ray [9-11]. They easily modified this model to include the differences found in a typical full-scale reactor. The resulting non-dimensional model of Eqs ( 1 ) (4) consists of four ordinary differential equations describing the dynamics of the monomer volume fraction, Vm, solvent volume fraction, Vs, dimensionless initiator concentration, Zi, and the dimensionless reactor temperature, y. dVm ., , . PiTif ,, fqoui - 7 - = (1 - (b)?(a):(b)) #define min(a,b) ((a) 0,
the orbit is locally unstable and chaotic.
Any system containing at least one positive Lyapunov exponent is defined to be chaotic, with the magnitude of the exponent reflecting the time scale on which the system's dynamics become unpredictable. As an example, consider the equation Y
-
^ '
[\+Xtf' where ^ is a constant, and A is the usual bifurcation parameter. This equation has been used to fit a considerable amount of data on insect populations, and high-resolution bifurcation maps of this equation are presented in my book Computers, Pattern, Chaos, and Beauty. We can compute the exponent by
A = lim — y ^ In N-.00 N
^-^ n= 1
dx,n+\ AXn
X =/(A, beta).
where dx:„+i/dx:„ = A[-JC/?(1 +xy^~^ +(1 +x)~^] in this special case. You will find that for certain values of A and ji the map is chaotic with a positive exponent, while for others the map is periodic.
For Further Reading (1) Abraham, R., Shaw, C. (1985) Dynamics - The Geometry of Behavior, Part 3: Global Behavior. Aerial Press: California. (Actually, the entire book collection of Aerial Press, including the Visual Math Series, is an educational wonderland).
51 (2) Abraham, R., Shaw, C. (1983) Dynamics - The Geometry of Behavior, Part 2: Chaotic Behavior. Aerial Press: California. (3) Aronson, D., Chory, M., Hall, G. and McGehee, R. (1980) A discrete dynamical system with subtly wild behavior. In New Approaches to Nonlinear Problems in Dynamics, RJ. Holmes, ed. Society for Industry and Applied Mathematics. (4) Berge, R, Pomeau, Y., Vidal, C. (1984) Order Within Chaos, Wiley: New York. (5) Campbell, D., Crutchfield, J., Farmer, D., Jen, E. (1985) Experimental mathematics: the role of computation in nonlinear science. Communications of the ACM. 28: 374—389. (6) Crutchfield, J., Farmer, J., Packard, N. (1986) Chaos. Scientific American. 255: 46-57. (7) Chossat, P. and Golubitsky, M. (1988) Symmetry-increasing bifurcations of chaotic attractors. Physica D. 32, 4 2 3 ^ 2 6 . (8) R. Devaney (1989) An Introduction to Chaotic Dynamical Systems. Addison-Wesley. (9) Feigenbaum, M. (1979) The universal metric properties of nonlinear transformations. Journal of Statistical Physics. 21: 669-706. (10) Feigenbaum, M. (1981) Universal behavior in nonlinear systems. Los Alamos Science. 1: 4-27. (11) Gleick, J. (1987) Chaos: Making a New Science. Viking: New York. (12) Grebogi, C , Ott, E., and Yorke, J. (1985) Chaos, strange attractors, and fractal basin boundaries in nonlinear dynamics. Science 238: 632-637. (A great overview, with definitions of terms used in the chaos literature.) (13) Grebogi, C , Ott, E., and Yorke, J. (1985) Attractors on an N-Torus: quasiperiodicity versus chaos, Physica 15D: 354-373. (Contains some gorgeous diagrams of dynamical systems). (14) Hirsch, M. (1989) Chaos, rigor, and hype, Mathematical Intelligencer 11(3): 6-9. (Pages 8 and 9 include James Gleick's response to the article.) (15) Moon, F. (1987) Chaotic Vibrations. John Wiley and Sons, New York. (Moon gives many practical examples of chaos in real physical systems.) (16) Pickover, C. (1990) Computers, Pattern, Chaos and Beauty. St. Martin's Press: New York. (17) Stewart, I. (1989) Does God Play Dice? (The Mathematics of Chaos). Basil Blackwell: New York. (18) "Symmetries and Asymmetries" (1985) Mosaic Volume 16, Number 1, January/February. (An entire issue on the subject of fractals, symmetry and chaos. Mosaic is published six times a year as a source of information for scientific and educational communities served by the National Science Foundation, Washington DC 20550). (19) Shaw, A. (1984) The Dripping Faucet as a Model Chaotic System. Aerial Press: California.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
53 Chaos and Graphics
AUTOMATIC GENERATION OF STRANGE ATTRACTORS J. C. SPROTT
Department of Physics, University of Wisconsin, Madison, WI 53706 Abstract—A pair of coupled quadratic difference equations with randomly chosen coefficients is repeatedly iterated by computer to produce a two-dimensional map. The map is tested for stability and sensitivity to initial conditions. The process is repeated until a chaotic solution is found. In this way a computer can generate a large collection of strange attractors that are all different, and most of which have considerable aesthetic appeal. A simple computer program and examples of its output are provided. Many of the attractors have been systematically evaluated for visual appeal, and a correlation is found with the Lyapunov exponent and correlation dimension. 1. INTRODUCTION Art and music derive much of their aesthetic appeal from a juxtaposition of order and unpredictability. In recent years it has come to be widely understood that simple mathematical equations can have solutions that, over the long term, are for all practical purposes unpredictable. And yet the simplicity of the equations ensures that the unpredictability is accompanied by a degree of determinism and order. Such equations are said to exhibit chaos[l], and their solutions usually form a strange attractor[2]. A strange attractor is an example of a fractal [ 3 ], a geometrical object of noninteger dimension and structure on all size scales, although the structure in general is not self-similar. Strange attractors are thus powerful generators of new visual new art forms[4]. A single equation with different coefficients can produce an almost endless variety of strange attractors, most of which have considerable beauty. Even simple personal computers can easily generate these patterns. The difficulty is that no one knows how to predict the conditions under which chaos will result, and thus the same standard examples are generally exhibited. Whereas most previous work in the production of strange attractors starts with a system known to be chaotic, this paper proposes a way for a computer to search a large class of potentially chaotic equations for visually interesting solutions. The visual appeal of the resulting patterns is shown to correlate with mathematical quantities that characterize the attractors, suggesting that it might be possible to refine further the automatic selection of patterns with strong visual appeal. 2. TWO-DIMENSIONAL QUADRATIC MAPS For a system to exhibit chaos, the governing equations must be nonlinear. A quadratic equation is perhaps the simplest such example. However, a single equation in a single variable has solutions that lie along segments of a curve and thus tend to be rather uninteresting. The graph of a quadratic equation is a parabola. With a pair of equations involving two variables x and y, the solutions are more interesting and are well suited for display on a computer monitor or sheet of
paper. The simplest such example is the two-dimensional quadratic map given in its most general form by Xn+\ = fli + a2Xn + a^xl + a^Xnyn + asyn + a^yl y„+i = ay ~\- UgXn + agxl + awXnyn + «iiy« + anyl The character of the solution is determined by the values of the twelve coefficients fli through an and the initial values XQ and yo. With some initial value of XQ and y© at « = 0, successive values of X and y are determined by repeatedly iterating the above equations. The iterates are plotted as points on a two-dimensional surface. After a number of iterations, the solution will do one of four things: (a) It will converge to a single fixed point; (b) it will take on a succession of values that eventually repeat, producing a limit cycle; (c) it will be unstable and diverge to infinity; (d) it will exhibit chaos and gradually fill in some often complicated but bounded region of the x-y plane. The visually interesting solutions are the chaotic ones. Most of these solutions are strange attractors in that a range of starting values of x and y, within the basin of attraction, yield the same eventual solution. The first few iterates should be discarded, since they almost certainly lie off the attractor. Occasionally solutions are chaotic and visually appealing but are not attractors since each pair of initial values produces a different shape. The boundary of the basin of attraction of a strange attractor may itself be a fractal. 3. SENSITIVITY TO INITIAL CONDITIONS To search automatically for chaotic solutions, it is necessary to have a criterion for detecting chaos. One such criterion is the sensitivity to initial conditions. Imagine iterating the two-dimensional quadratic map described above with two initial conditions that differ by a small amount. If successive iterates approach a fixed point or limit cycle, the difference between the two solutions will on average grow smaller with each iteration. If the solution is unstable or chaotic, the difference will tend to grow larger with each iteration. Unstable solutions can be eliminated by discarding
Reprintedfrom Comput. & Graphics Vol. 17, No. 3, pag. 325-232, 1993
EAMTMNQQXUYGA
F = 1.27
L = 0.10
ECVQKGHQTPHTE
F =
1.79
w^^^^cr^"5L-^i-^''
^
j
^
L =
0.14
? ]':
^^9^^^^-"'-•^liJ'
(b) EFIRCDERRPVLD
37
L - 0.05
EGIIETPIQRRUL
F - 1.77
L - 0.12
EGXQSNSKEECTX
F =
1.
r>^ 1 Irs
(c) EGLXOESFTTPSV
F
^^(E
{IB
(f) EILIBVPKJWGRR
(h)
Fig. 1. Examples of strange attractors produced by two-dimensional iterated quadratic maps.
54
1.42
"^"^ -. %
-^i^
(g)
-
^.-y
r fa
L - 0.10
ELUFBBFISGJYS
F = 1.59
'^^^7M
•
EMCRBIPOPHTBN
F = 1.39
L - 0
F
L
^\i
/jr* ^
mi -t//
L - 0.18
//
(i)
(J)
EMDVAIDOYHYEA
EODGQCNXODNYA
- 1,31
- 0.07
. /^ /
V^" fll? J&^^^
7/7 /1 Pw|.
WAj / - / '-^^^S^^SBHIB^^
^^m ;S
^KJ'.^ •
\
JH^;-^' mK^/"'^
^jaig=^^' **^
¥/ (I) EUWACXDQIGKHF
EVBWNBDELYHUL
F = 1.47
i^^^Sk
*^^ :f"QP
'
W-iP^'feppn^fe
/^^ ^>l! fjh^-~~ -~
L =
F = 1.69
0.13
P^^
ZJlr^ | H ^ 7 >#
f^
^ijl (o)
(P) Fig. 1. (cont'd.)
55
L = O.IS
56
J. C. SPROTT
cases in which xory grow beyond some arbitrary large value such as 10^. The difference between the two solutions initially grows on average at an exponential rate for a chaotic system. The rate of divergence is characterized by the Lyapunov exponent [ 5 ], which can be thought of as the power of 2 by which the separation increases on average for each iteration. Thus, if the separation doubles with each iteration, the Lyapunov exponent is 1 bit per iteration. The Lyapunov exponent can be thought of as the rate at which information about the initial condition is lost, or, equivalently, the rate at which the accuracy of a prediction declines as one projects farther into the future. A two-dimensional map actually has two Lyapunov exponents, since a cluster of nearby initial points may expand in one direction and contract in another, stretching out like a cigar. The more positive one is the one that signifies chaos, and it is the one that dominates after a few iterations using the above procedure [6]. It has been conjectured [ 7 ] that the fractal dimension F is related to the two Lyapunov exponents through the relation
4. COMPUTER SEARCH PROCEDURE
The procedure for implementing a computer search for strange attractors is straightforward. Choose the 12 coefficients ai through an randomly over some interval, choose initial conditions XQ and yo, iterate the equations for the map while calculating the Lyapunov exponent and checking for divergence, and keep only those solutions that are bounded and have a positive Lyapunov exponent. A computer program"* that repetitively performs these operations is listed in the Appendix. It is written in a primitive version of BASIC so as to be widely accessible and easily understood. The program should run without modification under Microsoft BASICA, GW-BASIC, QBASIC, QuickBASIC, or Visual BASIC for DOS, Borland International Turbo BASIC, and Spectra Publishing PowerBASIC on IBM PC or compatibles. It assumes VGA (640 X 480 pixel) graphics. If the hardware or BASIC compiler do not support this graphics mode, change the SCREEN 12 command line 130 to a lower number (i.e., SCREEN 2 for CGA mode). A compiled BASIC and a computer with a math coprocessor are strongly recommended. The coefficients are chosen in increments of 0.1 over the range —1.2 to 1.2 (25 possible values) in line 320. F= 1 -LJL2 Smaller coefficients result in missing many chaotic solutions, and larger coefficients produce mostly unstable where Li is the more positive of the two exponents. solutions. The increment was chosen so that each atA further difficulty is that the two solutions even- tractor is visibly different and coefficients can be coded tually get far apart, on the order of the size of the at- into letters of the alphabet A through YiA = —\.2,B tractor, and the growth saturates. This problem can be = —1.1, etc.) for easy reference and replication. Thus remedied if after each iteration the points are moved each attractor is uniquely identified by a 12-letter name. back to their original separation along the direction of The number of possible cases is thus 25 ^^ or about 6 the separation. The Lyapunov exponent is then deter- X 10^^. Of these, approximately 1.6% are chaotic or mined by the average of the distance they must be about 10 '^ cases [ 8 ]. Viewing them all at a rate of one moved for each iteration in order to maintain a con- per second would require over 30 million years! Thus stant separation. If the two cases are separated by a it is very unlikely that any patterns produced by the distance d„ after the «th iteration and the separation program will ever have been seen before, and like after the next iteration isd„+i, the Lyapunov exponent snowflakes, nearly all of them are different. is determined from Initial conditions are set arbitrarily to x = y = 0.05 in line 310. Other small initial values produce the same L= i:\og2idn^i/d„)/N result for most cases as expected for an attractor. The Lyapunov exponent is calculated using an initial conwhere the sum is taken over all iterations from n = 0 dition in which x is increased by 10"^ (line 310). The to n = N — 1. After each iteration, the value of one of program performs 100 iterations before considering the iterates is changed to make d„+i = d„. For the cases the Lyapunov exponent (line 640). After 100 iterations, the program begins keeping track of the minihere, d„ is taken equal to 10"^. Calculation of the Lyapunov exponent is only one mum and maximum values ofx and y (lines 520-550) possible way to identify chaotic attractors. One could so that after 1000 iterations the screen can be cleared also visually inspect all the stable solutions or look for and resized to allow a 10% border around the attractor cases with non-integer fractal dimension. Visual in- (line 560). If 11,000 iterations are reached with a posspection is inefficient since only about 7% of the stable itive Lyapunov exponent and a bounded solution, the solutions of the two-dimensional quadratic maps are result is assumed to be a strange attractor (line 620). chaotic. Calculation of the fractal dimension is rela- The search immediately resumes after each attractor tively time-consuming, typically requiring several thousand iterations. The Lyapunov dimension calcu* An IBM DOS disk containing the BASIC source code in lation is very fast and reliable. The exponential growth the Appendix, an executable version of the code, and a more of the separation ensures that for most cases only a versatile menu-driven strange attractor program with 3-D few iterations are required to determine the sign of the glasses are available for $30 postpaidft-omthe author. Specify 3.5 or 5.25-inch disk. largest exponent.
Automatic generation of strange attractors is confirmed and continues until a key is pressed (line 650). The search procedure is surprisingly fast. On a 33 MHz 80486 computer running QuickBASIC 4.5, the program finds about 1200 strange attractors per hour. The listing in the Appendix only displays the attractors on the screen. A more versatile program would call a subroutine from line 620 to print the attractors, perhaps after user confirmation or evaluation, or would save the coded coefficients in a disk file for later analysis.
57
6. AESTHETIC EVALUATION
A collection of about 7500 such attractors was systematically examined by the author and seven volunteers, including two graduate art students, a former art history major, three physics graduate students, and a former mathematics major. All evaluators were born and raised in the United States. The evaluations were done by choosing attractors randomly from a collection of about 18,000 and displaying them sequentially on the computer screen without any indication of the quantities that characterize them. The volunteers were asked to evaluate each case on a scale of one to five 5. SAMPLE STRANGE ATTRACTORS Figure 1 shows samples of the shapes that arise from according to its aesthetic appeal. It only took a few the iteration of such two-dimensional quadratic maps. seconds for each evaluation. At the end of the session a graph similar to Fig. 2 These cases are all strange attractors and were selected for their beauty and diversity from a much larger col- was produced in which the average rating is displayed lection. However, they are by no means atypical, and using a gray scale on a plot in which the largest Lyathere are many others that would have served equally punov exponent (L) and correlation dimension (F) well. It is remarkable that such a diversity of shapes are the axes. The darkness of each box increases with comes from the same simple set of equations with only the average rating of those attractors whose values of L and F fall within the box. Figure 2 shows a summary different numerical values of the coefficients. The cases shown were produced on a laser printer of all the evaluations, although the cases examined by with 300 dots per inch resolution on an 8.5 X 11-inch the various individuals show a similar trend. In parpage after about 500,000 iterations. Of course, the pro- ticular, all evaluators tended to prefer attractors with gram needs modification to output the plots to a printer a dimension between about 1.1 and 1.5 and a Lyaat high resolution. However, satisfactory results can be punov exponent between zero and about 0.3. Some of obtained by any of the various utilities that allow one the most interesting cases have Lyapunov exponents below about 0.1. to print a screen image. The dimension preference is perhaps not surprising Also shown on eachfigureis the code name preceded by the letter E to denote a two-dimensional quadratic since many natural objects have dimensions in this map, the Lyapunov exponent L (in bits per iteration) range. The Lyapunov exponent preference is harder and the fractal dimension F. F is actually the corre- to understand, but it suggests that strongly chaotic syslation dimension[9] and is somewhat ill-defined be- tems are too unstructured to be appealing. For the 443 cause the dimension of a strange attractor varies some- cases that were rated five (best) by the evaluators, the what with scale. The dimension is taken here at a scale average correlation dimension was F = 1.30 ± 0.20, and the average Lyapunov exponent was L = 0.21 of about 1% of the largest diameter of the attractor. Normally, correlation dimension calculations are ±0.13 bits per iteration, where the errors represent very slow because they involve determining the spatial plus or minus one standard deviation. About 28% of separation between every pair of points that constitute the cases evaluated fall within the error bars. the attractor. A much faster technique that entails only a slight loss in accuracy was used here. The method requires that the coordinates of the last N iterates be retained. A value of A^ = 500 is generally sufficient. With each new iteration, one of the previous A/^ points is chosen randomly, and its separation from the new point is calculated. A count is kept of those cases for which the separation is less than each of two values, which differ by a factor of 10, and whose geometric mean is the size scale for which the dimension is to be calculated. If the respective counts are Ni (for the smaller value) anxi N2 (for the larger value), the correlation dimension is given by i^ = logio(iV2/iVi) With little computational penalty, the value of F can be updated whenever N\ or A^2 is incremented. The accuracy of the dimension estimate is of
Fig. 2. Results of evaluating 7500 strange attractors, showing that the most visually appealing cases are those with small Lyapunov exponents (L) and with correlation dimensions (F) somewhat greater than one.
58
J. C. SPROTT
I€M|R¥miS»)Qia§l»UIM«IU^»IRy(lll
luuuuzirraivvEraDLBNETxsyyxcxji
P = 1.99
L = 8.28
Fig. 3. Examples of strange attractors produced by three-dimensional iterated quadratic maps in which the color is determined by one of the variables. 7. SUGGESTIONS FOR FURTHER WORK
The method described above can be easily extended in a number of ways [ 10]. There is nothing special about two-dimensional quadratic maps, other than perhaps simplicity and consequent computational speed. There's an infinity of other nonlinear maps and flows. For example, Pickover has produced nice twodimensional sculptures using trigonometric maps [11]. It is straightforward to add cubic and higher order terms to the equations. More complicated nonlinearities do not significantly enhance the occurrence of chaotic solutions, but they do somewhat increase the variety of
patterns. The number of coefficients increases rapidly with the order of the polynomial, and the variety of cases becomes even larger. Having found a visually appealing attractor, one can make small variations of the coefficients to optimize even further its appearance. The attractors can be animated by producing a succession of frames, each with a slightly different value of one or more of the parameters. Adding a third dimension (x, y, and z) increases the number of coefficients to 30 for quadratic maps. It also raises interesting possibilities for new display
59
Automatic generation of strange attractors modes. The simplest case is to plot x and y, but to ignore z, which is equivalent to viewing the projection (or shadow) of the attractor on the x-y plane. Alternately, the attractor can be projected onto the x-z or y-z plane or rotated through an arbitrary angle. A gray scale can be used to represent the number of iterates that fall within a given rectangle on the screen [12]. Another possibility is to code the third dimension in color. Examples of three-dimensional quadratic maps using 16 colors are shown in Fig. 3. These figures were produced directly from VGA screen images using a color ink-jet printer. Some computer languages allow one to cycle through a variety of color palettes to find the most pleasing combination of colors or to produce a kind of animated color display. Modern versions of BASIC have such a PALETTE command. It is also possible to produce an anaglyph[13] in which each x-y value is plotted twice, once in red and once in cyan, displaced horizontally by a distance proportional to z so as to produce a three-dimensional monochrome image when viewed through red/blue glasses. Color three-dimensional images can be produced by plotting the two colored views side-by-side and either viewing them cross-eyed or through an inexpensive prism stereoscope.^ These techniques can also be applied to two- and even one-dimensional maps by using a previous value of one of the variables as the third variable. The attractors can be rotated to provide a view from the most pleasing angle or animated with successively rotated images. Chaotic maps can also be used to produce a crude kind of computer music. For a two-dimensional map, X might be used to control the pitch and y the duration of each note. The result is a not-displeasing though alien-sounding form of music that might appeal to those with exotic musical tastes. The method described above can also be applied to systems of nonlinear ordinary differential equations whose solutions are continuous flows rather than discrete maps. In such a case, chaos requires at least three equations and three variables. Differential equations can be solved approximately on a digital computer by reducing them to appropriate finite difference equations[14]. Long computing times are required for high accuracy, which fortunately is not essential in this application. Plots of the basin of attraction for strange attractors are sometimes very beautiful, especially when multiple nearby attractors compete and produce a fractal boundary. The popular Mandelbrot and Julia sets are basins of attraction. It is traditional to plot in different colors the number of iterations required for each unstable initial condition to reach some large value. Such plots require a large amount of computer time, however.
^ Stereoscopes and other 3-D supplies are available from Reel 3-D, P.O. Box 2368, Culver City, CA 90231.
Much more could be done with correlating the aesthetic appeal of the attractors with the various numerical quantities that characterize them. The Lyapunov exponent and correlation dimension are only two such quantities; there are infinitely many others[15]. One could determine if there are discernible differences between the preferences of scientists and artists. Preliminary indications suggest that complexity might appeal more to artists than to scientists, who tend to see beauty in simplicity. There may be discernible cultural differences. One could determine whether the results are the same for more complicated systems of equations and for different methods of displaying the results, such as color versus monochrome. If such correlations exist, then it should be possible to program the computer to be even more selective and to become a critic of its own art [16]. Like the infinite number of monkeys with an infinite number of typewriters who will eventually reproduce all the works of Shakespeare, so too the computer starting with random numbers might evolve into something of an artist with unparalleled stamina and productivity. Acknowledgments—Mary Lou Herman, Mark Johnston, Kathy Ley, Earle Scime, Matt Stoneking, Christopher Watts, and Debora Wood assisted with the evaluations. Cliff Pickover made a number of useful suggestions. I am indebted to George Rowlands for introducing me to chaos and fractals and to Edward Pope for assuring me that these patterns would be interesting to those whose artistic tastes are more refined than my own. REFERENCES
1. J. Gleick, Chaos: Making a New Science, Viking, New York (1987). 2. A. K. Dewdney, Probing the strange attractors of chaos, Sci.Am. 235,90-93(1976). 3. B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman, New York (1982). 4. H. O. Peitgen and P. H. Richter, The Beauty of Fractals: Images of Complex Dynamical Systems, Springer-Verlag, New York (1986). 5. H. G. Schuster, Deterministic Chaos, Springer-Verlag, New York (1984). 6. A. Wolf, J. B. Swift, H. L. Swinney, and J. A. Vastano, Determining Lyapunov exponents from a time series, Physica 16D, 285-317 (1985). 7. J. Kaplan and J. A. Yorke, Functional differential equations and the approximation of fixed points. Springer Lecture Notes in Mathematics 730, 228 (1978). 8. J. C. Sprott, How common is chaos? Phys. Lett. A 173, 21(1993). 9. P. Grassberger and I. Procaccia, Characterization of strange attractors, Phys. Rev. Lett. 50, 346-349 (1983). 10. J. C. Sprott, Strange Attractors: Creating Patterns in Chaos, M & T Books, San Mateo, CA (1993). W. C. Pickover, Million-point sculptures, Comp. Graph. Forum 10, 333 (1991). 12. C. Pickover, A note on rendering 3-D strange-attractors, Comp. & Graph. 12, 263 (1988). 13. J. C. Sprott, Simple programs produce 3D images, Comp. Phys. 6, 132(1992). 14. H. Gould and J. Tobochnik, An Introduction to Computer Simulation Methods, Addison-Wesley, Reading, MA (1988). 15. J. D. Farmer, E. Ott, and J. A. Yorke, The dimension of chaotic attractors, Physica 7D, 153 (1983). 16. H. W. Franke, Computer Graphics, Computer Art, Springer-Veriag, New York (1985).
60
J. C. SPROTT APPENDIX
110 DEFDBL A-Z: DIM A (12) 120 RANDOMIZE TIMER 130 SCREEN 12 140 GOSUB 300 150 GOSUB 400 160 GOSUB 500 170 GOSUB 600 180 ON T% GOTO 130, 140, 150 190 END
'Reseed random number generator 'Assume VGA graphics 'Set parameters 'Iterate equations 'Display results 'Test results
300 310 320 330 340 390
REM Set parameters X = .05: Y = .05: XE = X + .000001: YE = Y For 1% = 1 to 12: A(I%) = .1 * (INT(25 * RND) - 12): NEXT 1% T% = 3: LSUM = 0: N = 0 XMIN = 1000000#: XMAX = -XMIN: YMIN = XMIN: YMAX RETURN
400 410 420 430 490
REM Iterate equations XNEW = A(l) + X * (A(2) -f A(3) * X + A (4) * Y) + Y * (A(5) + A(6) * Y) YNEW = A(7) + X * (A(8) + A(9) * X + A(10) * Y) + Y * (A(l 1) + A(12) * Y) N= N + 1 RETURN
500 510 520 530 540 550 560 570 590
REM Display results IF N < 100 or N > 1000 THEN GOTO 560 IF X < XMIN THEN XMIN = X IF X > XMAX THEN XMAX = X IF Y < YMIN THEN YMIN = Y IF Y > YMAX THEN YMAX = Y IF N = 1000 THEN GOSUB 800 IF X > XL AND X < XH AND Y > YL AND Y < YH AND N > 1000 THEN PSET (X, Y) RETURN
600 610 620 630 640 650 660 690
REM Test results GOSUB 700 IF N > 11000 THEN T% = 2 IF ABS (XNEW) + ABS (YNEW) > 1000000# THEN T% IF N > 100 AND L < .005 THEN T% = 2 IF LEN(INKEY$) THEN T% = 0 X = XNEW: Y = YNEW RETURN
700 REM Calculate Lyapunov exponent 710 XSAVE = XNEW: YSAVE = YNEW: X = XE: Y = YE: N = N - 1 720 GOSUB 400
XMAX
'Calculate Lyapunov exponent 'Strange attractor found 'Unstable 'Limit cycle 'User key press
'Reiterate equations
730 DLX = XNEW - XSAVE: DLY = YNEW - YSAVE: DL2 = DLX * DLX + DLY • DLY 740 750 760 770 790
DF = 1000000000000# * DL2: RS - 1# / SQR (DF) XE = XSAVE + RS * (XNEW - XSAVE) : YE = YSAVE + RS * (YNEW - YSAVE) XNEW = XSAVE: YNEW - YSAVE LSUM = LSUM + LOG(DF) : L = .721347 • LSUM / N RETURN
800 810 820 830 840 850 890
REM Resize the screen (and discard the first thousand iterates) DX = .1 • (XMAX - XMIN) : DY = .1 * (YMAX - YMIN) XL = XMIN - DX: XH = XMAX + DX: YL = YMIN - DY: YH = YMAX + DY IF XH - XL < .000001 OR YH - YL < .000001 THEN GOTO 890 WINDOW (XL, YL) - (XH, YH) : CLS LINE (XL, YL) - (XH, YH), , B RETURN
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
61
Chaos & Graphics
ATTRACTORS WITH DUELING SYMMETRY C L I F F O R D A. REITER Department of Mathematics, Lafayette College, Easton, PA 18042, U.S.A. e-wa//:
[email protected] Abstract—Two functions of the plane having distinct symmetries are intertwined using a sinew function to create a function of three variables having different symmetries in different regions of space. The attractor resulting from the iteration of this function can be visualized using a nonlinear semi-inverted projection to the plane. This projection makes the dueling symmetries of the attractor apparent. Schemes similar to genetic algorithms can be used to search parameter space for interesting examples of attractors with these dueling symmetries. © 1997 Elsevier Science Ltd
1. INTRODUCTION
Attractors arising frona the iteration of functions in the plane that are designed to have symmetry have been the subject of recent study [1]. These attractors can be forced to have n-fold rotational symmetry and reflections can be forced or avoided. Examples of attractors with forced symmetry in three and higher dimensions have also been constructed [2, 3]. This note describes the creation of attractors in three space that are forced to have different symmetries in different regions. These attractors are then projected to the plane using a semi-inverted central projection that results in placing the attractor inside an annulus where one edge of the attractor has one symmetry type and the other edge has a different symmetry type. When an object is preserved under an nth of a turn rotation about its center it is said to have cyclic symmetry of order n and its group of symmetries is denoted by C„. If it also has the symmetry of a reflection across a line through the center then it has dihedral symmetry and its symmetry group is denoted D„. Numerous examples of these symmetries occur in nature: a starfish has Ds symmetry, and a snowflake has De symmetry. Discussion of the symmetry of natural objects can be found in many places; for further examples see [4-6]. Human designs with delightful symmetries abound and even pervade modern logo's and hubcaps [7]. Examples of these artifacts with the kind of duehng symmetry described here are less common but certainly appear. The New York City subway token has an inner D^ symmetry and an outer circular symmetry that is infinitely smooth. Hubcaps are also a rich source of examples of this dueling symmetry. Figure 1 shows a hubcap with Cg outer symmetry and D^ inner symmetry. A walk through a parking lot will yield vast combinations of inner and outer symmetries among hubcaps. The next section deals with the functions used to create attractors with symmetry in the plane. We then turn to a discussion of our construction of attractors with dueling symmetry.
2. SYMMETRIC ATTRACTORS
A function f is said to be equivariant with respect to a group of symmetries H if for all (T£H, f(o-(x)) = (T(f(x)). For example, if H— C„, then G^H means that a is a rotation and f is d-equivariant implies that the iterates of the rotation of a point are the same as the rotation of the iterates of the point. This means that the attractor associated with f tends to have the desired symmetries though it may be that the attractor has only the symmetry given by an admissible subgroup of symmetries [8, 9] or it may have the desired symmetry only in a trivial manner. Thus, even after identifying the appropriate equivariant functions one still needs to do some work to find interesting examples. The theory of which functions are equivariant with respect to C„ and D„ is well developed. For example, from [1] we know that the polynomial functions that are equivariant with respect to D„ are of the form f(z) = Vx(u{z), v[z))z -h ViHz), v(z))z"-i where u{z) — z'z, v(z) = Re{z^), and pi(w,v) and P2(w,v) are arbitrary 2-variable real polynomials. In that construction f is a polynomial in the two variables jc and y which are the real and imaginary parts of the complex number z = x-^iy. The general form for the polynomial function pi is Pi(w, v) = J2ii=o...N^'j^'^ and hence the polynomial can be identified with its matrix of coefficients («y). It is also known that the polynomials equivariant with respect to C„ have the same form but the matrix coefficients are allowed to be complex. The traditional function type to use for creating examples of attractors with symmetry in the plane are f (z) = (>l -h azz -h PReiz") -f- wi)z + yT'K That is, pi (M, V) = >l + CO/ + aw + Pv and p2(w, v) = y. In matrix notation, these are identified with the special 2 by 2 and 1 by 1 matrices
and
(y). As we will see, in our work with duehng attractors we often found it more useful work with 3 by 3 and 2 by 2 matrices of coefficients.
Reprinted from Comput. & Graphics Vol 21, No. 2, pag. 263-271, 1993
62
C. A. Reiter
Fig. 1. A hubcap with Cg outer symmetry and D5 inner symmetry.
Figure 2 shows an example of an attractor in the plane with Cs symmetry and Fig. 3 shows an example of an attractor with D^ symmetry. Notice the five pinwheel arms on the outer edge in Fig. 2 and the eight bean shapes on the outer edge of Fig. 3. In each image the frequency with which each pixel is visited is recorded with color. In these figures and some subsequent ones we use red to designate the low frequency regions; moving through hues corresponds to increasing frequency with magenta being used for the highest frequency regions. The attractors shown in these figures, like all our attractors, result from 200 million iterations of the functions. The parameters used to create these images are given in Appendix A.
3. DUELING SYMMETRY
Our construction of dueling attractors utilizes two functions with symmetry in the plane intertwined and connected via a function of a single real variable that is used connect the parts of the attractor driven by each of the two functions. This function is the sinew function WL(/) = /(I - L{\ - fi)^). The value of L so that w^(0 repeatedly maps [—1,1] onto itself is L = i ^ ^ ^ i ^ ^ « 4.957474795414. This sinew function is designed so that when / is near — 1 or 1, iteration o^^jjj) will include long sequences near that endpoint but in the long term it moves around the interval [—1,1]. Figure 4 shows a plot of W/^(/) for L = 4.957 which is the value for L that we used for our calculations. This choice for a value of L slightly
Fig. 2. An attractor in the plane with C5 symmetry.
Attractors with dueling symmetry
63
Fig. 3. An attractor in the plane with D^ symmetry.
to three space. In particular, suppose we denote a point in three space given by (x,y) and t. For convenience we assume that the {x,y) points of attractor have been seminormalized. That is, the coordinates have been rescaled to lie between —1 and 1. Our choice of WiXt) automatically provides this seminormaUzation for t. When ^ = 1, we want the projection to move the unit disk into the space between the nested disks with radii 2 and 3. If we let V = {x,y) and w = TT^, then we move v into the desired space by using 2w + v. When t= —I, we want the projection to move the unit disk into the space between the nested disks with radii 1 and 2. In this case, we move v into the desired space by using 2M —V. Notice the minus sign causes a reversal of direction that along with the translation by 2u gives a kind of inversion. When / is in between — 1 and 1, we take the corresponding combination, that is, 2u +1 v. Of course, this projection is discontinuous at the V V^4.957(0 / origin but this is Uttle problem as we expect a Notice that when t remains near 1, then fi(/) repelling fixed point at the origin for interesting dominates the z update and when / remains near — 1, attractors. Figure 5 shows the result of projecting the then f2(0 dominates the z update. We may imagine attractor shown in Fig. 2 as though it corresponded the attractor as fitting inside a *can' shaped region in to / = 1 overlaid with the result of projecting the space where the / coordinate corresponds to the attractor shown in Fig. 3 as though it corresponded direction of the central axis of the can. Thus, to ^= — 1. Notice the five 'arms' from Fig. 2 are still iteration of this function is designed to move points visible as are the eight 'beans' of Fig. 3, but the back and forth between the ends of the can, but the attractor has been inverted so the beans appear on symmetry of the attractor ought to be driven by the the inner edge. Of course, detail is lost as the images symmetry of fi(z) at one end of the can and by the are compressed into a much smaller area. symmetry of fiCz) at the other end of the can. Figure 6 shows the actual dueling attractor that This attractor is then projected using a semi- connects the two attractors from Figs 2 and 3 via the inverted central projection. This projection is one sinew function. Its limiting behaviors are given by dimension lower than the projection used in [3] for Fig. 5 but unlike Fig. 5 which is a composite of the projecting attractors with the symmetry of the 4-cube projection of two 2-D attractors, this figure is the
below the extreme was made so that less time is spent near the endpoints so that in the long term there is more balance between limiting and intermediate behavior. Iteration beginning with the point 0.2 is also shown in Fig. 4. After 8 iterations the point falls very near 1; after an additional 12 iterations the points of iteration are just visible emerging from near 1. Our attractors in three space are constructed by iterating a map from R^ to R^. It is convenient to identify the three coordinates as the real and imaginary parts of a complex coordinate, z, along with a real coordinate, /. Let fi{z) and f2(z) denote functions in the complex plane which are equivariant with respect to presumably different symmetry groups. We compute new z and t values via:
64
C. A. Reiter
Fig. 4. The sinew function and some of its iterates.
projection of a single 3-D attractor. Notice that this projection of the attractor has the desired C5 outer symmetry and Dg inner symmetry. The five arms and eight beans are still visible but the connective parts of the attractor fill in vast regions between (compare to Fig. 5) and slightly disturb the inner and outer symmetry. Notice that the yellow connective parts of the attractor do seem to connect the high frequency regions of the inner and outer symmetries; however, since those symmetries are not compatible, the connections are not symmetric. Figure 7 shows a dueling attractor with Ci 1 outer symmetry and D5 inner symmetry. Notice the connections seem to have close to C5 symmetry. Figures 8 and 9 are examples where the inner and outer symmetries are partially compatible. For variety, in these figures magenta is used for the low frequency regions and as the frequency increases the hue decreases; red is used for the highest frequency regions. The attractor used to create Fig. 8 has C2 outer symmetry and Ce inner symmetry. Since 2
divides 6 an object having Ce symmetry also has C2 symmetry; hence, the result retains the C2 symmetry throughout. The attractor used to create Fig. 9 has C3 outer symmetry and D^ inner symmetry. Since an object with D3 symmetry also has C3 symmetry, the resulting dueling attractor retains the C3 symmetry throughout. The parameters used for our illustrations were located using an ad hoc process which shares several features with genetic algorithms [10] though it is also distinctly different from classical genetic algorithms. First, random choices of coefficients of 2-D attractors were made and attractors that were plausible were saved. Plausibility required iteration of the function remaining finite for tens of thousands of iterations and an image of the 2-D attractor had to avoid the origin and have a nontrivial number of pixels lit. Once an initial population of plausible attractors is estabUshed the attractors can be mated by taking the parameters for the outer symmetry from one member of the population and taking the
Attractors with dueling symmetry
65
' ^ - ^ ^ ^ Fig. 5. A semi-inverted projection of the two 2-D attractors from Figures 2 and 3.
parameters for the inner symmetry from another. The resulting attractor might not be plausible, but the probability that it will be is far greater than for a random choice of parameters. Mutations were implemented by randomly varying one real or complex parameter ±1 unit, then observing whether the attractor remained plausible, and halving or doubling the variation until a maximal motion that remained plausible was determined. We attempted to
automate a measure of fitness by using box counting to estimate the fractal dimension of the image; this was to some extent successful, but in practice we tended to prune our population by selecting those with visually interesting attractors because we couldn't resist intervening in the selection process. Nonetheless, the mating and mutation aspects of these computations were important. Most of the examples in this note resulted from mating two
Fig. 6. The dueling attractor using the same limiting functions as Figures 2 and 3.
66
C. A. Reiter
Fig. 7. A dueling attractor with Cn outer symmetry and Ds inner symmetry.
attractors created independently and while most of the mutations were modest variants of their predecessors, some of the mutations were vastly superior. Figures 10 and 11, like Figs 6 and 7, have no compatible symmetry. Figure 10 shows an attractor with Cs outer symmetry and C4 inner symmetry. Notice, however, that the inner symmetry is very close to dihedral and the visible red connections seem to almost retain some C4 symmetry. In these figures yellow is used for the low frequency regions and as the
frequency increases the hue decreases (wrapping around); green is used for the highest frequency regions. Figure 11 shows an attractor with outer C5 symmetry and inner D2 symmetry. Notice the total lack of symmetry in the connective part of the attractor. Also notice that the outer symmetries in these attractors is given by the same attractor. Hence this is an example of two dueling attractors that share half their parameters (genes). These resulted from a common ancestor mating with different attractors from the population of plausible attractors.
Fig. 8. A dueling attractor with C2 outer symmetry and Cf, inner symmetry.
Attractors with dueling symmetry
67
Fig. 9. A dueling attractor with C3 outer symmetry and D^ inner symmetry.
While it is notoriously difficult to prove results about the chaotic behavior of attractors, we can investigate this experimentally via the Ljapunov exponents [11, 12]. Table 1 shows the Ljapunov exponents for the dueUng attractors shown in our images. Each of these has positive Ljapunov exponents which are associated with chaotic behavior. Also notice that all of these attractors share a Ljapunov exponent of 0.33 since they all
share the sinew function and its behavior is unaffected by the behavior of the other coordinates. 4. CONCLUSIONS
Attractors in three space with different symmetries in different regions can be created using two functions of the plane and connecting them with a sinew function that is designed to spend time near
Fig. 10. A dueling attractor with C5 outer symmetry and C4 inner symmetry.
68
C. A. Reiter
Fig. 11. A dueling attractor with Cs outer symmetry and D2 inner symmetry.
each region but to move back and forth between them. The attractor can be projected from three dimensions in a meaningful way using a semiinverted central projection. Interesting examples can be constructed using simple automatic measures of whether the attractor is plausibly interesting. The population of plausible attractors can be pruned to include the most appeahng attractors. Genetic algorithm like procedures can mate and mutate these attractors and yield a more diverse population of interesting attractors for further selection and regeneration.
Acknowledgements—The work of Gabriel Brisson providing a foundation for the development of code to generate the images is appreciated. Conversations Thomas Yuster regarding potential sinew functions most helpful.
[13] used with were
REFERENCES 1. Field, M. and Golubitsky, M., Symmetry in Chaos. Oxford University Press, New York, 1992. 2. Brisson, G., Gartz, K., McCune, B., O'Brien, K., Reiter, C. Symmetric attractors in three-dimensional space. Chaos, Solitons and Fractals, 7, 1996, 1033-1051.
Table 1. Ljapunov exponents of the dueling attractors. Figure 6 7 8 9 10 11
h
^2
^2
0.33 0.33 0.39 0.33 0.33 0.33
0.28 0.19 0.33 0.19 0.17 0.30
-0.48 -0.43 -0.38 -0.39 -0.32 -0.11
3. Reiter, C , Attractors with the symmetry of the «-cube, to appear in Experimental Mathematics. 4. Stewart, I. and Golubitsky, M., Fearful Symmetry. Blackwell Publishers, Cambridge, Massachusetts, 1992. 5. Thompson, D. W., Growth and Form, 2nd edn. Cambridge University Press, Cambridge, 1963. 6. Weyl, H., Symmetry. Princeton University Press, Princeton, 1952. 7. Gallian, J. A. Symmetry in logos and hubcaps. American Mathematical Monthly. 97, 1990, 235-238. 8. Ashwin, P., Melbourne, I. Symmetry groups of attractors. Archive for Rational Mechanics and Analysis, 126, 1994, 59-78. 9. Melbourne, I., Dellnitz, M., Golubitsky, M. The structure of symmetric attractors. Archive for Rational Mechanics and Analysis, 123, 1993, 75-98. 10. Mitchell, M. Genetic algorithms: an overview. Complexity, 1, 1995, 31-39. 11. Peitgen, H.-O., Jurgens, H. and Saupe, D., Chaos and Fractals. Springer-Verlag, New York, 1992. 12. Parker, T. and Chua, L., Practical Numerical Algorithms for Chaotic Systems. Springer-Verlag, New York, 1989. 13. Brisson, G. and Reiter, C , Parallel Processing in J. Vector, 13, 1996, 86-95.
APPENDIX A5. PARAMETER VALUES FOR THE IMAGES Each table row contains the information giving an equivariant function in the plane. In the first column is the integer n which specifies the rotation in the C„ or D„ symmetry; the second to fourth and fifth and sixth columns contain matrices that give the coefficients of PI(M,V) and P2(M,V), respectively. Recall the symmetry is dihedral when the coefficients are real and cyclic when the coefficients are complex. The groups of rows are paired: the first gives the parameters for the outer symmetry and the second gives the parameters for the inner symmetry. Table 2 shows the parameters used for Figs 2, 3, 5 and 6; Table 3 gives the parameters used for Fig. 7; Table 4 shows the parameters used for Fig. 8; Table 5 shows the parameters used for Fig. 9; Table 6 gives the parameters used for Fig. 10; and Table 7 gives the parameters used for Fig. 11.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
69 Chaos and Graphics
A NEW FEATURE IN HENON'S MAP M. MiCHELiTSCH and O. E. ROSSLER
Institute for Physical and Theoretical Chemistry, University of Tubingen, 7400 Tubingen, West Germany Abstract—An apparently new type of transients of high and varying periodicity is found for low-period point attractors in Henon's diffeomorphism. INTRODUCTION
DISCUSSION
Henon's map[l ] is one of the simplest 2-dimensional invertible maps—an explicit 2-dimensional taffypuller, so to speak. While many results about this map, including computer-graphical pictures are known[2], apparently still previously unknown types of behavior can be discovered. In the following we present a candidate for such a feature.
In a discrete invertible system, Henon's[2] map, we have described an apparently new type of transient. A similar shape may be expected to be found for basin boundaries separating different point attractors in this map. The new transients remind one of a "foliation" of phase space. In the limit of arbitrarily high transient periods—if such a thing should occur—indeed a socalled Reeb foliation in the sense of topology [3] would be obtained. The closest pictures we have seen to those reported above were found in the Poincare cross section through a periodically forced oscillator, Duffing's equation, by Pezeshki and Dowell[4] (see their plate XV and Figs. 17, 18). We expect further numerical and analytical investigations to be justified.
RESULTS
Using the technique of plotting the escape times from a repellor in different colors[l ], the picture of Fig. 1 was obtained in a certain region of parameter space. Fig. 2 shows a blow-up of the left-hand "eye" in Fig. 1. The colors match those of Jupiter's "red spot" by happenstance only. However, we do not know yet why the shape is also similar. Fig. 3 was obtained in a different way. It shows the Acknowledgements—We thank A. Murle and W. Metzler for evolution in time of a single initial point (the origin). kindly sharing with us their computer programs, as well as One of the two parameters was slightly changed to turn for stimulating discussions. the former repellor into an attractor (an explicit reversal of the map's equation would also have been possible REFERENCES M. Henon and Y. Pomeau, Lecture Notes in Math, instead). Obviously the "same" features as seen in Fig. Springer-Verlag, New York (1976). 1 show up again. One sees a period-7 transient that H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, "turns about" many times before reaching the attractor. Springer Verlag, New York (1986). For the sake of comparison, Fig. 4 shows a very C. Ehresmann and G. Reeb, Sur les champs d'elements de contact de dimension p completement integrables dans similar picture obtained in a different region of paramune variete continuement integrable. C. R. Acad. Sci. eter space. Again, there is this "turning about" of a Paris 21S, 955-957 (1944). high-period transient. For example, the periods 83 and C. Pezeshki and E. R. Dowell, On chaos and fractal be118 are easy to determine from the picture. Much havior in a generalized Duffing system. Physica 32 D, higher periods may be lurking in the light portions. 194-209(1988).
Reprintedfrom Comput. & Graphics Vol. 13, No. 2, pag. 263-275, 1989
70
M. MiCHELITSCH and O. E. ROSSLER
Fig. 1 Computer scan of initial conditions in Henon's map, x„^, = \-^y„- axl y„^, = bx„. Parameters: ^u" uu ?"^ ^ = l-?^' ^^>s: X from - 5 to 5, y from - 6 to 7. Maximal iteration number: 450; explosion threshhold value: x^-^ y'= 450. Points for which these values reach the threshhold were plotted in black others in color depending on the number of iterations reached until the explosion value was exceeded
Fig. 2. A subregion of Fig. 1, in different colors. Axis x from 0 to 3.5, ;; from - 4 to -0.01.
A new feature in Henon's map
71
Fig. 3. Evolution of an initial point (x = 0, y = 0), over 20000 iteration steps. Parameters: a- 0.2 and b = 0.9991. Axis: x from -4.5 to 4.2, y from - 5 to 5. Fig. 4. Evolution of an initial point (x = 0, y = 0) at a completely different set of parameter values, a = 0.2, b - -0.9999. Axis: X from -1.2 to 0.1, y from -1.3 to 0.3.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
73 Chaos and Graphics
LYAPUNOV EXPONENTS OF THE LOGISTIC MAP WITH PERIODIC FORCING MARIO MARKUS' and BENNO HESS
Max-Planck-Institut fiir Emahrungsphysiologie, Rheinlanddamm 201, D-4600 Dortmund I, FRG Abstract—The iterative map x„+i = r„x„ (1 - jc„) is investigated with r„ changing periodically between two values A and B. Different periodicities are assumed, e.g., {r„} = {BABA ...} or {r„} = {BBABA BBABA ...}. The Lyapunov exponent (a measure of average stability) is displayed with high resolution on the A5-plane. The resulting images have aesthetically appealing self-similar structures. Furthermore, these images allow with one glimpse the identification of a number of system properties: coexistence of attractors, superstable curves, order by alternation of chaotic processes, and chaos by periodic resetting from a stable into an unstablefixedpoint. INTRODUCTION
METHOD
A number of natural phenomena can be described by one-dimensional maps of the kind Xn+\ -f(x„),nI, 2, 3, . . . , where/: [a, b] -^ [a, b] with/(a) = / ( 6 ) = a and with one parabolic maximum in[a, b]. Examples of such maps are found in oscillations of the enzymatic sugar breakdown [ I ], the Belousov-Zhabotinskii reaction [ 2 ], snail neurons [ 3 ], as well as epidemics and animal populations (see [4-6]). It can be shown that maps with the properties of / are topologically conjugated with the logistic map x„+i = rx„(l - Xn) and thus exhibit qualitatively the same dynamic features (see [7] and references therein). The bifurcation parameter r, which describes the ambient conditions of the system and is held constant in previous investigations[6, 8], is changed periodically in the present work. We thus write r„ instead of r. For the sake of simplicity and easy graphical representation, we make a dichotomic hypothesis: r„ may assume only two values A and B. We investigate the dynamics of the map as a function of A and B for different sequences {r„}, namely: {BABABA }, {BBABA BBABA }, {BBABABA BBABABA }, {B^A^ B^A^ }, {B^A^ B^A^ [A^^B A'"B } and {A^'B A^'B . .}• We encourage the reader to try out other sequences of r„, as well as other intervals of ^4 and B as those appearing in this paper. We emphasize that in contrast to most graphical representations of dynamical systems, our plane is defined by bifurcation parameters and not by phase variables. Thus, in our display the points do not wander on the plane as the dynamic process goes on. Instead, the dynamic process is calculated here at each point {A, B) on the plane and the Lyapunov exponent[9] is calculated as a time average over the iteration process. The Lyapunov exponent quantifies the average stability of the resulting oscillatory modes, which may be periodic or chaotic. For instructive discussions on chaos see [6, 8-10] and references cited there.
For each parameter pair {A, B) we calculated the Lyapunov exponent
' To whom correspondence should be addressed.
X = lim -- 2 log2
dx„. dXn
(I)
where dx„^i/dx„ = r„- 2r„Xn in our special case. We use double-precision arithmetics. Since the approach to the limes in Eq. (1) is highly irregular, a reliable convergence criterium could not be found. However, a constant iV = 4 X 10-^ all over the plane yielded satisfactory results. In order to allow transients to die away, 600 iterations were performed before Eq. (I) was applied. The logarithmic function was tabulated as an array in order to reduce computing time. This array consisted of y = 5000 values with equidistant arguments in the interval ]0, 4 ] . For storage and addressing, the array indices were determined after real multiplication of the arguments with 7/4 and subsequent rounding to the next integer. The results were displayed with a maximum resolution of 1280 X 1024 pixels and 8 bit per pixel for grey shading and colouring. Each pixel in the graphical displays corresponds to one (A, B)-pair, and the grey shading (or colouring) at each pixel indicates the values of X for that pair. In general, chaos is characterized by X > 0 and periodicity (order) by X < 0. In Figs. 1 and 2 a colour discontinuity is used to mark the transition between order and chaos. In Fig. 1 (resp. Fig. 2) the colour changes from black to yellow as X changes from -oo to zero, and from black to red (resp. blue) as X changes from zero to its maximum value. Grey shadings instead of colours are used in Figs. 3 to 7. In Figs. 3 to 5, the shading changes from black to white as X changes from - x to zero, and all pixels with X > 0 are black. Analogously to the colour pictures, a shading discontinuity is used in these figures to visualize drastically the transition from order to chaos. In contrast. Figs. 6 and 7 do not show such a discontinuity: grey levels change from black to white as X grows from — oo to zero, and they change smoothly
Reprintedfrom Comput. & Graphics Vol. 13, No. 4, pag. 553-558, 1989
74
MARIO MARKUS and BENNO HESS
back from white to black as X grows from zero to its maximum value. In contrast to Figs. 3 to 5, the distribution of shadings in Figs. 6 and 7 permits to visualize structures not only in the periodic but also in the chaotic regions. For an optimal representation of a rectangular section whose edges are not parallel to the A- and 5-axes, we rotated the coordinates in Fig. 7. CONCLUSIONS
Because of the impossibility to obtain analytical solutions, the features of nonlinear dynamic systems are usually found either by numerical searching procedures, or by chance. In contrast, we present here a graphical method that permits a straightforward identification of system features by a simple glimpse over the plane. In all pictures of this paper, the mostly lighter regions in the foregrounds correspond to periodicity (X < 0), while the picture backgrounds correspond to chaos (X > 0). Within the periodic regions, one readily identifies the (dark) superstable curves (X -*- - o o ) . At some points, a crossing of one or more of these curves is detected. Fig. I clearly shows the self-similar structure of the patterns: a ''swallows-shaped motif appears over and over at smaller and smaller scales. The patterns clearly differ both in shape and in meaning from other wellknown self-similar structures[9, 11, 12]. Another system property, which is revealed by Fig. I, is the coexistence of two attractors, as indicated by the crossing of two branches (around A = B = 3.85). Coexistence means that different attractors exist in the [0, 1]-interval for the same values of the control parameters A and By depending on the initial condition ^o- At the crossing, one branch covers the other. The branch above is visible here in the coexistence region because it is the one which is reached with our particular initial value Xo = 0.5. The branch below becomes visible for other initial values. Nevertheless, the branch below is detected here because of the visibility of its continuations into regions where only one attractor exists. Thus, our overall representation on the A-B-plane permits us to show the existence of attractors which are not reached with our particular choice of.Xo. Furthermore, this graphical technique permits us to determine the number of coexisting attractors in a simple way, namely by counting the number of crossing branches: e.g., two branches in Fig. 1, three branches slightly to the right of the center of Fig. 3, five branches at the center of the right margin of Fig. 3, and seven branches close to the center of the right margin of Fig. 2. In our investigations on oscillatory glycolysis we found up to four coexisting attractors [ 13 ] using tedious searching procedures. Fig. 1 allows the visualization of another remarkable feature, namely the generation of order by alternating values of .4 and B, each of which generates chaos if taken alone. This type of cross talk can be seen at the upper right of Figs, la and lb, namely on the periodic (yellow) branch at the right of the branch-overlapping
coexistence region. Here, there are pairs (A, B) such that the map with alternating A and B is periodic, although the maps with r„ = A = const and with r„ = B = const (which both correspond to points on the diagonal of Fig. 1) lead to chaos. (A typical example is given by A = 3.85232, B = 3.84971.) Figs. 2 to 7 illustrate the richness of structures obtained by varying the periodicity of r„. In particular. Figs. 5 and 6 show the effect of periodic interruptions by 5 in a sequence of A's, i.e., {r„} = [A '^B .•{''B...]. In Fig. 5, ^' = 21. With the help of our graphical display, we discovered in this case chaotic behaviour (black ''horn" pointing downwards and towards the right of Fig. 5) at values of ^ and B well below the commonly known threshold for chaos at constant r„, which is TQ = 3.5699 . . . . Chaos appears here, e.g., 2iX A = 3.34 and J5 = 1.199. This "early chaos" is explained as follows. The parameter A alone leads to a stable oscillation between two values x~ and A"^, while B drives the system periodically from this stable regime into the vicinity of the coexisting unstable fixed point .v* = 1 - \ /A. In fact, X* ^ Bx~{ 1 - . v " ) . The contributions to X which make X positive occur while the system moves away from A* towards A" and x^. Similar processes as in Fig. 5 but for ^' = 12 and higher values of B are visualized in Fig. 6. Summarizing, we can say that the graphical representation described in the present work allows the identification or discovery of complex dynamic properties by simple visual inspection of a two-dimensional parameter space. Changes of parameter periodicities and areas of display lead to a never ending cascade of surprisingly structured domains. Acknowledgements—We thank Prof Miguel Kiwi and Prof Jaime Rossler for fruitful suggestions. Also, we thank Mrs. Gesine Schulte for the photographic work. We gratefully acknowledge thefinancialsupport of the Stiftung Volkswagenwerk. REFERENCES
1. M. Markus, D. Kuschmitz and B. Hess, Properties of strange attractors in yeast glycolysis. Biophysical Chen^/5/r>'22, 95-105(1985). 2. J.-C. Roux, R. H. Simoyi and H. L. Swinney, Observation of a strange attractor. Physica 8D, 257-266 (1983). 3. H. Hayashi, S. Ishizuka, M. Ohta and K. Hirakawa, Chaotic behaviour in the 'onchidium' giant neuron under sinusoidal stimulation. Phys. Lett. 88A, 435-438 (1982). 4. W. E. Ricker, Stock and recruitment. / Fish. Res. Board Canada 11,559-623(1954). 5. W. M. Schaffer, Can nonlinear dynamics elucidate mechanisms in ecology and epidemiology? IMA J. of Math. Applied in Med and Biol. 2, 221-252 (1985). 6. R. M. May, Simple mathematical models with very complicated dynamics. Nature 261, 459-467 (1976). 7. S. J. Chang, M. Wortis and J. A. Wright, Iterative properties of a one-dimensional quartic map: Critical lines and tricritical behaviour. Phys. Rev. A24, 2669 (1981). 8. P. Collet and J. P. Eckmann. Iterated Maps on the Interval as Dynamical Systems, Birkhauser. Boston (1980). 9. H. G. Schuster. Deterministic Chaos. Physik-Verlag. Weinheim(1984). 10. C A. Pickover, Mathematics and beauty: Time-discrete phase planes associated with the cvclic system. {.x{t) = -/(y(0). v(/) =fixit))\. Comp. & Graphics. 11(2),
75
Lyapunov exponents of the logistic map
(a)
(b)
Fig. 1. Lyapunov exponent (indicated by different colours) for the parameter sequence {r„} = {BABABA . . . } . Abscissas: B, ordinates: y4. (a): 3.817 < ^ , ^ < 3.868, with "swallow"-shaped periodic domain (yellow); (b): enlargement of a section of (a), 3.836
- :-:
'SA'
- '• -;"'v~^^
' >. • V ^ S v ' ^ •-•.
'
. - < • ;
.1.'.'
.;^^i^" X"^-' -.;i'-^,',!''•';•'^;, [-y^ / ' . #^ %fei&i^
(a)
Fig. 2. Flow and Poincare cross-section of the probably simplest strange attractor of a three-dimensional ODE X = ~y - z, y = a - az^ - by, z = X (cf [19]). Parameters: a = 0.27675, b = 0.2 (for technical details, see Table 3 in Appendix), (a) Projection of the three-dimensional flow of the ODE. The trajectory is dotted for a better visibility of the position of the cross-section at the left side, (b) Poincare cross-section of the flow of (a) at z = -0.15, revealing the typical Cantor set structure found in chaotic flows, (c) Closeup of the Poincare cross-section of (b). Note that the Cantor set structure seen is closely related to the striped structure found in the Henon map [eq. (8)].
Fractality in nature
81
Fig. 3. Boundary lines of the complex quadratic map [eq. (2)] (for technical details, see Tables 1 and 2 in Appendix), (a) Mandelbrot set in parameter space as the collection of all nonexploding orbits, (b) A fiUedin Julia set, corresponding to the attractive orbit of period 11.
"critical points" with locally infinite contraction which are essential in generating the corresponding fractal sets. In addition, these maps are noninvertible in contrast to Poincare maps. To link the "bottom-up" and the "top-down" line of inquiry, it is essential to acknowledge that there exists a gap between the "artificial fractals" generated by complex analytic mappings, at the one end, and the "natural fractals" generated by physical models, on the other end. Closing the gap would mean that it should become possible to find Julia set-like, self-similar structures, and nowhere difFerentiable boundaries in nonanalytic invertible maps and, furthermore, in continuous systems. A first encouraging sign comes
from studies on «-dimensional real invertible maps. Even though the basin boundaries found therein are comparably smooth (except for one direction, see Fig. 4), they nevertheless are fractal in the sense of possessing a Cantor set structure in one direction [25]. In the following, we will discuss more closely the role of analyticity. First, we destroy analyticity by an arbitrary perturbation. Second, we study the effects of special transformations. Third, we investigate the role of the critical points. Thereafter, we shall look at a probable mechanism for generating fractality, inspired by the fact that nonlinear dynamics has, in the past, revealed simple features being sufficient for the creation of chaos.
Fig. 4. Striated fractal basin boundary in an ordinary nonanalytic, discrete mapping {dissipative Henon map [eq. (8)]} x„+i = 1 + >;„ - axl, y„+\ = bXn- The parameters are so chosen as to yield a chaotic attractor a= 1.4, Z? = -0.3 (for technical details, see Table 2 in Appendix), (a) The basin of attraction of the chaotic Henon attractor. (b) Close-up of the lower-left part of (a), (c) Close-up of the lower-right part of (b).
82
MICHAEL KLEIN et al.
map, eq. (1). The straightforward way is to simply introduce a real perturbing term into eq. (2)
4. DESTROYING ANALYTICITY
The complex logistic map (1) (with Zn, cEiC) can, using the canonical transform
Xn+\ = xl-
yl^- Cx^ axn
y^+x = IXnyn + C2
(4)
(with Xn,yn,Cx,C2,aE:R) and study the effect of an increase in the perturbation, a, on the structure of the resulting "generalized" Mandelbrot set and Julia setbe considered as a function of two real variables, like basin boundaries. See Fig. 5 for differently perturbed Julia sets of a period 11 attractor. Kahlert and Rossler[26] found two new features in the basin (2) boundaries of this perturbed system. With a small perturbation, they still found a self-similar, "hook-like" (with x„, y„, Ci, C2 E 7?) such that the Cauchy-Riemann structure (Fig. 6) that lacked smooth parts. With increasing perturbation, they found a self-similar (selfdifferential equations repetitive) structure that is fractal in two directions, but nevertheless contains smooth segments, which they ^fx{x,y)ldx=df2{x,y)ldy called the "wild goose" (Fig. 7). Peinke et ^/.[27] who dfx{x,y)/dy = -df2{x,y)ldx (3) looked at parameter space, found smooth segments arising on the boundary beside the remaining self-simare satisfied. The prototypic map, eq. (2), is of special ilar structures. Fig. 8 presents numerical evidence that interest because it already generates fractal boundaries. vortex-like structures resembling those of "sea horses" The Mandelbrot set in parameter space and a filled-in in the original Mandelbrot set may survive {cf. Fig. Julia set in the plane of variables are presented above 3a). A corresponding Julia set (Fig. 9) shows striking analogies to the structure seen in parameter space. in Fig. 3 a and b, respectively. There are several ways to study the effects of deIt seems that destroying analyticity generates differstroying analyticity in the complex analytic logistic ent structures, characterized especially by smooth parts. / ( z ) = (/i(x,j;),/2(A:,y)),
Fig. 5. Effect of an increasing perturbation on the Julia set-like boundary of eq. (4) (for technical details, see Table 2 in Appendix), (a) The undisturbed Julia set of eq. (2), respectively, eq. (4), with a = 0. (b-f) Perturbed Julia set of eq. (4), with increasing perturbation parameter a < 0.
83
Fractality in nature
Fig. 6. Blow-ups of Fig 5b, the self-similar "hook" structure (for technical details, see Table 2 in Appendix), (a) Relative magnification 2.5 • 10^. (b) Relative magnification 2.5 • 10*. (c) Relative magnification 2.5 • 10^. McDonald et a/. [25], therefore, stated that "bifractal"[28] basin boundaries are limited to "very special cases of two-dimensional maps," whereas, in normal two-dimensional maps, "striated" fractal boundaries, which means fractals that are locally stripe-like and smooth as described in Fig. 4, are the rule. The fact that a structure like that of Fig. 6 persists over an open, dense region in parameter space, therefore, came as a surprise. On the other hand, it can be shown that analyticity of a map is definitely not a property that has any direct relevance on the dynamical behavior of a system. There exist infinitely many smooth automorphisms, which, even though violating the Cauchy-Riemann conditions [eq. (3)], possess structures indistinguishable from those obtained by the complex logistic map [eq. (2)]. For example, the maps
(with x„, ;v„, Ci, C2 E i?) do not fulfill the CauchyRiemann equations [eq. (3)]. In the case of eq. (5a), we get
dfx{x,yMbx^ly
¥= bh{x,y)lby
^Ix,
and in case of eq. (5b), we have
dfx{x,y)ldx^lx
+ df2{x,y)ldy = lx + ly.
Both these maps generate geometrically distorted Mandelbrot sets (Fig. 10). The Mandelbrot set of eq. (5a), for example, is slightly stretched and rotated about the origin toward the first diagonal of parameter space (ci, C2). With an appropriate choice of the two free parameters, namely c\ = C1-C2/V3 c'i= C1 + C2/V3,
(5a) and Xn + l
xl-yl
+ cx
y„+l = IXnyn + y« + C2
(5b)
(6)
the Mandelbrot set can be shifted geometrically onto the original one, thus balancing the transformation in state space by a transformation in parameter space. Eqs. (5) are two examples from a whole class that is obtained by rotating and stretching eq. (2) in the plane [29].
Fig. 7. Blow-ups of Fig. 5f, the self-repetitive "wild goose" structure (for technical details, see Table 2 in Appendix), (a) Relative magnification 4.0* 10^. (b) Relative magnification 4.0* 10*. (c) Relative magnification 4.0-10^
84
MICHAEL KLEIN et al.
Fig. 8. View of a two-dimensional slice through the three-dimensional parameter space of eq. (4) (for technical details, see Table 1 in Appendix), (a) Total view of the Mandelbrot-like set in parameter space. (b) Close-up of a vortex structure at the top of (a), (c) Close-up of the central part of (b).
Another even more surprising map [ 30 ]:
5. LINEAR NONCONFORMAL TRANSFORMATIONS
x'„+x = 2x'n{ 1 - pix'^ + y'n) + PA / „ + , = ( 1 - p,X'^ + y'„Y - pWn + P3 - 1 + ;?,(2x'„(l -p,x'„2 +>;'„)+p4)'
(7)
(with x'ny y'n,Piy. . . ,P4E:R)is nothing but a nonlinear transform of the complex logistic map [eq. ( 2 ) ] via the Henon map X = I - pix'^ + y' y = Pix'
(8)
(with X, y, jc', y', pi, p2E:R). The basin of attraction of an attractive cycle of period 11 is shown in Fig. 11.
To our knowledge, there exists no theorem which allows one to decide whether or not a noninvertible dynamical system can be transformed into a complex analytic one. Even the question of the existence of such a bijection [e.g., in the case of eqs. ( 4 ) ] is open. We are not going any deeper into the problem of general transformations, except for showing that a criterion for linear transforms may be found easily [ 3 0 ] . Any homogeneous linear automorphism in two real dimensions, T, may, neglecting trivial shifts, be written as /I ^ \a
0\/cos 0 b)\sin(l)
- s i n \ cos/
aSC.
(9)
The constant factor, a, together with the second matrix, C, possess the general form of a conformal linear transform and, hence, do not change the analyticity of a map. In contrast, the matrix, S, can destroy (or reintroduce) analyticity if it is no longer (or becomes) a diagonal matrix with b = ±1. Via S, any general twodimensional map x'„+i = F'(x'„, y'n) y„+, = G'{x'„, y'n)
(10)
can be transformed into Xn + i = FiX„, yn) = F'{x„, axn + byn) y„+l = G(Xn, yn) = -(a/b)F'(x„,
aXn + by„)
-\-(l/b)G'ix„,aXn-^by„). Fig. 9. Julia set-like boundary of eq. (4). Despite the perturbation, the equivalence of the structures found in parameter space {Ci,C2, a) and variable space {x„,y„)is not destroyed, compare Fig. 8a with Fig. 9 (for technical details, see Table 2 in Appendix).
(11)
In order for the Cauchy-Riemann equations [eq. (3) ] to be satisfied for the transformed dynamics F(Xy y), G(x,y), the conditions F',. + aF'y •• -aF'y + G'y
(12a)
85
Fractality in nature
Fig. 10. Different examples of Mandelbrot sets in nonanalytic maps (for technical details, see Table 1 in Appendix), (a) Stretched and rotated Mandelbrot set of eq. (5a). (b) Deformed Mandelbrot set of eq. (5b).
6. ON THE ROLE OF CRITICAL POINTS
and bF'y = {alb)F',. 4- {a^lb)F'y -{\/b)G',.-{alb)G'y
(12b)
(where F^- = dF'/dx', etc.) must be fulfilled. These equations can be solved easily, yielding G'y - F'x' 2F'.
(13a)
as well as b=±
aF'x' + a^F'y - 2G'^> - aO'y rF'.v'
(13b)
This gives one a general criterion to check on the analyticity of those dynamics [e.g., eqs. (5)] in which coordinates are just stretched and rotated geometrically.
One possible definition of the Mandelbrot set relies on the important role of critical points, defined as zeros of the Jacobian determinant. The Mandelbrot set of a map is the collection of all points in parameter space whose orbits stay finite under iteration of the finite critical point[ 3 ]. The complex quadratic map [eq. (1)] has only two critical points, one at infinity and one at the origin, whereby the latter can be taken to generate the set. Two interesting questions arise: what happens if there exists more than one finite critical point?, and— more important to us—what happens if there is no critical point present? In case of the cubic complex analytic map with its two finite critical values, one gets two separated Mandelbrot-like sets (see [31]), which should be no surprise. We wish to present another astonishing map which gives rise to a three-dimensional rotated Mandelbrot set. Eqs. (5) and (7) were designed under the assumption that the Mandelbrot set and Julia sets may be treated as well-defined sets of the two-dimensional
Fig. 11. The basin of attraction of eq. (7) (for technical details, see Table 2 in Appendix), (a) Total view of the transformed Julia set. (b) Close-up of the lower-right part of (a), (c) Close-up of the vortex structure of(b).
86
MICHAEL KLEIN et al.
Xrt+i = -axn - (1 - a)xl - yl-\- Ci
plane. That gave one of us (M.K.) the idea to simply rotate the fundamental dynamics about the real axis, as in
y„+l = IXnyn + hZn + C2 ^«+i ~ yn
•^« + l "~ ^n
yn
(15)
^n + C\
(with x„,yn, z„, Ci, C2, a, bE: R). The Jacobian reads bia-\-3y^). Although the origin no longer is the critical (14) point, we used it to analyze the arising Mandelbrotlike set, since it still represents the point of maximal (with x„, yn, Zn, Cu C2, Ci Ei R). The Jacobian reads decoupling between parameter space and variable Sx(x^ + y^ -\- z^). For x = 0, there are infinitely many space. Fig. 13 shows the deformed Mandelbrot-like set finite critical points [the whole (y, z) plane generates which still somewhat resembles the original structure. a zero Jacobian ]. But only when using the origin as Fig. 14 shows some corresponding Julia-analogous sets. initial condition, one will generate the original Man- For the time being, we can only give numerical evidelbrot set. This is because the origin is the "point of dence of self-similarity and fractality. It seems possible maximal decoupling" between parameter and variable that the fractals generated with eqs. (14) and (15) inspace. Decoupling means that the whole iteration se- clude striated structures not found in the complex anquence is given by the parameter values independently alytic case. of the initial condition, and vice versa. The map itself reveals curious structures as, for example, a rotationally 7. GENERATING MECHANISM symmetric Mandelbrot set. Slices in the three-dimenOF FRACTAL BOUNDARIES sional parameter space enable us to take "tomograms" Now the question arises of whether one can find a through the set at arbitrary points (Fig. 12). general mechanism creating fractal boundaries indeWe designed a second prototypic map in three di- pendently of analyticity. We propose that any bistable mensions close to the dynamics of the original two- system with two different basins of attraction, when variable quadratic form. Its Jacobian is globally un- combined with a chaotic forcing acting on the boundequal to zero, so that it possesses no finite critical point: ary, generates nontrivial fractal boundaries. To moti-
(d)
(e)
Fig. 12. Two-dimensional slices through the rotationally symmetric Mandelbrot set of eq. (14) (for technical details, see Table 1 in Appendix), (a) Slice in the (ci, C2) plane of parameter space of eq. (14). This is the "original" Mandelbrot set found also in eq. (2) (compare with Fig. 3a). (b) Slice parallel to the (02, c^) plane at Ci =0.31 of (a), (c) Slice parallel to the (02,^3) plane at Ci = 0.375 of (a), (d) Slice parallel to the (ci, C2) plane at C3 = O.I of (a), (e) Slice parallel to the (cj, C2) plane at C3 = 0.25 of (a), (f) Slice parallel to the (ci, C2) plane at c^ = 0.55 of (a).
87
Fractality in nature
vate this idea, we transform eq. (2) into polar coordinates. With X = r cos (j) and y = r sin 0, the twodimensional map now reads r„+i = Vr^ + 2rlici cos 20„ + C2 sin 20„) -\- c]-\- d 3), with real-time assignment of graphics attributes [18]. Acknowledgements—A.S. is grateful to the Leathersellers Guild for their Scholarship. A.S. and T.M. acknowledge the support of the S.E.R.C. through the "Nonlinear Initiative." •.•.•:\;:v.
• " ''.
••'
••••/^•:'».:..-..\*«>r"".-.
Fig. 14. Poincare Cross Section (chaotic motion). crossection through an attractor. This contrasts with a similar section shown in Fig. 14 of the attractor once the system has become chaotic. The chaos appears via the mechanism oi torus doubling and is the subject of current study [16]. In this regime, our visualisation methods no longer apply and new techniques need to be introduced. 5. CONCLUSIONS We have used a graphics/data base system to investigate the behaviour of two coupled pendula excited by an oscillatory force (whose frequency may be varied) by constructing phase portraits. An interactive wireframe facility was used to search for interesting data configurations, and solid computer graphics were used to generate high quality images. In this way, a vivid visualisation of a bifurcation process in this system was obtained: two attractors joining into one at a certain value of the excitation frequency. Such pictures give valuable insight into the topological transformations that the sy^em undergoes before chaos sets in. In addition, by using colour to mimic the effect of a fourth dimension, an improved understanding of the bifurcation process could also be given. For instance, the interpretation of the "lip" around the edge of the two separate attractors as they approach each other was clarified. The visualisation techniques that we have developed are rather general and could also be applied to practical problems in other areas, such as multivariable control theory, where phase space studies have a useful role to play. Two outstanding challenges remain for the future. One is to devise methods for visualising the behaviour of the pendulum system when in its chaotic phase. In this case, the graphics techniques need to take into account that the geometry may be fractal in nature. The other is the development of practical methods for
REFERENCES 1. J. M. T. Thompson and H. B. Stewart, Nonlinear Dynamics and Chaos, John Wiley, New York (1988). 2. J. Guckenheimer and P. Holmes, Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields, Springer, Berlin (1983). 3. A. C. Skddion, Bifurcations and chaos in a parametrically excited double pendulum. Doctoral thesis, Oxford University (1990). 4. H. B. Keller, Numerical solutions of bifurcation and nonlinear eigenvalue problems. In Applications of bifurcation theory, P. H. Rabinowitz (Ed.), Academic Press, New York, 359-384(1977). 5. G. looss and D. D. Joseph, Elementary Stability and Bifurcation Theory, Springer, Berlin (1980). 6. D, S. Broomhead and G. King, Extracting qualitative dynamics from experimental data. Physica D20, 217-235 (1986). 7. T. Mullin and T. J. Price, Nature M^, 294-296 (1989). 8. T. R. Heywood, B. N. Galton, J. Gillett, A. J. Morffew, P. Quarendon, S. J. P. Todd and W. V. Wright, The Winchester graphics system: a technical overview, Computer Graphics Forum 3, North Holland, Amsterdam 6l~ 70(1984). 9. J. M. Burridge et al., The WINSOM solid modeller and its application to data visualisation, IBM Systems Journal, 28,548-568(1989). 10. M. Mantyla, An introduction to solid modelling. Computer Science Press, Rockville, MD (1988). 11. P. Burger and D. Gillies, Interactive Computer Graphics, Addison-Wesley, Reading, MA (1989). 12. T. Mullin, D. E. L. Pottinger and A. Skeldon, The FiveDimensional Pendulum Picture Show, New Scientist, 1689, 46-47 (1989) and Front Cover. 13. J. M. Gambaudo, P. Glendinning and C. Tresser, Stable cycles with complicated structures. J. Phys. Lett. 46, 653658(1985). 14. T. Mullin, D. E. L. Pottinger, and A. C. Skeldon, The five-dimensional pendulum picture show. A^^vv Scientist 1689,46-47 (1989). Reprinted in The New Scientist Guide to Chaos, N. Hall (Ed.), Penguin, London, 53-55 (1991). 15. D. E. L. Pottinger, I. Rodrigues and P. Quarendon, Pendula in Motion (IBM UKSC Video (1989). 16. A. C. Skeldon and T. Mullin, Mode interaction in a double pendulum. Phys. Lett. A (in press). 17. D. E. L. Pottinger, Texture and multidimensional data visualisation (in preparation). 18. S. J. P. Todd, Terminal for Real-Time Viewing of Multidimensional Data, IBM Technical Disclosure Bulletin 33(3a), 202-204. (August 1990). TECHNICAL NOTES 1. The path following was carried out using AUTO, a software package produced by Professor E. Doedel currently at Concordia University, Montreal, Canada. 2. WGS and WINSOM may be run on an IBM mainframe operating under VM/SP/CMS or VM/XA in 370 compatibility mode. The resulting WINSOM images may be displayed on an IBM 5080, or the more powerful IBM 6090, graphics workstation.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
111 Chaos and Graphics
SELF-REFERENCE AND PARADOX IN TWO AND THREE DIMENSIONS PATRICK GRIM, GARY MAR, MATTHEW NEIGER, and PAUL S T . DENIS
Group for Logic and Formal Semantics, Department of Philosophy, SUNY at Stony Brook, Stony Brook, NY 11794 Abstract—The Liar paradox is a familiar sentence that asserts its own falsehood. Just slightly less familiar is the Dualist, involving a pair of mutually referential sentences. Here we consider variations on the Dualist and Triplist, modelling their dynamical semantics using iteration within an infinite-valued logic. Strange attractors and fractal escape-time diagrams appear in two dimensions for the Dualist and in three dimensions for the Triplist. The Liar paradox is a self-referential sentence that asserts its own falsity:
the delicate fractal image shown in Fig. 1. (For this and all following images we use an escape distance of 1.03 from the origin.) This sentence is false. Here our image has been confined to the unit square, reflecting the fact that semantic values for X and Y Its semantical dynamics are familiar to everyone who within our logic are confined to the [0, 1] interval. has ever had the misfortune of having been 10 years Formally, however, this image is merely the central old: if true, it must be false, but if false, it must be true. section of a larger one, shown for values between — 1.4 Modelling "true" and "false" as 1 and 0, the dynamical and +2.4 in Fig. 2. semantics of the Liar is a simple oscillation between 0 If we replace x„ in the second algorithm above with and 1. x„+i, reflecting merely a sequential rather than simulJust slightly less familiar is the Dualist, which in- taneous pattern of reasoning, we get the attractor and volves not one sentence but two: escape-time diagram shown in Figs. 3 and 4. Beyond the Dualist lies the Triplist. Consider for X: Sentence Y is false. example a Triplist variation in which each of three F: Sentence X is true. sentences asserts that it is half as true as the difference between the other two. Using a sequential pattern of In this paper we focus on some variations of the reasoning, the dynamical semantics of revised estimates Dualist conceived in an infinite-valued logic, in which for this triad of sentences can be modelled in our logic sentences are allowed to take on any real truth-value using the following algorithms: in the [0, 1] interval. The dynamical semantics of selfreference can be mapped using iterated algorithms. Xn+\ = 1 - abs(.5*abs(y„ - z„) - x„) Consider for example: X\ X is as false as Y is true. Y\ Y is as true as X is. Given any pair of initial estimated values for X and y, these sentences force us to a pair of revised values. With those revised estimates in hand, however, we are forced to a further pair of revised estimates, and so on. As outlined in [1-3], the dynamical semantics of this variation on the Dualist can be modelled using the following algorithms: x„+i = 1 - abs((l - yn) - x„) j;„+, = 1 - abs(x„ - y„) Plotted two-dimensionally, these give us a series of revised values (x, y) confined to the unit square above X = 1 — y. When we plot an escape-time diagram for these points—mapping the number of iterations required for X and y to reach a certain "distance" from (0,0), or pure falsehood for both sentences—we obtain
y„+i = 1 - abs(.5*abs(x„+i - z„) - y„) z„+i = 1 - abs(.5*abs(x„+i - y„+i) - z„) These give us an attractor we call the Minerva. Two stages of its development are shown in two dimensions in Figs. 5 and 6 (for initial input .6, .7, .6). A simpler form is rotated in three dimensions in Fig. 7. A further variation of the Triplist, in which each of three sentences asserts that it is .25 as true as the difference between the other two, gives us the attractor shown in two dimensions in Fig. 8 (for initial input .611, .789, .611) and rotated in three dimensions in Fig. 9. For the Dualist above we went from attractors to escape-time diagrams. For Triplist variations we can similarly go on to construct escape-time solids, in which each point of a three-dimensional area is colored in terms of how many iterations are required for the initial set of values (x, y, z) it represents to reach a certain distance from (0,0,0) under iteration. Figures 10 and 11 show two views of an escape-time solid for the first
Reprintedfrom Comput. & Graphics Vol. 17, No. 5, pag. 609-612, 1993
Fig. 4. Chaotic Dualist variation, escape-time diagram.
Fig. 1. Chaotic Dualist escape-time diagram, unit square.
Fig. 5. Minerva attractor in two dimensions, early development. Fig. 2. Chaotic Dualist escape-time diagram, expanded.
Fig. 3. Attractor for Chaotic Dualist variation, overlay using initial values {x, y) in increments of .05.
112
Fig. 6. Minerva attractor, later development.
Fig. 7. Minerva attractor in three dimensions.
Fig. 8. Attractor for Triplist variation in two dimensions.
Fig. 9. Attractor for Triplist variation in three dimensions.
Fig. 10. Minerva escape-time solid at 0°.
Fig. 11. Minerva escape-time solid at -55°
113
114
p. GRIM, G. MAR, M. NEIGER and P. ST. DENIS
Fig. 13. Triplist variation escape-time solid at 20°.
Fig. 12. Triplist variation escape-time solid at 0°. Triplist variation offered above; Figs. 12 and 13 show two views of an escape-time solid for the second Triplist variation above. The background logic of these images of course has its own points of interest, and suggests both further variations and a range of intriguing applications. These issues are more fully treated in the references. Here we have tried to concentrate briefly on the images themselves. All images were produced with the simplest possible equipment: programs are in basic on low-end PCs, with images captured and printed on a laser printer or taken directly from the monitor using a 35 mm camera.
REFERENCES P. Grim and G. Mar. Chaos, fractals, and the semantics of paradox. Research Report 91-01, Group for Logic and Formal Semantics, Department of Philosophy, SUNY at Stony Brook (1991). P. Grim and G. Mar. Paradox and chaotic dynamical semantics. Association for Symbolic Logic, CarnegieMelon. Abstract / Symbolic Logic 57, 358 (1992). P. Grim. Self-reference and chaos in fuzzy logic. IEEE Transactions on Fuzzy Systems (in press). G. Mar and P. Grim. Paradox, randomness, and chaotic dynamical semantics. Association for Symbolic Logic, San Francisco. Abstract, Journal of Symbolic Logic, 57, 369 (1992). G. Mar and P. Grim. Pattern and chaos: New images in the semantics of paradox. Nous, XXV, 659-693 (1991). 1. Stewart. A partly true story. Mathematical Recreations, Scientific American, 268, 110-112 (1993).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
115
Chaos and Graphics
VISUALIZING THE EFFECTS OF FILTERING CHAOTIC SIGNALS MICHAEL T . ROSENSTEIN^ and JAMES J. COLLINS
NeuroMuscular Research Center and Department of Biomedical Engineering, Boston University, 44 Cummington Street, Boston, MA 02215, USA Abstract—It is well-known thatfilteredchaotic signals can exhibit increases in observed fractal dimension. However, there is still insufficient knowledge regarding the underlying causes of this phenomenon. We provide further insight into this problem through the use of computer animations and three-dimensional ray-tracings. Specifically, we show that lowpassfilterscan induce a nonuniform convergence to a dynamical system's mean state-space location. With chaotic attractors, this convergence distorts the attractor's normal geometrical configuration such that the observed system acquires increased dimensionality. 1. INTRODUCTION
Since the early 1980s, the field of chaos has enjoyed a remarkable growth in popularity. With origins primarily in physics and mathematics, chaos has gained the attention of researchers from largely disparate disciplines {e.g., physiology, communications, economics). Unfortunately, this popularity has not been free of undesired side effects. Some experimentalists, for instance, use the tools (/.e, numerical algorithms) of chaos without familiarity of their theoretical limitations. (See[1,2] for examples of potential problems.) For this reason, a great deal of recent dynamical-systems research has focused on the practical use of numerical algorithms for examining systems suspected of displaying chaos. Since experimentally obtained data are usually filtered (possibly unintentionally), one should be aware of the effects of filtering chaotic signals. Although, several research groups [3-6] showed that lowpass filters can increase the observed fractal dimension of a chaotic system, there is still insufficient understanding of this phenomenon.* Hence, this paper provides further insight into the mechanisms underlying the effects of filtering chaotic signals. In particular, we show that the dimension increase results from a nonuniform scaling of the observed system's geometry. With this purpose in mind, we found data visualization via three-dimensional ray-tracings to be an intuitive and effective resource.
tractor[8], which is defined by the following three coupled differential equations: X = (7{y - x) y = x{R - z)-
y
z = xy — bz. In order to examine the Lorenz system in the chaotic regime, we chose parameter values of a = 16.0, R = 45.92, b = 4.0. The differential equations were solved numerically using a fourth-order Runge-Kutta integration with a step size equal to 0.005 s; the numerical integration was calculated from an arbitrary initial condition, and a sufficient number of transient points were discarded. Finally, three 1275-point time series (one for each of the x-, y-, and z-coordinates) were generated for subsequent processing. Signal processing consisted of lowpass filtering the time series using a first-order {i.e., single-pole) filter with the following impulse response {h): h[n] = a"' u[n], where a is the filter parameter (0 < ^ < 1), w is the unit step function, and n represents discrete time. To force the DC gain to unity, the filter was implemented as the difference equation y[n] = a- y[n - 1] + (1 -
a)'x[n],
2. SIGNAL GENERATION AND PROCESSING
For the examples presented in Section 4, we performed numerical experiments using the Lorenz at-
where x is the input and y is the output. (The term 1 — a divides the z-transform of /z[«] by the sum of its coefficients, \ -\- a + a^ -^ a^ + • • '.) Notice that y[n] depends upon previously computed values of the ^ Present address: Dynamical Research, 15 Pecunit Street, filter output; that is, the chosen filter is an infiniteCanton, MA 02021, USA. impulse response (IIR) filter. The corresponding fre* When estimating fractal dimension, one typically evaluates quency response of this lowpass filter is a relevant quantity {e.g., the correlation sum[7]) over a specified range of length scales. With lowpass-filtered data, an in1 crease in observed dimension is apparent over length scales H{en dominated by the chaotic signal. However, on length scales dominated by noise, one may actually observe a decrease in fractal dimension. where a; is the radian frequency. Reprintedfrom Comput. & Graphics Vol. 18, No. 4, pag. 587-592, 1994
// axes.inc ... a POV-Ray include file for implementing 3D coordinate axes // first define a unit arrow along the x-coordinate axis #declare Arrow_X = object union // join a cylinder and a cone { intersection // an infinite cone truncated by a plane quadric{ -0.250} plane{ 0.75 inverse} intersection // an infinite cylinder truncated by a plane quadric{ -0.002500} plane{ 0.75} } bounded_by{box{ }} // used to speed up rendering clipped_by{box{ }} // truncates rest of infinite quadrics } // now rotate Arrow_X to get unit arrows along the y- and z-coordinate axes #declare Arrow_Y = object{Arrow_X rotate} #declare Arrow^Z = object{Arrow_X rotate} // define the surface characteristics of the axes #declare Axes_Texture = texture { color Yellow metallic ambient 0.25 reflection 0.10 } // form a composite object from the three arrows and a sphere at the origin #declare Axes_XYZ = composite object{Arrow_X texture{Axes_Texture}} object{Arrow_Y texture{Axes_Texture} } object{Arrow_Ztexture{Axes_Texture}} object{sphere{ 0.0500} texture{Axes_Texture}} bounded_by{box{ }} } Listing 1. Example of the POV-Ray scene description language ( S D L ) .
/* NOTES: 1. The radius of the tube is stored in the global variable r. 2. HasLinks and HasColors are Boolean global variables set by the user, 3. This code shows minimal use of bounding objects. If faster rendering is needed, form a composite object from several successive segments and use another bounding object for the entire composite object. (This strategy can be extended to multiple levels by forming a larger composite object - with its own bounding object - from two or more composite objects from the previous "level.") #define void
M_180_OVER_PI
57.29577951
ConstructTube(FILE *dataFile)
int i; if(HasLinks) { /* first define a unit segment along the x-axis */ fprintf(dataFile, "#declare Seg_X = intersection\n"); fprintf(dataFile, "{\n"); fprintf(dataFile," quadric{ %f}\n", -r*r); fprintf(dataFile," plane{ -1 inverse}\n"); fprintf(dataFile," plane{ l}\n"); fprintf(dataFile, "}\n\n"); /* position a lone sphere for one of the endpoints */ WriteSphere(dataFile, 0); /* now loop through the rest of the points and position a segment */ for(i=l; i^i),..., (x^,, y^), whereby the input patterns are vectors of dimension m and the output patterns are scalars. The weights of the linear associator can be ordered in an m-dimensional column vector w and the learning task consists of finding that w, which minimizes the quadratic error
Ax{i) = -2yax + aAx{i - 1) in the x direction and Ayii) = -2ybx + aAy{i - 1)
in the y direction. An optimal parameter combination in the x direction is 7 = \/2a and a = 0. In the y m direction the optimal combination is 7 = I/2b and a £ = 2 l|x,w-j;,P. = 0. Since the iteration proceeds with a single 7 value, we have to find a compromise between these two options. Intuitively an intermediate 7 should do best, By defining a p X m matrix X whose rows are the when the momentum term is zero. Figure 1 shows the , Xp and a column vector y whose elevectors Xi, number of iterations needed to find the minimum of ments are the scalars yi, ..., yp, the learning task re- the error function to a given precision as a function of duces to the minimization of 7, when a = 1.5 and b = I. The optimal value for 7 is the one found at the intersection of the two curves. E= | | X w - y P The global optimal 7 is larger than the optimal 7 in the X direction and smaller than the optimal 7 in the = (Xw-y)^(Xw-y) y direction. This means that there will be some oscil= w^(X^X)w - 2y^Xw + y^y. lations in the y direction and slow convergence in the X direction, but this is the best possible compromise. Since this is a quadratic function, the minimum is It is obvious that in the m-dimensional case we could found at w = X^y, where X"^ is the pseudoinverse of have oscillations in some of the principal directions the matrix X. A solution can also be found using back- and slow convergence in others. A simple strategy that propagation. is used by some fast learning algorithms to avoid these The quadratic function E can be thought of as a problems consists of using a different learning rate for paraboloid in m-dimensional space. The lengths of its each weight, that is a different 7 for each direction in principal axes are determined by the magnitude of the weight space [ 5 ]. eigenvalues of the covariance matrix X^X. Gradient descent is most effective when the principal axes of the 3. MINIMIZING OSCILLATIONS quadratic form are all of the same length. In this case, Since the lengths of the principal axes of the error the gradient vector points directly toward the minimum function are given by the eigenvalues of the covariance of the error function. When the axes of the paraboloid matrix X^X, and since one of these eigenvalues could are of very different size, the gradient direction can be much larger than the other ones, the range of poslead to oscillations in the iteration process[4], sible values for 7 reduces accordingly. Nevertheless, a Let us consider the simple case of the quadratic very small 7 and the oscillations it produces can be function ax'^ + by^. Gradient descent yields the iter- neutralized by increasing the momentum term. A deation rule tailed discussion of the one-dimensional case provides
Fig. 1. Optimal 7 in the two-dimensional case.
Oscillating iteration paths
divergence zone
0,5 Momentum rate
Fig. 2. Convergence and nonconvergence regions.
us with the necessary insight for the understanding of more complex cases. In the one-dimensional case, that is when minimizing functions of type kx^, the optimal step length is
123
given by 7 = \ /2k. K step length of 7 = {/k produces an oscillation between the initial point XQ and —XQ. Any 7 greater than 2//cleads to an "explosion" of the iteration process. Figure 2 shows the main regions for parameter combinations of 7 and a. These regions were determined by iterating in the one-dimensional case and integrating the length of the iteration path. Parameter combinations in the divergence region lead to the explosion of the iteration process. Parameter combinations in the boundary between regions lead to stable oscillations. Figure 2 provides us with some interesting information. Any value of 7 greater than four times the constant 1/2/c cannot be balanced with any value of a. Values of a greater than 1 are prohibited since they lead to a geometric explosion of the iteration process. Any value of 7 between the explosion threshold Xjk and 2 / / : can be made to lead to convergence by a large enough a. For any given 7 between 1 /k and 2/A: there exist two points in which the iteration process falls in a stable oscillation, namely at the boundaries between regions. For values of 7 under the optimal value
Fig. 3. Paths in weight space for backpropagation learning (linear associators).
124
R. ROJAS
Fig. 4. Bounded nonlinear error function and the result of several iterations. 1/2A:, the convergence speed is optimal for a unique a. The optimal combinations of a and 7 are the ones represented by the jagged line in the diagram. The more interesting message we get from Fig. 2 is the following: In the case where in some direction in weight space the principal axis of the error function is very small compared to another axis, we should try to achieve a compromise by adjusting the momentum rate in such a way that the oscillating directions become less oscillating and the directions with slow convergence improve their convergence speed. Obviously when dealing with n directions in weight space, this compromise could be dominated by a single direction in weight space. 4. CRITICAL PARAMETER COMBINATIONS
Backpropagation is normally used in those cases in which we do not have an analytic expression of the function to be optimized. A learning rate 7 has to be chosen without any previous knowledge of the covariance matrix of the input. In on-line learning the training patterns are also not always defined in advance, and are generated one by one. A conservative approach is then trying to minimize the risk by choosing a very small learning rate. But in this case backpropagation can be trapped in a local minimum of a nonlinear error function. The learning rate should then be increased. In the case of a covariance matrix X^X with some very large eigenvalues, a given choice of 7 could lead to divergence in the associated direction in weight space (assuming for simplicity that the principal directions of the quadratic form are aligned with the coordinate axis). Let us assume that the selected gamma is near to the explosion point 2/k found in the one-dimensional case and shown in Fig. 2. In this case only values of the momentum term near to one can guarantee convergence, but oscillations in some of the directions in weight space can become synchronized. The result is oscillating paths in weight space, reminiscent of Lisajous figures. Figure 3 shows some paths in a twodimensional weight space for several linear associators trained with momentum rates close to one and different 7 values. In some cases the trajectories lead to convergence after several thousand iterations. In others a momentum rate equal to one precludes convergence of the iteration process. In many cases in which backpropagation does not converge, at least it diverges with elegance.
The adjustment of the learning and momentum rate in the nonlinear case is even more difficult than in the linear case, because there is no fast explosion of the iteration process. At least in the quadratic case whenever the learning rate is excessively large, the iteration process leads rapidly to an overflow that alerts the programmer that the step size should be reduced. But in the nonlinear case the output of the network and the error function are bounded and no overflow occurs there. In regions far from local minima the gradient of the error function nearly becomes zero and the weight adjustments also. The divergence regions of the quadratic case can now become oscillatory regions. In this case even with larger and larger step sizes the iteration returns to the convex part of the error function. Figure 4 shows the possible shape of the error function for a linear associator with sigmoidal output and the associated oscillation process for this kind of error function in the one dimensional case. The jagged form of the iteration curve is reminiscent of the kind of learning curves shown in many papers about learning in nonlinear neural networks.
5. CONCLUSIONS
In this paper we have shown that backpropagation with momentum can exhibit a highly oscillating behavior under some parameter combinations. Presumably this is the kind of situation found in some applications when the learning rate is just too large. Although in the quadratic case mainly large momentum rates lead to oscillations, in the nonlinear case a gamma which is excessively large can also produce oscillations even when no momentum rate is present. Researchers in the field of neural networks should be concerned not only with the possibility of getting stuck in local minima of the error function when learning rates are too small, but also with the possibility of falling into the oscillatory traps of backpropagation when the learning rate is too big. Learning algorithms should try to balance the speed-up they are attempting to obtain with the risk of divergence involved in doing so. Two different kind of remedies are available: adaptive learning rates and statistical preprocessing of the learning set in order to decorrelate the input patterns trying to avoid the deleterious effect of too large eigenvalues of the covariance matrix [6 ]. In the case of highly correlated input patterns the analysis of the convergence regions for backpropagation becomes more
Oscillating iteration paths complex and the iteration paths become more irregular than those shown in Fig. 3. REFERENCES 1. R. Rojas, Theorie der neuwnalen Netze, Springer-Verlag, Berlin (1993). 2. H. van der Maas, P. F. Verschure, and P. Molenaar, A note on chaotic behavior in simple neural networks. Neural Networks 3, 119-122 (1990). 3. J. D. Schaffer, D. Whitley, and L. J. Eshelman, Combinations of genetic algorithms and neural networks: A survey of the state of the art. In International Workshop on
125
Combinations of Genetic Algorithms and Neural Networks, IEEE Computer Society Press, Los Alamitos, 137(1992). 4. M. Pfister, On data correlation and neural networks. Technical Report B-11/93, Freie Universitat Berlin, Fachbereich Mathematik und Informatik (1993). 5. R. A. Jacobs, Increased rates of convergence through learning rate adaptation. Neural Networks 1, 295-307 (1988). 6. L. B. Almeida and F. M. Silva, Speeding-up backpropagation by data orthonormalization. In T. Kohonen, K. Makisara (Eds.), Artificial Neural Networks, NorthHolland, Amsterdam, 943-948 (1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
127
Chaos and Graphics
THE CRYING OF FRACTAL BATRACHION 1,489 CLIFFORD A. PICKOVER IBM Watson Research Center, Yorktown Heights, NY 10598, U.S.A. Abstract—^This essay describes a class of integer sequences with unusual graphical behaviors and histories. Simple graphical methods are presented in order to encourage student/teacher involvement and future exploration. INTRODUCTION
''The rationality of our universe is best suggested by the fact that we can discover more about it from any starting point, as if it were a fabric that will unravel from any thread."*'— George Zebrowski (1994). Batrachions are a class of bizarre and infinite mathematical curves which hop like frogs from one "lilypad" to the next as they parade along the number system. These httle-known curves derive their name from batrachian which means frog-Hke. (To pronounce the word, note that the "ch" has a "k" sound.) In addition to hopping in a strange manner from integer to integer, they also have other interesting properties. For example, they are often fractal, exhibiting an intricate self-similar structure when examined at different size scales. Also, they evolve from very simple-looking recursive formulas involving integers. As background, perhaps the most common example of recursion in programming and in mathematics is one that that defines the Fibonacci numbers. This sequence of numbers, called the Fibonacci sequence, plays important roles in mathematics and nature. These numbers are such that, after the first two, every number in the sequence equals the sum of the two previous numbers:
values of n depend on past values in intricate recursive ways. Can you determine the third member of the sequence? At first, this may seem a little compHcated to evaluate by hand, but you can begin slowly by inserting values for n, as in the following: a{3) = a{a{2)) ^ a{3 - a)) a{3) = a{l)-^ a{3 - I) = a{3) =3 1 + 1 = 2.
a{n) = a{a{n - ! ) ) + « ( « - a{n - 1)).
Therefore, the 3rd value of the sequence, a(3), is 2. The sequence a{n) seems simple enough: 1,1,2,2,3, 4,4, 4, 5 , . . . Try compting a few additional numbers. Can you find any interesting patterns? The prolific mathematician John H. Conway presented this recursive sequence at a recent talk he gave at AT&T Bell Labs entitled "Some Crazy Sequences" [1]. He noticed that the value a{n)/n approaches 1/2 as the sequence grows, and n becomes larger. Table 1 lists the first 32 terms of the Batrachion and the ratio a{n)/n. I first became interested in this sequence after reading Schroeder's delightful book Fractals, Chaos, Power Laws [2], but, alas, there were no graphics included to help readers gain insight into the behavior of the Batrachion. It turns out that this sequence has an incredible amount of hidden structure. Figure 1 is a plot ofa{n)/n for values of« between 0 and 200. Notice how the curve hops from one value of 0.5 to the next along very intricate paths. Each hump of the curve appears to be slightly lower than the previous, as if a virtual frog were tiring as it explored higher and higher numbers. As the frog nears infinity, will it stop its hopping and lie dormant at a{n)/n = 0.5? Figure 2 is a plot for the first 1000 values of the sequence. Notice that it is very similar to Fig. 1. More and more humps evolve with an intricate self-similar arrangement of tiny jiggles along the path.
The formula for the Batrachion is reminiscent of the Fibonacci formula in that each new value is a sum of two previous values, but not of the immediately previous two values. The sequence starts with fl(l) = l, and a(2) = 2. The "future" values at higher
Let us consider how fast the frog approaches its 0.5 destination at infinity. For example, can you find a value of « beyond which the value of a{n)/n is so tiny that it is forever within 0.05 from the value 1/2? (In
Fn =
FN-\
+
FN-1
for
iV > 2, Fo = Fi - 1.
This defines the sequence: 1, 1, 2, 3, 5, 8, 13, 21, . . . With this brief background to recursion, consider my favorite Batrachion produced by the simple, yet weird recursive formula
$10,000 CASH AWARD
Reprintedfrom Comput. & Graphics Vol. 19, No. 4, pag. 611-615, 1995
128
C. A. Pickover Table 1. First 32 terms of the Batrachion. a{n) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
1 1 2 2 3 4 4 4 5 6 7 7 8 8 8 8 9 10 11 12 12 13 14 14 15 15 15 16 16 16 16 16
0.60
a{n)/n 1.0 1.0 .666
.5 .6 .666 .5714
.5 .5555
.6 .6363 .5833 .6153 .5714 .5333
Fig. 3. Batrachion a{n) for 0 n 10,000.
.5 .5294 .5555 .5789
.6 .5714 .5909 .6086 .5833
.6 .5769 .5555 .5714 .5517 .5333 .5161
.5
0.70
0.65
:0.60
0.55
0.50
200
Fig. 1. Batrachion a{n)/n for 0 n 200.
1000
Fig. 2. Batrachion a(n)/n for 0 n 1000.
Other words, \a{n)/n - 1/2| < 0.05. The bars indicate the absolute value.) A difficult problem? John Conway, the British mathematician, offered $10,000 to the person to find the first value of n such that the frog's path is always less than 0.55 for higher values of n. A month after Conway made the offer, Colin Mallows of AT&T [3] solved the $10,000 question: «= 1,489. Figure 3 shows this value on a plot for 0 > « > 10,000. (For a variety of minor technical reasons, a less accurate number is published in Schroeder's book.) As I write this, no one on the planet has found a value for the smallest n such that a{n)/n is always within 0.001 of the value 1/2, that is (|a(«)/« - 1/2| < 0.001). (No one even knows if such a value exists.) Looking at the curves, we can see the following. The frog hits the pond periodically. In fact, a{n)/n "hits" 0.5 at values corresponding to powers of 2, for example, at 2^, /:= 1, 2, 3, . . . Does each hump reach its maximum at a value of n halfway between the 2^ and 2^^^ endpoints? Tal Kubo from the Mathematics Department at Harvard University is one of the world's leading experts on this Batrachion. He notes that the sequence is subtly connected with a range of seemingly unrelated topics in mathematics: variants of Pascal's triangle, the Gaussian distribution, combinatorial operations on finite sets, and Catalan numbers. Tal Kubo and Ravi Vakil have developed algorithms to compute the behavior of the Batrachion as it nears infinity. Indeed, they have found that the frog tires rather slowly! For example, the frog's jumps are not always less than 0,52 until it has jumped 809,308,036,481,621 times! On the following page is a table of values for different frog jump heights. These values were found by Tal Kubo and Ravi Vakil using a Mathematica program running on a Sun 4 computer. Colin Mallows, the statistician who conducted the first in-depth study of this class of curves, notes that no finite amount of computations will suffice to prove that the regularities we see in the curve persist indefinitely. He does note that the differences between successive values are either 0 or 1. Is this true indefinitely?
129
The crying of fractal Batrachion 1,489 Last n such that a(n)/n-l/2e 1/20 1/30 1/40 1/50 1/60 1/70 1/80 1/90 1/100
1489 (found by Mallows in 1988) 758765 6083008742 (found by Mallows in 1988) 8093080364481621 1684539346496977501739 55738373698123373661810220400 15088841875190938484828948428612052839 127565909103887972767169084026274554426122918035 8826608001127077619581589939550531021943059906967127007025
VISUALIZING INFINITY
I have found that Figs 1-3 give students and researchers an intuitive feel for the Batrachion, its self-similar structure, and Conway's contest. How might we apply other simple graphical tools to better display the behavior of the Batrachions? I was particularly interested in how we can best illustrate the fractal (self-similar) structure of the various humps. One way is to renormalize each hump by shifting them on the x-axis each time a 2^ value is reached. In addition, the x-values can be scaled between 0 and 1 by multiplying by 1/2^. (This effectively normalizes the curves so that the range 2k to 2^"'"^ is squeezed into the range of 0 to 1.) Figure 4 illustrates my visualization and shows the beautiful but intricate relationships between successive humps. This plot was computed for the first 2048 points in the Batrachion, and I placed dots at the vertices of the first few humps. As the frog hops closer and closer to infinity, these curves become more squat and begin to hug the ;; = 0.5 line. Interestingly, it is not clear how one hump in the Batrachion is generated from the previous hump. As Colin Mallows of AT&T has pointed out, «(100), which is located in the sixth hump, is computed as a(fl(99) + a(100 - a{99)) = a(56) + ^(44) = 3 1 + 2 6 + 57. This shows that a point in hump 6 is generated from two points in hump 5 which are far apart. Fve chosen one way to represent the complex
relationship between the two terms by plotting a(a{n - 1)) (i.e. the first term of the Batrachion formula) and a{n — a{n — 1)) {i.e. the second term) as X and y in an x-y plot (Fig. 5). (The terms are normalized by dividing by n prior to plotting.) Notice the unusual clustering of points toward the bottom of the plot corresponding to the decay of the Batrachion as it jumps to infinity. OTHER BATRACHIONS
When I first became interested in this class of curves, I thought there surely would be other famous Batrachions. I was right. Figure 6 shows a Batrachion computed from a very similar looking, recursive integer sequence: Q{n) = Q{n - Q(n - 1)) + Q{n - Q{n - 2)). This sequence was mentioned in Hofstader's [4] famous Goedel, Escher, Bach, but no figure was given to show its magnificent and bizarre behavior. (The sequence of numbers produced by this formula are sometimes called Q-numbers.) The first few hundred values show striking regularity, but I do not know if the regularities persist. There is obviously some subtle pattern that is difficult to define. The behavior of this function as it approaches infinity is not known. Does a{n)/n eventually converge to 0.5? The virtual frog seems to be rather nervous, or perhaps high on LSD. There are periodic bursts
0.70 0.45
0.65 h
0.40 h
0.35 h
;0.60
0.55
0.50 0.4 0.6 (n - 2'^) / 2^
Fig. 4. Renormalized Batrachion to show fractal structure. (See text and program code for more information.)
0.20 0.15
0.20
0.25 0.30 a[a(r>-1)]/n
0.35
0.40
Fig. 5. First and second terms of the Batrachion as x and y.
130
C. A. Pickover are continuous but quite jagged) are a rich mine of paradoxes. They're produced by: oo
w{t) = ^
A^ COS B^t
k=\
0
500
1000 n
1500
2000
Fig. 6. Visual representation of Hofstadter's Batrachion. which noisily decay to around 0.5 until another rapid hop starts again. How could such a simple integer formula give such complexity? Finally, another Batrachion, Mallows' Batrachion, is defined by: a{n) — a(a{n — 2)) + a{n — a{n — 2)) This also has an intricate humped structure. N o one knows if a{n)/n tends to some limit for this Batrachion.
THE CRYING OF FRACTAL BATRACHIONS Various authors, such as Manfred Schroeder [2], have discussed how mathematical waveforms sound when converted to time waveforms and played as an audio signal. For example, Weierstrass curves (which
where AB > 1 + 3n/2. If recorded on a musical tape, and replayed at twice the recording speed, the human ear will unexpectedly hear a sound with a lower pitch. Other fractal waveforms do not change pitch at all when the tape speed is changed. It is rumored (but I have not confirmed) that the first Batrachion described in this paper produces a windy, crying sound when converted to an audio waveform. I would be interested in hearing from readers who have conducted such audio experiments on any of the Batrachions. For other musical mappings of number sequences and genetic sequences to sound, see my book Mazes for the Mind: Computers and the Unexpected [5]. The BASIC and C program codes in the current paper are a launchpad for future exploration [6]. REFERENCES 1. J. Conway, Some crazy sequences. Videotaped talk at AT&T Bell Labs, July 15 (1988). 2. M. Schroeder, Fractals, Chaos, Power Laws, Freeman, New York (1991). 3. C. Mallows, Conway's challenge sequence. American Mathematics Monthly January, 5-20 (1991). 4. D. Hofstadter, Goedel Escher Bach, Vintage Books, New York (1980). 5. C. Pickover, The drums of Ulupu. In Mazes for the Mind: Computers and the Unexpected. St Martin's Press, New York (1993). 6. C Pickover, Keys to Infinity. Wiley, New York (1995).
The BASIC and C Program Codes are Given Opposite
131
The crying of fractal Batrachion 1,489
fd 0)
o o c
1—1
II
«
II
o
H - P
.-.
H 1
\ _ ,^*
o
w
c o •H
o td 4-) (d ffl •^
•^
^^
G
rj
I
+ c
•*
•-
00
CO O ^ + , K '^ o 'IT '^ n
^
• • o ,n; -H -p 13 (d -p
o •- o ""• o < II„ o
•H iH rH II OJ V ttdi II CD -p g H 5^ fd H O H
(U a;
fd
fd
>
c "fd n3 td ^ corresponds to one with X < 5 with the roles of "live" and "dead" cells interchanged.) Langton argues that class I and II are analogous to solids, class III to fluids, and class IV to the phase transition, with X playing the role of temperature. The correspondence is subtle, however, but is more faithfully represented in examples as the denominator of X becomes larger
Instead of pursuing these global issues, we consider four examples illustrating how small changes in the initial configuration can lead to considerably different behavior, changing the Wolfram class of the pattern. Example 1: Consider the automaton given by the rule (0,l,l,0,0;0,0,l,0,0).ThetopofFig. 1 shows the pattern evolving from a single live cell. As usual, each successive generation is plotted below its predecessor, so time increases down the picture. Also as usual, the boundary conditions involve a wraparound: the left edge of the picture is identified with the right edge. The bottom of Fig. 1 shows the pattern evolving from two adjacent live cells. Until the "interference" from the wraparound returns the original pattern, we observe a version of the Sierpinski gasket. If this automaton had infinite extent (no wraparound), the patterns shown at the top part of each picture would persist forever and we see the addition of a single live cell to the initial configuration changes the asymptotic pattern from Wolfram class 3c to 3b. Taking three adjacent live cells as initial state gives a gasket even with the wraparound. Example 2: For the automaton given by the rule (0,1,1,0,0; 0,0,1,1,0), the top of Fig. 2 shows the pattern evolving from a single live cell, while the bottom of the figure shows the pattern evolving from two adjacent live cells. Again a gasket emerges, even after the wraparound (though note the appearance of some perturbations after the wraparound). Here the addition of a single live cell changes the final state from Wolfram class 3a to 3b. Example 3: In Fig. 3 we see patterns generated by the rule (0,1,1,1,0; 0,0,1,1,0). The top is the pattern evolving from a single live cell, the bottom, the pattern
Fig. 1. The pattern evolving for the outer totalistic automaton with rule (0,1,1,0,0; 0,0,1,0,0). Top: from a single live cell. Bottom: from two adjacent live cells. Adding the additional live cell to the initial configuration changes the Wolfram class from 3c to 3b.
Sensitivity in cellular automata
151
Fig. 2. The pattern evolving for the outer totalistic automaton with rule (0,1,1,0,0;0,0,1,1,0). Top: from a single live cell. Bottom: from two adjacent live cells. Adding the additional live cell to the initial configuration changes the Wolfram class from 3a to 3b.
evolving from two adjacent live cells. Until the wraparound, the change in final states is especially striking— from Wolfram class 3c to 3a. After the wraparound, we observe the appearance of yet another gasket.
From these three examples, we might be led to some hypotheses (perhaps about the ubiquity of gaskets), but considering the number of different automata mentioned above, we know such speculations are silly.
Fig. 3. The pattern evolving for the outer totalistic automaton with rule (0,1,1,1,0,0,0,1,1,0). Top: from a single live cell. Bottom: from two adjacent live cells. Adding the additional live cell to the initial configuration changes the Wolfram class from 3c to 3a, before the wraparound.
152
M. FRAME
Fig. 4. The pattern evolving for the outer totalistic automaton with rule (0,1,1,0,0;0,1,0,1,1). Top: from a single live cell. Bottom: from three adjacent live cells. Adding the additional live cells to the initial configuration does not change the Wolfram class, but does give rise to a "laughing skull" near the middle of the picture. In fact, in our final example, the automaton exhibits completely different behavior. Example 4: Consider the rule (0,1,1,0,0;0,1,0,1,1). The top of Fig. 4 is the pattern evolving from a single live cell. From two adjacent live cells, a similar pattern grows—no different final state, no gasket. The bottom of Fig. 4 shows the pattern from three adjacent live cells. We chose to show this instead of the two-cell pattern of the earlier figures because of a surprise: notice the "laughing skull," which has appeared about twothirds of the way below the initial live cells (Fig. 5). Outer totalistic rules produce bilaterally symmetric patterns from symmetric initial conditions, and human forms are (approximately) bilaterally symmetric, but
the appearance of this skull looking out of the screen was unexpected. Without the wraparound, in Example 1 we observe Wolfram state 3c evolving from a single live cell, while 3b evolves from two adjacent live cells. In Example 2 we see 3a and 3b from one and two live cells. In Example 3 we see 3c and 3a from one and two live cells. Where do the patterns of Example 4 fit into this classification? Letting the automaton run long enough, the lacy structures and laughing skulls eventually disappear, leaving only the periodic background. That is, the interesting structures we see in this example are just transient phenomena. From these observations we are led to the natural
Fig. 5. Left: the laughing skull excised from the bottom of Figure 4. Right: a magnification of the skull, set against a grey background for contrast.
153
Sensitivity in cellular automata
Fig. 6. A portion of initial configuration space for the automata of Examples 2 and 3. The initial configurations sampled consist of two blocks of n live cells, separated by a block of/c dead cells, for 1 < n, k < 20. Here black represents class 3a, white 3b, and grey 3c.
problem of constructing a " m a p " of which initial configurations give rise to which final states. How to represent this map is another problem: the array of initial conditions is so vast that a low-dimensional representation of the all possibilities cannot be achieved. Here we shall content ourselves with a small slice of initial condition space, two blocks of n live cells, separated by a block of A: dead cells, for 1 < « , / : < 20. The results for Examples 2 and 3 are presented in Fig. 6. Here black represents class 3a, white 3b, and grey 3c. While the final states are intertwined in a complicated way, we have not examined a large enough section of initial condition space to conclude the sets leading to a particular state (the basin of attraction of that final state) have fractal boundaries. The evidence of this small sample does not support that notion, but then perhaps we have seen an unrepresentative choice of section through initial condition space. Typical experiments with cellular automata usually focus on patterns evolving from a single live cell or from a random distribution of live cells. Readers may find some interest in the type of exploration suggested by these examples: compare the final states arising from starting configurations differing by a small amount. Though nevy; behaviors from individual conditions are unlikely, the global structures revealed in initial condition space may exhibit considerable complexity. In the absence of an analytic formulation of automaton evolution, this type of graphical exploration, perhaps augmented by automated initial condition selection and final state pattern recognition, is the best avenue for studying final state sensitivity in cellular automata.
with "edge cells" c[ 1], c [ 2 ] , c[N -\- 4 ] , and c[N + 5] to accommodate wraparound. If cell / is alive, c[i] = 1; if cell / is dead, c[i] = 0. For / = 3 to A/^ + 3, Z?[/] are buffer cells, keeping track of the next generation of cells without changing the current generation. The generation number (number of iterations of the automaton rule to the entire configuration) is represented by the integer gen. Assign initial configuration to c[/] for / = 3 to TV + 3 gen = 1 Plot For /• = 3 to A/^ + 3 plot a dot at pixel (/, gen) if c[i] = 1 Assign edge cells c[\] = c[N+2],c[2] c[A^+ 5] = c[4]
c[A^+3],c[A^+4] = c[3],
Evolve For / = 3 to A^ + 3 Nbhd Number = ( 2 A ( c [ / - 2] + c[i - I] + c[i + l] + c[/ + 2 ] ) ) * ( c [ / ] * 3 2 ) Nbhd Number is a power of 2. If this power of 2 occurs in the binary representation of the Rule Number, then b{i] = 1, else b[i] = 0. gen = gen + 1 Rename
For / = 3 to A^ + 3 c[i] = b[i] Repeat: Plot, Assign edge cells. Evolve, Rename.
Automaton Pseudocode (outer totalistic, radius = 2, binary, linear) Outer totaUstic rule (do^dudj^d^,d^^\OQ,«I,^2,^23, 1). For example, we apply the formulas for the case « = 4. Let the cell labeled by the origin be 10 paces above the hyperplane partitioning the desert from the oasis. We want to sum the highest oasis cell values until the sum is at least as large as 1.
Fig. 9. A representation of nested half prisms.
167
Scouts in hyperspace
-7 K-b—
Table 1. Paces into the desert
Dimension
Lower bound on army size
I 4 7 10 13 16 19
1 2 3 4
5 6 7
\
Our best army size
2 20 193
2 20 209
2009 21,282 228,002 14,910,005
3912
— — —
1 \ \\
\ \—' k
r« k k
•
k k
Computing g{4, k) (or 0 ^ k ^ S yields the following sequence: 1, 7, 25, 63, 129, 231, 377, 575, 833. Hence to obtain a lower bound on the army size we sum 1 cell as l5'°, 7 cells as ls^\ 25 cells as 255*^ 63 cells as 635'^ 129 cells as [29s^\23l cells as 2315^^ 377 cells as 377J'^ 575 cells as 5 7 5 j ' ^ and 601 out of 833 cells as 6015*^, the sum of which is slightly larger than 1. Thus no fewer than 2009 soldiers are needed to advance a scout 10 paces into the desert. The other values in the third column of Table 1 are obtained in the same manner. For a configuration of army size of 209 allowing a scout to advance seven paces into a three dimensional desert, write the authors. We conjecture that the bound of 3n - 2 paces is realizable for « > 4, but we leave the development of an algorithm as an open problem for the reader.
- 5 'V ' 3 -I - / k \ ^— \ \
'v
k k il
\ \\ \ \ \ \
[\
v
\
y
N
\
\ "•; i \ \
\ \ \ -•
\
/
3• ^ ^ ^
>/ / / / / / m / / / / 1 / / / "/ • / 1/ / // / j 't 1—7 / • • m• • V / •1 / / -3 / / / "vTM\ ^ 1 / m / ^ \^\ I—i '5 / / •• Vb / / / «C—f / / / P / / A -1 / / / p' P p P • / '» *x / • -9 / // • / • ^/ / // / -JO • P! • /. •1 /
>J
A
x.^y_
-^ j
v
J \
1\
•J -I -1 \
\ \ \ \
\_
1 t ^o'l /' / / 0
1
0
/ / -1 '/ / / 1
>•/•
\ \ • \ / / \ J ^ 1* )», ^9 •^ p P\ 1 \ J \ X '• '• P\ , •^ ^«i • 0 ,# \ • / '7 j \ \ i jv
> • /
r
Fig. 12. A configuration for which the automata rules achieve success, enabling a scout to advance four paces into the desert.
the same prism as B. That is, let cell A lie on row a,, column ^2, and prism ^3; and let cell B lie on row bx, column 62, and prism 63. Cell A ranks higher than cell B if and only if any of the following conditions hold. • a3>
bi
• a:i'= b^ and a\ < bi • a-i^ b-i and ax - bx and a^ > bz.
Coluttttts K
1 \ K \
r— "^ N
N
«;^— \ r——1 / \ N \ \ '^'' / V
\\ \ V \^ s \ V • • ^• k \ \ ^ v \ \ \ *^ /• J.—\ •^ >t ^ ^» J^ 1 •X • • # ^ X >X • m '•| \m >i ^ ^ X iX m m mX • ^* [• • • • >¥ ## ^•' *#' 4 it ^ n • V V •^ ¥ > < V • •.^ • >i %,^^ P V^c ^ * v ^J
r
N
7
/ /
/
•
/
—7 '~7
/
/
/•
/ /
/
•
/
f( 4 P #
/\ o /• j -1 / j
/ / /
A f\
P P P m m' y ;» • > ^ A m\ V M • ^# J* • l •7 ¥ P • P ,• A 8 P •" m ^ y p \ •9 > > ?^ p' • • J • • ^ P • 1 11 c •
Fig. 10. The half prism structure superimposed on the two dimensional playing board, along with a rectangular array of pegs in the oasis.
7
/
Fig. 11. The result of implementing the automata rules for the configuration of Fig. 10.
SCOUTS AS AUTOMATA
In order to view this game as automata moving themselves about on the board we define a ranking of the cells on the board by using nested half prisms (see Fig. 9) along with a lexicographic-like order on the coordinates of the cells in those prisms. In particular for « = 2, we superimpose the nested half prisms (using dashed lines) on the checkerboard as in Fig. 10. Label each prism with the row number of the cell on the apex of the prism. For any two cells A and B, we say that A ranks higher than B if A is on a "higher" prism than B or if A is "lower down" on
\
,X
\ \
\
3^
k
^\ \ ^ 1^^^— '' \
\ \ \ \ ' \
v
\
0 X^z
Table 2. From
To
(-5, 0) (-4, 2) (-4, 0) (-4, - 2 ) (-7, 0) (-5, 2) (-6,-1) (-6, 2) (-6, 0) (-5, - 3 ) (-5,-1) (-4, - 4 ) (-7, - 2 ) (-3, - 2 ) (-4, 0)
( - 3 , 0) (-4, 0) (-2, 0) (-4, 0) ( - 1 , 0) (-5, 0) (-4,-1) (-6, 0) (-4, 0) (-5,-1) (-3,-1) (-4, - 2 ) (-3, - 2 ) (-3, 0) ( 0, 0)
(in 3 jumps)
(in 2 jumps) (in 2 jumps)
168
SHERRI SHEPARD and AXVDREW SIMOSON
Define ^feasible move as a jump in which the jumping peg either moves nearer to column zero (thereby decreasing the magnitude of its column number) or further up the board (thereby increasing its row number). Allow an army of pegs positioned on the board to move according to the following rule. Locate the peg residing in the cell of highest rank which is also part of a feasible move; perform that jump (wherein a jump towards column zero has precedence over a jump up the board). Applying this iterative procedure to the rectangular array of soldiers in Fig. 10 results in the somewhat chaotic arrangement of pegs as in Fig. 11. However, this iterative procedure achieves success with the configuration of Fig. 12, as the listing of moves in Table 2 attests. (Each line of Table 2 lists the initial and final coordinates of the jumping peg. The first component of each ordered pair is the row number, and the second component is the column number.)
We suspect that for higher dimensions, there exist sets of analogous rules for which various configurations of soldiers can collectively advance 3« - 2 paces into an n dimensional desert. But finding these rules and configurations is no easy task, even when /i = 3. Acknowledgement—We wish to thank Dr. Clifford Pickover for producing the fine color plate as well as for his encouraging words in the refinement of this paper.
REFERENCES
1. J. D. Beasley, The Ins & Outs of Peg Solitaire, Oxford University Press, Oxfordshire (1985). 2. E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways for Your Mathematical Plays, Academic Press, London (1982). 3. A. Simoson, Scouting out tilings. / Recr. Math. 20, 8186(1988). 4. A. Simoson and S. Woolley, More scouts in the desert. J. Recr. Math. 20, 27-31 (1988).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
169
Chaos and Graphics
SIERPINSKI FRACTALS AND GCDs CLIFFORD A. REITER
Mathematics Department, Lafayette College, Easton, PA 18042, USA, e-mail:
[email protected] Abstract—The Sierpinski triangle, carpet, and pyramid, along with the Menger sponge, are well known twoand three-dimensional fractals. The fact that these fractals are constructed in a similar fashion is made evident by showing that discrete versions of these all arise using inner products involving greatest common divisors and least common multiples on matrices involving base two and three addresses. These constructions admit generalization to arbitrary dimension and base. 1. INTRODUCTION
The Sierpinski triangle is a well known fractal that appears as a triangle with a triangular central region missing and smaller triangles removed from the remaining ones (Fig. 1). The Sierpinski triangle was described years ago [ 13 ] as a limit of curves. Discrete versions can be constructed from Pascal's triangle mod 2 and, hence, via one-dimensional finite automata. For further discussion and generalizations of Pascal's triangle see [2, 8, 9, 12, 15]. The discrete Sierpinski triangle has also been constructed and generalized using simple bit operations and modular arithmetic [ 5, 6, 912]. It is also is often viewed as the attractor of an iterated function system [1]. This paper connects the construction of the Sierpinski triangle with other classical fractals. One of these is the Sierpinski carpet, which has missing squares instead of triangles. The Sierpinski carpet also has interesting topological properties! 8, 14]. Likewise, three- and higher dimensional fractals related to the Sierpinski triangle and carpet have also been considered[3, 7, 8, 10] and will also be constructed later in this paper in a way consistent with the two-dimensional case. Among these three-dimensional generalizations are the Menger sponge and the Sierpinski tetrahedron. There are operators called ''inner products" defined in the programming languages APL, J, and Mathematica that generalize the usual matrix product. These are generalized matrix products in the sense the operations may be specified: so instead of the sums of pairwise products computed with the usual matrix product, we may use other functions in place of the sums and the products. Generalizations of the Sierpinski Triangle and other fractals using elementary operations organized into an inner product of a matrix with its transpose have been investigated [11]. While that work showed the Sierpinski triangle is constructed as an inner product in many ways, this note uses a particular inner product, not appearing in there, that involves the number theoretic functions GCD (greatest common divisor) and LCM (least common multiple). This inner product is used to construct the classical Sierpinski triangle as a 0-1 matrix. First, an auxiliary
matrix which contains the base-two representations of the row addresses is constructed. That is, the auxiliary matrix has rows that are the base-two representations of 0, 1, 2, etc. The Sierpinski carpet arises from exactly the same computation but using base three addresses in the auxiliary matrix. Using addresses in other bases give generalizations of these fractals. Moreover, these GCD-LCM constructions can be extended to «-dimensional fractals in natural ways where the Sierpinski tetrahedron and the Menger sponge arise in dimension three. 2. TWO DIMENSIONS
We will use the language J to describe our ideas since the notation is precise, it allows inner product constructions, and it is readily available on many platforms. See [4] and Appendix A for details on J and its availability. The language J uses ASCII symbols, sometimes with a dot or colon as a suffix, to designate common mathematical functions. The reader unfamiliar with J may want to browse the brief glossary (Table 1). We begin with some numeric examples that are smaller cases of the images we will consider. The symbol +. is used for GCD and *. is used for LCM. Notice that on Booleans, GCD is the same as "or" and LCM is ''and." Some small examples: 0 1+/0 1 NB. P l u s t a b l e 0 1 1 2 C0 l + . / O 1 NB. GCD t a b l e 0 1 1 1 0 l * . / 0 1 NB. LCM t a b l e C 0 0 0 1 Next, we construct the auxiliary matrix whose rows are the base-two addresses of the numbers zero to seven. Then, we take the regular matrix product and the GCDLCM product of that matrix with its transpose.
Reprintedfrom Comput. & Graphics Vol 18, No. 6, pag. 885-891, 1994
170
C. A. REITER
NB. first 8 addresses
i.8 0 12 3 4 5 6 7 X = .1^:i.8
NB. rows of X are 3 digit base 2 addresses
X
0 0 0 O 1 1 1 1
0 0 0 1 10 i l 0 0 0 1 1 0 1 1
|:x
NB. transpose of x
0 0 0 0 1 1 1 1 0 0 11 0 0 11 0 10 1 0 10 1
x + / . * I: X 0 0 0 0 0 0 0 0
NB. Matrix product of x with its transpose
0 0 0 0 0 0 0 10 1 0 10 1 0 11 0 0 11 1 1 2 0 1 1 2 0 0 0 1 1 1 1 10 1 12 12 0 11 1 1 2 2 1 1 2 12 2 3 X +.. X 0 0 0 0 0 0 0 10 1 0 10 1 0 11 0 0 11 1 1 1 0 1 1 1 0 0 0 1 1 1 1 10 1 1 1 1 1 0 11 1 1 1 1 1 1 1 1 1 1 1
/ . *. I: NB. The GCD-LCM inner product
0 0 0 0 0 0 0 0
The zeros in the matrix resuking from the GCDLCM inner product mark the positions of the discrete Sierpinski triangle that would be lit if the array were to be viewed as a graphics image. Notice we can think of each entry in the matrix as being the GCD of the list of pairwise LCMs of the base-two representation of the row and column indices (starting with index 0).
In general, it is convenient to introduce a function, g i t , for constructing these GCD-LCM products of a matrix with its transpose. The function g i t takes the auxiliary matrix as its right argument. The auxiliary matrix lists addresses in the desired base. Thus g i t #: i . 8 would duplicate the GCD-LCM inner product example given above.
glt=. +./ . *. |: NB define the function git NB base 3 GCD table 0 1 2 +./ 0 1 2 0 12 1 1 1 2 12 0 12 0 0 0 0 12 0 2 2 |:x=.3 0 0 0 1 1 0 1 2 0 1 git X 0 0 0 0 0 0 1 2 0 1 0 2 2 0 2 0 0 0 1 1 0 1 2 1 1
*./ 0
12
3#:i.9 1 2 2 2 2 0 1 2 0 2 2 1 1
0 0 0 2 2
0 1 2 2 1
0 2 2 2 2
NB
base 3 LCM table
NB
Transpose of 2 digit base 3 addresses
NB
GCD-LCM product on addresses in x
(Cont'd.)
171
Sierpinski fractals and GCDs {Cont'd.)
0 0 0 0
2 0 1 2
2 0 2 2
1 2 2 2
3. THREE DIMENSIONS
1 2 1 2
1 2 2 2
2 2 2 2
2 2 1 2
2 2 2 2
Notice above that when the same inner product that gives the Sierpinski triangle is applied to matrices giving the base-three representations of the row and column indices, the Sierpinski carpet results in the sense that the Is mark the holes. A glance back at the base-three GCD and LCM tables makes apparent the special role played by the Is in this matrix. Fig. 1 shows the Sierpinski triangle constructed with 11-digit binary representations: g i t # : i . 2 ^ 1 1 . Fig. 2 shows the result of 6-digit base-three computation: g i t ( 6#3 ) # : i . S'^e . Here, black, white, and orange correspond to 0, 1, and 2, respectively. Notice this is the classical Sierpinski carpet with additional internal structure highlighted. The fabric has a preponderance of red along with a fractal black component. It is easy to look at other bases as well. A matrix arising from 2-digit base-four representation of addresses is shown next.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
git 0 0 0 12 3 2 2 6 3 6 3 0 0 0 12 3 2 2 6 3 6 3 0 0 0 12 3 2 2 6 3 6 3 0 0 0 12 3 2 2 6 3 6 3
4 4# :i A' 0 0 0 0 0 1 2 3 0 2 2 6 0 3 6 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 1 2 1 2 2 2 2 2 1 2 1 3 3 3 3 3 1 1 3 3 1 1 3 3 3 3 3
2 0 0 0 0 2 2 2 2 2 2 2 2 6 6 6 6
0 1 2 3 2 1 2 1 2 1 2 1 6 1 2 3
0 2 2 6 2 2 2 2 2 2 2 2 6 2 2 6
0 3 6 3 2 1 2 1 2 1 2 1 6 3 6 3
0 0 0 0 3 3 3 3 6 6 6 6 3 3 3 3
0 0 0 12 3 2 2 6 3 6 3 3 3 3 1 1 3 1 1 3 3 3 3 6 6 6 12 3 2 2 6 3 6 3 3 3 3 1 1 3 1 1 3 3 3 3
Notice that the base-four matrix forms a pattern very similar to the Sierpinski carpet with wider holes, if the Is and 2s are viewed as forming the "holes." Also notice that while the addresses are base four, the GCDs of the LCMs include 6 as a possible outcome. Fig. 3 shows this construction for base four, and Fig. 4 shows it for base seven. Fractional bases can also be used. The fractional base 2.5 forms a jumbled woven pattern.
The construction in 2 dimensions was to take the G C D of pairwise LCMs of the digits of the row and column addresses of the position considered. There are multiple generalizations of this to 3 and higher dimensions. In three dimensions, there are 3 addresses that need to be combined to correspond to any given position. The first generalization we consider is to construct GCDs of triple-wise LCMs. The function g l , given in detail in Appendix A, takes a left argument giving the dimension of the fractal, while the right argument is the auxiliary matrix whose rows give the addresses in whatever base is desired. Below, base two is used. The expression < " (2) boxes the 2-dimensional cells of the resulting 3-dimensional array since it is convenient to view a 3-dimensional array as a boxed vector of matrices. Notice there are a large number of Os which correspond to the fractal in this example.
0, 00010 -* 0, • • •, l l l l O - * l,and 11111 -* 1. There are many ways to condense this binary sequence to shorter sequences with larger bases. For example, this 32-bit pattern can be rewritten in a sequence with 10 digits if the base is 10 {Le., 3586441369), 11 digits if the base is 8 {i.e., 32561140231), with 7 alphabets if the base is 26, or with 4 numbers if the base is 256 {i.e., 213,196,192,153), etc. Unsure of which representation is the best, I will adopt the last approach, i.e., using 4 numbers with 256 as the base, throughout this paper. Take the rule in Fig. 1, for example; the way to do this is to split the 32-bit sequence into four segments: 11010101, 11000100, 11000000, 10011001, and use the decimal equivalences 213, 196,192,153 as the rule label. The picture in Fig. 1 is typical for a class of rules with "gliders," i.e., stable configurations on the background moving with certain speed. For example, if we look at the "thread" on the "net" carefully, we can find that one of the gliders in this picture is the configuration 01000 (on the background of Ts), which moves to the left by one site after each updating. The "knots" are the collisions between gliders. Will the dynamics in Fig. I run into an equilibrium state, causing the pattern to be boring? The readers can activate their own numerical simulation as a test. Although most of the time two gliders emerge when two
Reprintedfrom Comput. & Graphics Vol. 13, No. 4, pag. 531-537, 1989
178
VVENTIAN LI
Fig. 1. Pattern produced using rule (313,196.192,153). Another vvav of writing this rule is: 11010101110001001100000010011001 (see text).
gliders meet, occasionally, only one glider survives such a collision. Besides, it is never observed that extra numbers of gliders are produced. As a consequence, the number of total gliders is decreasing, and the "holes" in the net become larger and larger, though with an extremely slow expansion rate. CREATURES
Fig. 2 shows the pattern generated by rule (78,158,206,33). It looks like a pine tree. If we wait long enough, all the branches of the tree stop growing, and only the background remains. It is quite common for cellular automata rules to have nontrivial patterns in the transients. Two other cellular automata rules with the similar amazing structures in transients are shown in Figs. 3 and 4. Fig. 3 is generated by rule (130,36,202,62) and Fig. 4 is by rule (123,140, 162.141). The purpose for including these pictures is to show that not all the complicated structures produced by the cellular automata are glider activities. It is possible to have configurations, distinctive from the background, moving in irregular ways, rather than the fixed speeds for gliders. In most of the cases, these are transient behaviors. I call these moving objects in the transients creatures. The source for the irregularity of the creatures' movement is the structures in the back-
ground, such as the checkerboard-like configuration • • • 1 lOl 1011 • • • in Fig. 2. The interaction of the creatures with the background makes their movement irregular. If the background is homogeneously all O's, the objects will only moved with fixed speeds. RANDOMNESS AND REGLLARfTV Fig. 5 shows the pattern generated by rule (166,252,133,49). For this pattern, the background (dark area), instead of being of periodic patterns, is as complicated as the creatures themselves (light area). It might be more appropriate, at least during the transient period, to describe them as two different phases than as background and creatures. Another feature I want to point out is the practical unpredictability for the details of the pictures, even though the rule is purely deterministic. Of course, one has to be reminded that the initial configuration is random, but without some aspects of the cellular automaton rule itself, the complex structures will not necessarily be generated or maintained. Fig. 6. for rule (205.233,162,25), shows another example for a deterministic cellular automaton rule to generate pictures typical for nondeterministic rules. Sometimes, even when the initial configuration is random, the pattern generated can be astonishingly regular. Fig. 7 is generated by rule ( 195,188,227.144).
Complex patterns
Fig. 2. Pattern produced using rule (78,158,206,33).
Fig. 3. Pattern produced using rule (130,36,202,62).
179
180
WENTIAN LI
Fig. 4. Pattern produced using rule (123,140,162,141).
Fig. 5. Pattern produced using rule (166,252,133,49).
Complex patterns
Fig. 6. Pattern produced using rule (205,233,162,25).
Fig. 7. Pattern produced using rule (195,188.227,144).
181
182
WENTIAN LI
It gives an impression that 3-dimensional tetrahedrons are piled up one next to another. This illusion is achieved partly by the existence of the "third color," grey, which is actually checkerboard configurations • • • 00110011 • • •. The amazing thing about this rule is that it accomplishes the fractal-like arrangement of the tetrahedrons from a random initial configuration! (By the way, this rule was discovered accidentally.) There are other patterns generated by some rules which are less spectacular than the one in Fig. 7, but the readers can also see large-scale structures emerging from random configurations [e.g.. Fig. 8, for rule (206,176,186,98)].
There are two empirical tricks, though, which I use to enhance the possibility to get interesting pictures in this seemingly hopeless random searching. First, do not fill the rule table with too many 1 's or too many O's. Actually, for the next nearest neighbor cellular automata rules, something close to half O's and half I's is about appropriate. The reason can be explained as the following: if there are too many O's in the rule table, there is a greater chance that any 5-neighbor configuration will be mapped to state value 0. Consequently the pattern generated tends to have a lot of O's which can hardly be an interesting situation. The same argument can be applied to the situation with too many 1 's. A more quantitative study has been carCREATE YOUR OWN PRETTY PICTURES ried out in [6, 7], which shows that the optimal filling The number of cellular automata rules with next density in the rule table for interesting rules is not acnearest neighbors couplings is very large. Since there tually 0.5, and this optimal density moves away from are 2^ = 32 possible 5-neighbor configurations, and 0.5 when more and more neighbors are included in each of them can map to either 0 or 1, there are 2^" the coupling. The above statement is correct only in = 4294967296 possible rules. Even if we can produce the statistical sense. For next nearest neighbors cellular a spatial-temporal pattern from each rule in 1 second, automata rules, I still recommend anyone starting the it is going to take about 138 years to run through all simulation from rules with half-filled rule tables. the rules. Considering the redundancy due to the The second trick: once you observe a pattern you equivalence between rules upon 0-to-l transforma- consider to be interesting, record the rule in the form tions, which will cut the time by half, it still requires of 32-bit sequence and gather new rules by randomly a solid 69 years. Obviously, I did not look at all of flipping one or more bits in the rule table. Sometimes, them. There are chances that other interesting patterns flipping even one bit can alter the features of the origwill be discovered by searching further. inal pattern completely. Other times, the new pattern
Fig. 8. Pattern produced using rule (206,176,186,98).
Complex patterns
Fig. 9. Pattern produced using rule (195J 88,227 J 46). This is a close relative of the rule for Fig. 7, produced by flipping the third bit from the right in the rule table (from 0 to 1).
is almost the same with the old one, but there are chances that you might end up with fresh pictures with interesting new looks. For example, the rule which produces the picture in Fig. 9 is a ''close relative'' of the rule in Fig. 7, by flipping the third bit from the right in the rule table from 0 to 1. [It is rule (195,188,227,146).] Comparing the two patterns, we see little similarities. Some other pictures generated by next nearest neighbors cellular automata are collected in [8 ]. I saw even more patterns on the computer screen but I didn't have the chance to print them out. I wish that more wonderful ''cellular automata arts" will appear in the future. Acknowledgements—This paper has grown from a Technical Report[8]. I would like to thank Stephen Wolfram for providing the original graphic program, and Cliff Pickover for encouraging me to write the material in the present form. The work I have carried out at the Center for Complex Systems Research was partly supported by the National Center for Supercomputing Applications at the University of Illinois, and
partly by the National Science Foundation grant PHYS-8658062. REFERENCES 1. J. von Neumann, The theory of self-reproducing automata. In A. W. Burks (Ed.), Essays on Cellular Automata y University of Illinois Press, Champaign, IL (1966). 2. C. Langton, Self-reproduction in cellular automata. In D. Farmer, T. Toffoli and S. Wolfram (Eds.), Cellular Automata, North-Holland, Amsterdam (1984); [ reprint of Physica D 10(1/2), 135-144 (1984)]. 3. J. Gleick, Chaos: Making a New Science, Viking, New York (1987). 4. S. Wolfram, Cellular automata as models of complexity. A^fl/wr^ 311 (5985), 419-424 (1984). 5. S. Wolfram (ed.), Theory and Application of Cellular Automata, World Scientific, Singapore (1986). 6. C. Langton, N. Packard and W. Li, Bifurcation-like phenomena in cellular automata rule space (in preparation) (1989). 7. W. Li, Problems in complex systems. Ph.D. Thesis, unpublished, Columbia University, New York (1989). 8. W. Li, Pretty pictures generated by two-state five-neighbor cellular automata. CCSR Technical Report No. 15, University of Illinois (1988).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
185 Chaos and Graphics
ON THE CONGRUENCE OF BINARY PATTERNS GENERATED BY MODULAR ARITHMETIC ON A PARENT ARRAY AKHLESH LAKHTAKIA
Department of Engineering Science and Mechanics, Pennsylvania State University, University Park, PA 16802-1401, USA and DANN E. PASSOJA
410 East 73rd Street, New York, NY 10021, USA Abstract—Presented is the idea of the congruence of binary gaskets generated using modular arithmetic operations on a parent array. It is seen that the binary gaskets of prime orders are nontrivial, while the binary gaskets of nonprime orders are congruences. Because material microstructure plays a vital role at nanoscopic scales [1-3], studies on gaskets have become of considerable importance in materials science (e.g., [4-6]). Inevitably, these and similar developments in other fields have spawned interest in cellular automata and patterns for their own sakes[7, 8], and several reports (e.g., [9-11]) have come forth in the pages of this journal. In a recent paper, we looked at the esthetics of square patterns generated by a simple rule involving modular arithmetic with reference to their CIE chromaticity diagrams! 12]. During that work, and a subsequent follow-up involving some variations of Khayyam's triangle [ 13 ], we chanced upon the concept of congruence of two or more gaskets. The present paper is motivated by a desire to communicate the results of our investigations on congruence. We also note a paper by Sakamoto and Takagi[14], on patterns with residue arithmetic, that was brought to our attention recently. Let .G/ be an array of positive integers 0 arranged on the nodes of a lattice in «-dimensional space, n > 1; here r is the positional «-index. From this parent array s^ we generate a second array ^(q) with elements hXo) such that ^Xn) = 1 , if flrinod ^ = 0, and b,(g) = 0, if
armodq¥^0,
where the integer ^ > 2; we call g the order of the binary gasket ^(q). For the graphical representation of ^(g), br(g) = 1 is depicted by a black pixel, and br(g) = 0 by a white pixel. To serve as an example, we choose the 2-dimensional parent array s/ generated by the rule [13] an,o = ao,n = 1
V« > 0,
but ^n,m — Cln-\,m-\
+ ^n,m-\
+ ^«-1,/M»
the rule being easily implementable in modular arithmetic. The algorithm, as implemented in BASIC, is reproduced here. Shown in Figs. 1-3 are the corresponding ^ ( 3 ) , ^ ( 5 ) and ^ ( 1 5 ) . Definition 1: We define the congruence ^(g\\g2) = {^(^i);^(^2)} of ^ ( ^ i ) a n d ^ ( ^ 2 ) i n the following fashion: Cr((l\\Q2) =
br(gi)br(g2).
On recalling the binary natrue of br(g), it is easy to see that Cr(gi igi) is the result of an AND operation in the language of Boolean algebra. This definition can also be extended to higher congruences; thus, the element Cr(gi\g2\g3\ • • •) of ^(Q\\Q2\Qr, • • •) can be defined by cMuQiA^', • • •) = W^i)W^2)W^3)- • •; however, in the sequel we consider ^(g\',g2) exclusively, but without loss of generality. Lemma 2. ^(^1,^2) = ^^(Q2\q\)^ Corollary 3: ^(q\g) = ^(g). These two results follow from the commutative nature of the AND operation. Let now p, pi, P2,... denote primes > 2; while /, ki,k2,... ,n,ni,n2,... ,rn,mum2,.. .are integers > 0. Then, Lemma 4. ^(Pi;p2) = ^(P\P2), if P\ "^ P2' Consider that br(pip2) = 0, except br(p\P2) = 1 if fl^mod P1P2 = 0. But 1 ! ! ! ! ! ! ! ! ! ! ! ! ! U !
30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760
!!!! n n ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! M ! ! ! ! ! ! ! ! ! ! n !!!!! 2!!! ! M U ! 2 2 ! ! ! U ! ! ! ! ! ! n ! ! ! ! M ! ! ! ! 2 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! n ! ! ! 2! n ! ! n ! ! ! ! ! OPTION BASE 1 U !!!!!! U !!! I!!!!!!!!!!!!!!!!! 2!! n !!!!!!!!!!!!!! 2 !!!! U 2!! n !!!!! INPUT "What size matrix?",Size ALLOCATE A(Size,Size),B(Size,Size) INPUT "MOD(N) value?",Numl,Num2 !!! U !!! ! 2 n 2!!!! * !!!! 22 2! 2!!! 2 !!!!!!!!!!!!! 2! !!! n ! n !!!!! 2! 2!!!!! OUTPUT 2 USING "#,K";C$ GINIT PLOTTER IS CRT,"INTERNAL";COLOR MAP GRAPHICS ON CLEAR SCREEN 222222222222222222222222222222222222222222222222222222222222222222 2 INTEGER Row,Col,Size,Rowmax,Colmax 2222222222222222222222222222222222222222222222222222222222222222222 LINPUT "Do you want plotting (Y/N)?",Plot$ 2222222222222222222222222222222222222222222222222222222222222222222 M A T A= (0) Rowroax=Size Colmax=Size PRINT Numl,Num2 2222222222222222222222222222222222222222222222222222222222222222222 2222222222 Initialize Array 22222222222222222222222222222222222222 2 2222222222222222222222222222222222222222222222222222222222222222222 F O R N = l T O Size Base=l A(N,l)=Base A(l,N)=Base NEXT N 22222222222222222222222222222222222222222222222222222222222222 2 M A T B= A 222222222222222222222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222222222222222222222222 F O R Row=2 T O Rowmax F O R Col=2 T O Colmax A(Row,Col)=(A(Row-l,Col)+A(Row,Col-l)+A(Row-l,Col-l)) M O D Numl B(Row,Col)=(B(Row-l,Col)+B(Row,Col-l)+B(Row-l,Col-l)) M O D Num2 NEXT Col NEXT R o w 222222222222222222222222222222222222222222222222222222222222222 222222222222222222222222222222222222222222222222222222222222222 22222222222222222222222222222222222222222222222222222222222222 2 F O R Row=l T O Rowmax FOR Col=l T O Colmax Rem=A(Row,Col) M O D Numl Rem2=B(Row,Col) M O D Num2 IF Rem>0 THEN A(Row,Col)=0 IF Rem2>0 THEN B(Row,Col)=0 IF Rem=0 THEN A(Row,Col)=l IF Rem2=0 THEN B(Row,Col)=l NEXT C o l NEXT R o w 22222 2 122222222222 222222222222 222222 22222222222222 2 2222222222 22 222222 12222222222 2 22222 2222222 22 2222 2222222222 2 2222 222222222222 2 2 2 2 2 2 12222 2222222222222222222 22222 2222 22 2 22222222 2222222222222 ALLOCATE C(Size,Size) 22222222222222222222222222222222222222222222222222222222222222 2 M A T C= A + B 22222I22222222222222I222222222222222222222222222222222222222222 2222222222222222Congruence if C(I,J)=2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 !222222222222222Anticongruence if C(I,J)=1222222222222222222222 222222222222222222222222222222222222222222222222222222222222222 F O R Row=l TO Rowmax F O R Col=l T O Colmax Rem=C(Row,Col) IF Rem=2 THEN C(Row,Col)=l IF Rem=l THEN C(Row,Col)=0 NEXT C o l NEXT R o w 2222222222222222222222222222222222222222222222222222222222222222222 Ymax=100 Xmax=100 VIEWPORT .l*Xmax,.9*Xmax,.l*Ymax,.9*Ymax
Congruence of binary patterns
770 780 790 800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 1160
SHOW l,Colmax+l,Rowinax+l,l IF Plot$="Y" THEN SET PEN 0 INTENSITY 1,1,1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! H=l FOR Row=2 TO Rowmax FOR Col=2 TO Colmax Suin=(C(Row-l,Col)+C(Row,Col-l)+C(Row-l,Col-l)+C(Row,Col)) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!I!!M!!!!!!!!!I!!!!!II!!!!!!!I!!!!!! MOVE Col,Row !!!!!!!!!!!!MI!!!!!!!!!I!!!!!!!!!!!I!!!!!I!!!!!!!!!!!I!!!!!!!!!I!! IF Suin=0 THEN AREA INTENSITY 1.1^ii) of the first vector 5i and the last point (Xmi.ymi) of the last vector 5w in the successor. By constraining the first point (xxx,yn) of the first vector 5i and the last point (Xmi, ymi) of the last vector 5m in the successor is the first point {Xpx.ypi) and the last point {Xp2, ypi) of the predecessor, it is possible to generate the discretely approximated Koch curve all of whose points are in the limit Koch curve Coo • According to Definition 1, we can generate the Hmit Koch curve C^ by recursively applying the "production" to the initiator infinitely. But in a discrete environment, we cannot and need not apply the production infinitely. A finite number of the production must be applied. How many times must it be applied? The limit Koch curve C^ (the ideal Koch curve) is the curve made by applying infinite number of productions to the initiator and is described as follows: Let p ^ - 5i • * • 5m be the production of a Koch system K and ^ 0 / = 5/ where 0, E # . If p T = ^ and 5i • • • 5m = (^7 • • • Sm) 7". as in Fig. 1, then 'a is called to be directly transformed to 5i • • • 2 ^ denoted by d. =• ?i • • • 5;,,. In other words, when the production P is applied to an arbitrary vector a where pT = a and produced a set of vectors J i • • • J ^ , 5i * • • 5m = (^1 • * '^m)T. Similarly, when we apply the production to a poly vector ^i • • • ^i in the plane, we obtain a new poly vector ^,1 • • • 5 i ^ - • • J n • • • 2i;„ denoted by ^ 1 - • -^1 => 5 n - • -^im- • - S i i - • - J i m . As above, when the initiator is a polyvector / , and the production P is applied to / , we get the Koch curve of order one ( C i ) denoted by / =• Ci. A Koch curve of order « + l(C„+i) is produced by applying production Pto the Koch curve of order n{C„) denoted by C„ =• C„+i. If the production P is infinitely applied to the initiator / , we obtain the limit Koch curve C^. 3. APPROXIMATED KOCH CURVE
In practice, we cannot apply an infinite number of productions to obtain the limit Koch curve C^. We must apply a finite number of productions and produce
(xi, yi)
(^2. yz)
yv (b)
•^
W i
¥i
qT
•^Tt
Fig. 2. Relationship between production and direct transform.
an approximated Koch curve Q of the limit Koch curve Coo- For the approximated Koch curve Q , we must introduce some measure between the approximated Koch curve Q and the limit Koch curve Coo • In this paper, we used the maximum distance between the approximated Koch curve Ck and the limit Koch curve Coo as the measure between the two curves. The maximum distance between the two curves is defined as follows: A curve is a set of points and the distance between two curves can be defined in terms of the distance between the two sets of points. When p(x, y) is the Euclidean distance between the two points x and y, the distance between a point x and a set Y{a line) is given by pix, Y) = inf p(x, y). The half-distance between two sets (two curves) X and Yis equal to p'(X, Y) = sup p(jc, Y). And the distance between two sets X a n d y i s p ( X , Y) = rmix{p'{X, Y),p'{Y,X)}. If the contraction ratio of a production p -^ Qi -
•
•
U
' ' ' Qmis given byy
length (Qrm^)
=
,
^
. ,,
where Qrnax is the
length(p) longest vector ofqi where / = 1, . . . , m, then the approximated Koch curve Ck not separated from the limit Koch curve Coo over a predefined tolerable distance e can be obtained by Theorem 1. Theorem 1: Given a Koch system K = Ca, p, ^^ 5i * * •5m) and the tolerable distance e, if the contraction ratio 7 is less than 1.0, X is the length of 'a and do is the distance between Co and Cx, then the approxi:i-7)\ mated Koch curve Ck where k •• \og. IS do not separated from the limit Koch C« over a predefined tolerable distance e.
'[-
Proof: Given a vector O/ E C„, O/ =• r, i • • • Tim whose relation is described in Fig. 2. Translation T is composed of rotation, scaling and translation. So, distance ratio dni
d. (d)
K
p{di, 71 pip.
Pi'
'Tim) ^ length(o,) length(p) •
•5m)
length(p) p(p,Qr • 'Qm) Fig. 1. Production of the snowflake curve, (a) ^, production ^"^ do p(a,^r ' '^nt) X predecessor of the production P; (b) 5i * * * 52, production successor of the production P; (c) a = p r , a vector in 2D plane; (d) Ji • • • ?4 = (5i • • • 'QA)T, production is applied The distance between C„ and C„+i has the following to a vector in (c). property;
195
Discrete approximation of the Koch curve dn = p{Cn,
C„+i) < m20^{Spni)dp
( / = 1, . . . , m )
= m2i\{Spni) Spado
=
max (length (o/) , 1 ^0
By the way, o E C„, length {o) < X7" p~\
For a integer p ( > « ) , p(C„, Q,) < 2
di = doy"
i=n
1 - 7^~" 1-7 In the approximated Koch curve, tolerable distance is c, so
p(C„, Coo) ^ ^i), {xi, yi)"), if z = (X2, yi). A point z is called on vector a if z is first on or last on a or if z E {/1 / i s a point at the line between {xx,yx) and (^2, ^2)} and a point z is on 5i • • • 5„, if z is on S, for some / = 1, . . . , «. • Set Co = / . For each vector ^0, = e Ck^l = Ck^X U{Jx'"
So the approximated Koch curve not separated from the limit Koch over the tolerable distance e is Q where log^
e(\_-y)do
In Theorem 1, the contraction ratio 7 and do the distance between Q and C\ can be measured automatically. So when the tolerable distance e is given, we can automatically determine the approximated Koch curve Ck not separated from the limit Koch curve over the predefined tolerable distance e. In case of the snowflake in Fig. 3, the contraction ratio 7 is 1/3. 4. DISCRETELY APPROXIMATED KOCH CURVES This section describes the algorithm to generate the images of discretely approximated Koch curves. All the points of the discretely approximated Koch curve must not be separated from the limit Koch curve over the tolerable distance e and must be connected. When we call a point z is first on vector d, = ( ( x i , y\)^ (-^2, ^ 2 ) ) , if z = ( x i , yx) and a point z is last on
X2
i;t y2)
(xl, yl)
.^yx
(a)
(b)
f = Xo = (xl, yl)
Xl = Xo + (dx, dy)
X2 = Xl + (rx, ry)
X3 = Xo + 2*(dx, dy)
X4 = (x2, y2)
Fig. 3. Construction of the snowflake curve, (a) Initiator / = {{xu y,), (X2, ^2)); (b) Production p => qoQxMi. (c) Cj, snowflake of order 1; (d) C2, snowflake of order 2.
7m\'3^Jx-
• Jm}
drawpoint at (x^x, ykn) and {Xkn, ykn)k = k+ 1 According to Theorem 1, we can approximate the limit Koch curve C^o by the approximated Koch curve Ck within the tolerable distance e. By Theorem 2, the first and the last points of each vector in the approximated Koch curve Ck is on the limit Koch curve. If the length of each vector in the approximated Koch curve Ck is less than one pixel length, then the vector is drawn by first and last points of the vector and we can draw the Koch curve only using the points in the limit Koch curve C^ and all the generated points are connected. When the length of the vectors in the approximated Koch curve Ck is greater than one pixel, by applying the production until the length of the newly generated approximated Koch curve is less than one pixel length, we can draw the Koch curve only using the points in the limit Koch curve Coo • Then all the drawn points are connected. Given a Koch system K= ( / , P ) , we represent the production P as a set of vector transformations $ (rotation, translation, scaling of a vector). When the tolerable distance is e, image of the Koch curve is generated as follows: • Set Co = I. For each vector Uoi = ((xon, yon), (^0/2, ^0/2)) ^ Co drawpoint at (xot 1, yot 1) and (xo/2, yon)• For k = 1 to /c
6
Ck^X = Ck^X U {Tr • 'Jm\'3=^7l-
-Im)
196
SAM CHUNG HWANG and HYUN SEUNG YANG
(b)
(c)
Fig. 4. (a) Cs, the approximated snowflake curve with tolerable distance 1.0; (b) Ce, the approximated snowflake curve with tolerable distance 0.5; (c) The discretely approximated snowflake curve. drawpoint at (Xkn, ykn) and (x^/2, ykii)k = k-\- 1 5. EXPERIMENTAL RESULT
/ of three vectors and the production of 3 transformations of vectors. The contraction ratio 7 of the Sierpinski gasket is 1/2 and the initiator / = {, , ^ = V 3 dx/2 + dy/2, the initiator / and the production P of the snowflake are described in Fig. 3. The contraction ratio 7 of the snowflake is - ^ y2) 1/3. When the initiator / = and the image size is 512 X 512, the distance do between Co and Cx is 512 V 3/6. If the tolerable distance between the limit Koch curve and the approximated Koch curve is 1.0 (one pixel length), the approximated curve C5 is not separated from the limit Koch curve over the tolerable distance 1.0. Figure 4a describes the image of the approximated snowflake curve C5 and Fig. 4b describes the image of the approximated snowflake curve Ce when the tolerable distance is 0.5. Figure 4c describes the discretely approximated snowflake curve. The dragon curve in Fig. 6 is described by two trans(d) formations in Fig. 5. The contraction ratio 7 of the -^ = dragon curve is 1/V2. When the initiator / = ;2)>; (b) Production p => M i ; (c) C,, dragon curve of order 1; (d) C2, dragon curve of order 2. Figure 7 describe the Sierpinski gasket by the initiator
197
Discrete approximation of the Koch curve
(a)
(b)
(c)
Fig. 6. (a) C,6, the approximated dragon curve with tolerable distance 4.0; (b) CM, the approximated dragon curve with tolerable distance 1.0; (c) The discretely approximated dragon curve.
511))}. The distance do between Co and Ci is 256. When the tolerable distance e is 4.0, Fig. 8a describes the approximated curve is C-i. Figure 8b describes the approximated curve C9 with the tolerable distance £=1.0. Generalisation and randomisation of the plane Koch curve [10] can also be represented by some initiators and productions. Figure 9 describe a generalisation of the plane Koch curve by initiator / = {((0, 256), (511,
(x3, y3) X2
256))} and a production. The distance do between Co and Ci is 512/3 and the contraction ratio 7 is 1/3. Figure 10 describe the images of the approximated and the limit curves. Figure 11 describe a randomisation of the plane Koch curve by initiator / = { < ( 0 , 256),(511,256)>} and two productions. The maximum distance of the distance dpi (=512/3) between Co and Ci produced by P\ and the distance dp2 (=512/5) between Co and Ci produced by P2 is dp2. The contraction ratio is the maximum value of the contraction ratio 71 (= 1/3) of the production PI and the contraction ratio 72 ( = 1/ 5) of the production P2. Figure 12 describes the images of the approximated and the Umit curves. 6. CONCLUSION
(x2,y2)
(xl, yl)
Xo
X3
(b)
(a)
-f = Xo = (xl, yl)
Xl =((xl+ x2) / 2, (yl+ y2) / 2)
X2 = ( x 2 + V 5 / 2 ( y 2 - y l ) , y2-V5/2(x2-xl)) X3 =(x2,y2)
Fig. 7. Production of the Sierpinski gasket, (a) Initiator / = Mi^2.
To generate the Koch curve automatically without user interaction, the curve generation must be stopped in a finite number of steps and the termination condition must be defined. In this paper, we demonstrated the approximated Koch curve and the discretely approximated Koch curve that are not separated from the limit Koch curve over predefined tolerable distances. We also proposed a termination condition for the generation of the approximated Koch curves. We think this approximation method can be applied to many fractals.
198
SAM CHUNG HWANG and HYUN SEUNG YANG
(b)
(c)
Fig. 8. (a) C7, the approximated Sierpinski gasket with tolerable distance 4.0; (b) C9, the approximated Sierpinski gasket with tolerable distance 1.0; (c) The discretely approximated Sierpinski gasket.
X 2 ^
X3
% qo
(xl, yl)
(x2, y2)
q4
Xo
(a)
X4
X5
(b)
^ = dx = (x2-xl)/3, dy = (y2-yl)/3, rx = -dy, ry = dx Xo = (xl,yl)
Xl = Xo + (dx. dy)
X2 = Xi + (rx, ry)
X3 = X2 + (dx, dy)
X4 = Xl + (dx,dy)
X5 = (x2. y2)
Fig. 9. A generalisation of the plane Koch curve, (a) Initiator / = ({x\, yl), (xl, y2)); (b) Production p
Discrete approximation of the Koch curve
(c)
(b)
Fig. 10. (a) C4, the approximation of a generahsation of the plane Koch curve with tolerable distance 4.0; (b) C5, the approximation of a generalisation of the plane Koch curve with tolerable distance 1.0; (c) The discrete approximation of a generalisation of the plane Koch curve.
(xl, yl)
(x2, yl) (a)
(b)
•f = dx = (x2-xl)/5, dy = (y2-yl)/5, rx = -dy, ry = dx Xo = (xl,yl)
Xi=Xo + (dx,dy)
X3 = X2 + (dx, dy)
X4 = Xl + (dx,dy)
X2 = Xi + (rx, ry) X5 = X4 + (dx,dy)
X6 = X3 + (dx,dy)
X7 = X6 + (dx,dy)
Xs = X5 + (dx,dy)
X9 = (x2, y2) Fig. 11. A randomisation of the plane Koch curve, (a) Initiator / = ({x\, y\), (xl, y2)); (b) Production rMiM3^4(inFig.9)-Pl or 7oT,r2T37475T6r7T8 —P2
199
200
SAM CHUNG HWANG and HYUN SEUNG YANG
(b)
(c)
Fig. 12. (a) C4, the approximation of a randomisation of the plane Koch curve with tolerable distance 4.0; (b) C5, the approximation of a randomisation of the plane Koch curve with tolerable distance 1.0; (c) The discrete approximation of a randomisation of the plane Koch curve.
REFERENCES 1. A. Fournier, D. Fussel, and L. Carpenter, Computer rendering of stochastic models, Comm. ACM 25(6), 371384(1982). 2. A. Norton, Generation and display of geometric fractals in 3-D, Comp. Graph. 16(3), 61-67 (1982). 3. A. Smith, Plants, fractals, and formal languages, Comp. Graph. 18(3), 1-10(1984). 4. G. Gardner, Visual simulation of clouds, Comp. Graph. 19(3), 297-303(1985). 5. M. Barnsley, Fractals everywhere, Academic Press, New York (1988). 6. M. Barnsley, R. Devaney, B. Mandelbrot, H. Peitgen, D.
Saupe, and R. Voss, The Science of Fractal Images, Springer-Veriag, Berlin (1988). F. Musgrave, C. Kolb, and R. Mace, The synthesis and rendering of eroded fractal terrains, Comp. Graph. 23(3), 41-50(1989). B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman, San Francisco (1982). P. Prusinkiewicz and G. Sandness, Koch curves as attractors and repellers, IEEE Comp. Graph. Appl. 8(6), 26-40(1988). 10. A. Lakhtakia, Generalisations and randomisation of the plane Koch curve, / Phys. A: Math. Gen. 20,3537-3541 (1987).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
201 Chaos and Graphics
VISUALIZING CANTOR CHEESE CONSTRUCTION CLIFFORD A. PICKOVER
Visualization Systems Group, IBM Thomas J. Watson Research Center, Yorktown Heights, NY 10598 and KEVIN MCCARTY
ROLM Systems M/S 336, 4900 Old Ironside Drive, Santa Clara, CA 95054 Abstract—This note introduces the reader to Cantor cheese, an artistically interesting analog of the Cantor set described by Mandelbrot. A related object, the solenoid, is also explored. Computer programs are given for Cantor cheese and solenoid construction. 1. CANTOR CHEESE
The term Cantor cheese was used by Stewart[l] to describe an artistically interesting analog of the Cantor set described by Mandelbrot[2]. As background, a Cantor set can be constructed by taking an interval of length 1 and removing its middle third (but leaving the end points of this middle third). This leaves two smaller intervals, one-third as long. The middle thirds of these smaller segments are removed and the process is repeated:
The fractal dimension of this particular Cantor dust after many iterations is less than I since £> = log 2/ log 3 = 0.63. Cantor dusts with other fractal dimensions can easily be created by removing different sizes (or numbers) of intervals from the starting interval of length I. A topologically similar set starts with a circular disc. Everything except for two smaller discs is removed. Here we use pairs of circles rather than pairs of lines, and the subdivisions are repeated as with the Cantor set described above. We retain only those points inside the circles. Fig. I is a picture of this Cantor cheese with each circle's radius slightly less than half of the previous generation's radius. (The term "generation" refers to the nesting level of the circles; see pseudocode in Program I.) If we consider just the line along the diameter, the fractal dimension for the set of points is close to 1. Smaller fractal dimensions are obtained by using circles which are further shrunken and separated, e.g.:
Fig. 1 is a cross section taken at the front of the object in Fig. 2. In Fig. 2, the nested circles are represented as nested cylinders for artistic purposes. (Some generations are represented by cones to show the interior nested structures.) A graphics supercomputer, such as a Stellar GSIOOO, allows models of the Cantor cheese to be rotated, shaded, and magnified in real time. For readers who wish to display cross-sections of the Cantor Cheese, a computer program pseudocode is given in Program I. Note that if recursive computer program languages are used, the pseudocode for generating the cheese cross sections can be simplified (Program 2). 2. DESCRIPTION OF A VARIABLE DIMENSION CHEESE
It is possible to create a 3-D representation of the Cantor cheese such that the fractal dimension corresponding to the cross-section continuously decreases
Reprintedfrom Comput. & Graphics Vol 14, No. 2, pag. 337-341, 1990
202
CLIFFORD A. PICKOVER and KEVIN MCCARTV
Fig. 1. Cross section of the Cantor cheese in Fig. 2 (Scale Factor, 1.000).
Program 1. Program Code for Generating Cantor Cheese Cross-Sections m - a 1-D array containing the midpoints of each circle. gen - the number of generations. DrawCircleAt - draws a circle at (x,y) with a given radius. The picture boundaries go from 0 to 100 in the x and y directions. m(1)=50; count=l; radius=50; frac=1; DrawCircleAt(m(count),50,radius); do gen = 0 to 10; bot = 2**gen; top=(2**(gen+1))-1; radius=radius/2 ; l=radius; do i = bot to top; m(count+1)= m(i) - frac*l; DrawCircleAt(m(count+1),50,radius); m(count+2) = m(i) + frac*l; DrawCircleAt(m(count+2),50,radius); count=count+2; end; end;
203
Visualizing Cantor cheese construction
Fig. 2. 3-D Representation of Cantor cheese.
Fig. 4. Solenoid, second stage. The mapping is iterated to the second level of nesting.
along the z-axis. The centers of the two circles at the next level, also lie along straight lines parallel to the zaxis. At each succeeding stage, the two centers of the next stage are located along a diameter, halfway between the center and the edge. Thus the centers are located according to the following scheme:
Fig. 3. Solenoid,firststage. The initial torus is shown as a mesh cage.
Level 0 1 2 3 k
from front to back of thefigure.Instead of cylinders, nested spire-like objects can be used which taper along the z-direction. If one were to slice into such a figure, each cross-section has a different fractal dimension. The front face, corresponding to D '^ I, looks like Fig. 1. The back cross-section resembles the second in-line figure in this paper. Nested circles still form the crosssections of nested spires, but the nested circles separate as the dimension decreases. The first enclosing circle does not change size, and so it generates a cylinder. The two smaller circles inside change their sizes in direct proportion to the shrinkage factor, and so form cones. At the next level, the shrinkage factor is applied twice, so the diameters vary as the square of the shrinkage factor. This form, instead of a cone, resembles a conical-shaped spire similar to a surface of revolution generated by a parabola—like a tall tent. As the nesting level of cirlces increases, the shapes formed along the third dimension are narrower spires with proHles generated by cubics, quartics, and so on. The spires are not, strictly speaking, surfaces of revolution. The centers of circles of cross-section, as wouldbe centers of rotation, are not in general straight line segments. We call these centers of the spires spines. As mentioned above, the enclosing circle does not change size, so its center does follow a straight line
Center coordinate 0
±i K±i±z) {(±i±z±z^) |(±1 ±z±z^±
• V ±z 1) then begin DoCircle(x - radius/2, y, frac * radius, DoCircle(x + radius/?*, y, frac * radius, end;
*) *) level-1); level-1);
end;
The starting point of the solenoid is the solid torus, and a mapping from the torus to itself. The mapping squeezes the tube of the torus to half its original diameter, stretches it out to twice its original length, and wraps this length twice around, inside the skin of the original. In wrapping around twice, one coil sits next to another one with no overlap, just as one would coil up lengths of a garden hose. The coil makes a halftwist as it wraps around once, joining back up to itself after tvo turns. We have found that the representation of nested tori provides quite a visualization challenge. Our first attempts portrayed these complicated objects using various degrees of transparency, but we found that the resulting figure was too complicated to understand. The representation we settled on uses both shaded facets and wire meshes. Thefirststage is illustrated in Fig. 3. The initial torus is shown as a mesh cage. Again, note that we can rotate and shade the objects in real time. Three colored lights were used to illuminate the object. This operation of stretching, winding and twisting is repeated indefinitely. As the mapping carries the original torus to an image of itself wrapped twice around, it also carries the twice-wrapped image to one wrapped four times around. Each iteration produces another tube nested inside the previous one. At each stage, the number of windings doubles and the thickness halves. This process converges in the limit to a connected set of infinitely thin windings, called a solenoid. The easiest way to describe the way this mapping works is to use complex numbers. A point inside the solid torus is located by a pair of complex numbers (z, w). The z coordinate represents the longitude angle, and locates a point on the unit circle in the complex plane which will be the center or spine of the torus. The w coordinate locates a point inside a disk of radius 5, considered as a piece of the complex plane. The disks are imagined to be threaded on the unit circle like a necklace. With these coordinates, the mapping which wraps the torus twice around inside itself is f:(z,w)^{z\wl2^-
z/A).
The term z^ simply wraps the unit circle twice around itself as z traverses the unit circle once. The term w/ 2 shrinks the original w coordinate to half its size, while the z/4 term moves it away from the w = 0 origin, so the image does not intersect itself on the second loop. The simple algebraic formula allowed by complex number representation makes it easy to compute repeated iterations of the mapping. (See Program 3 for an algorithm to iterate this calculation.) The connection with the Cantor cheese is seen by considering a cross-section of the solenoid construction perpendicular to the windings. A sequence of nested disks is seen; each disk contains two smaller disks just as in the Cantor cheese construction. When the longitude angle is zero (z = 1 + Oi), all nested disks line up, but for other longitude angles the varying amounts of twist cause the disks to become separated. This separation can be seen in Fig. 4, which shows the mapping iterated to the second level of nesting. 4. HISTORY
For readers interested in some historical background on the Cantor set, the set was discovered, by Henry Smith in 1875. (Henry Smith (1826-1883) was a professor of geometry at Oxford [2].) The founder of set theory, George Cantor, made use of Smith's invention in 1883. IBM Fellow Benoit Mandelbrot has characterized and made use of this set in the field of fractal geometry, and readers should consult his book The Fractal Geometry ofNature for some elegant drawings of this set and for some closely related curves such as the Devil's staircase. Ian Stewart's book Does God Play Dice? {The Mathematics of Chaos) provides an excellent introduction to the Cantor set as well as chaos theory and fractals, and the book is highly recommended. Hofstadter[3] explains how the cross-section of various strange attractors, such as the Henon attractor, can be considered as Cantor sets. For those readers interested in a mathematical nomenclature for the Cantor set, see Barnsley's book Fractals Everywhere[4]. For example, the Cantor set can be considered a subset of the metric space [0, 1]. The Cantor set C can then be defined as C
n /„ M=0
205
Visualizing Cantor cheese construction Program 3, Program Code for Generating Solenoid The following pseudocode computes (x, y, z) coordinates for the centers of the nested tubes in the solenoid construction. level: circlepts: zr, zl: wr, wi :
nesting level number of steps around longitudinal circle longitudinal angle, as a complex number pair location inside the cross-sectional disk, as a complex number pair.
circlepts = 36; pi = 3.14159; for i
0 to circlepts do begi n angle = 2 * pi * 1 / circ X = cos(angle); y = sln(angle); zr = x; zi = y; wr = 0; wi = 0; for j = 1 to 1 eve 1do begin wr = wr + zr / U; wi = wi + zl / U; zx = zr * zr - z 1 zy = 2 * zr * zi ; zr = zx; zi = zy; end; x = zr * (1 + w r ) ; y = zl * (1 + w r ) ; z = wi ;
(* Initial
longitudinal *)
[ * angular position *) (* as a complex number *) (* cross-section location *)
(* complex squaring (* of z *)
(* The radius of the cross-sectional disk centered at *) (* the point (x,y,z) Is 1/(2**(level+1)) *) end;
REFERENCES
where /o=[0, 1], /i = [ 0 , l ] U [ i | ] , /2= [ 0 , i ] U [ i , | ] U [ f J ] U [ f , | ] Notice that the point x = 0 is in the Cantor set, as well as many other points. For additional background on the solenoid, Stephen Smale identified this kind of object as an example of a strange attractor in his seminal 1967 paper "DifTerentiable Dynamical Systems" [ 7 ] . For additional artistic representations, see [ 8 ] .
1. I. Stewart, Does God Play Dice? {The Mathematics of Chaos), Blackwell, New York (1989). 2. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, New York (1982). 3. D. Hofstadter, Metamagical Themas, Bantam, New York (1985). 4. M. Barnsley, Fractals Everywhere. Academic Press, New York (1988). 5. D. Ruelle, Strange attractors. Mathematical Intelligencer 2, 126-137(1980). 6. R. L. Devaney, An Introduction to Chaotic Dynamical Systems. Menlo Park: Benjamin (1989). 7. S. Smale, Differentiable dynamical systems. Bull. Am. Math. Soc. 73, 748-817 (1967). 8. C. Pickover, Computers, Pattern. Chaos, and Beauty. St. Martin's Press, New York (1990).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
207 Chaos and Graphics
NOTES ON PASCAL'S PYRAMID FOR PERSONAL COMPUTER USERS JIM NUGENT
614 West Hanssler Place, Peoria, IL 61604 Abstract—A lattice of octahedra and tetrahedra (called an "oct-tet lattice") is a useful paradigm for understanding the structure of Pascal's pyran\id, the 3D analog of Pascal's triangle. Notation for levels and coordinates of elements, a standard algorithm for generating the values of various elements, and a ratio method that is not dependent on the calculation of previous levels are discussed. Thefiguresshow a bell curve in 3D, the association of elements to primes and twin primes, and the values of elements mod(.x) through patterns arranged in triangular plots. It is conjectured that the largest factor of any element is less than the level index. 1. INTRODUCTION
In a 1966 Scientific American column, M. Gardner mentions in passing that there are, " . . . endless variants on the (Pascal's) triangle, and many ways to generalize it, such as building it in tetrahedral form to give the coefficients of trinomial expansions" [ 1 ]. One of the illustrations of Pascal's triangle, included with that article, shows the first 100 rows of the triangle with odd and even numbers represented as dots. The pattern of dots representing odd and even numbers in the 2D Pascal's triangle correspond to the octahedral and tetrahedral sections of an "oct-tet lattice" (Figs. 1 and 2). The octahedron faces of the lattice map to the even dots while the tetrahedron faces map to the odd dots. If we construct a 3D Pascal's triangle, will the distribution of odd and even values for the elements in the interior correspond to the octahedral and tetrahedral components of an oct-tet lattice? A Galton board [ 2 ] simulation, which rolls marbles through a triangular maze, generates values that approximate the values of coefficients of a binomial ex-
A ooeo
0 4 6 4 0 0 0 10 10-00 0 6 0 20 0 6 0
00000000 Fig. 2. Pattern of odd and even numbers in Pascal's triangle. Elements with odd values are plotted as black circles.
pansion. At each fork in the maze, the marble has a 50-50 chance to go either way until it falls into bins at the bottom of the maze in proportions that roughly approximate a bell-shaped curve. The Galton Board can be simulated with a computer program that is a variation of the one used to generate the 3D analog of Pascal's triangle. 2. PRECURSORS
S. Mueller published an article in 1969 entitled Recursions associated with Pascal's pyramid. In Mueller's definition: Pascal's pyramid is the three-faced pyramidal array of coefficients in the expansion of the trinomial, {a^- b + c)\ such that the coefficients of (a + ^ + c)^ are systematically placed beneath those of(' + yy^^. three legs of a collapsible photo tripod, the transformation from cube corner to oct-tet lattice is like changing the angle between legs from 60° to 90°. As you raise the tripod, the legs get longer but the angles between them grow more acute. Exploring the values, levels, and properties of elements of this tetrahedron appears to be as worthwhile as the investigation of Pascal's triangle has been. Do observations made of Pascal's triangle, or its 3D analog made at low levels (less than 75), hold at higher levels? 4. THE OCTAHEDRON-TETRAHEDRON LATTICE
Fig. 8. A 3D plot of log values of elements of level 74 of the 3D analog of Pascal's triangle.
First, the octahedron-tetrahedron lattice is a more accurate 3D analog for the 2D Pascal's triangle. A triangular base pyramid is descriptive of outward shape but lacks any ability to illuminate the interconnectedness of multiple subdivisions. The levels of the 3D
3158520 1113100436 0614152112 9416707854 0749659792 4275595964 4346611040 2268342487 8923538886 9419550997 1447892350
0923418832 6006054656 2087828085 5880581896 1432857049 9757224426 3851673285 7449304096 3227288006 5002384307 9673803277
Like Bollinger[6], Staib and Staib[4] state that, ". . . the three-dimensional nature of the Pascal pyramid makes it awkward to use for hand calculating the trinomial coefficients." Staib and Staib[4] and Mueller[3] both use illustrations of pyramids containing planes and levels with no interconnections between levels. Drawing a tetrahedron, let alone a subdivided tetrahedral lattice, can be difficult. Without actual physical models, it can be daunting to visualize how tetrahedra in combination with octahedra might provide the needed paradigm for interconnecting the pyramid's levels (see Figs. 3 and 4). Oct-tet lattices are also harder to picture in 2Dfiguresand illustrations because most of our drawing conventions are based on viewing cubic forms.
6449009051 3892900319 1668009822 5420699122 5211766082 9390879557 4199119254 2954040152 5208474718 6400281140 0404026245
7128478066 3585986788 5372108490 8080576571 1434290687 1324136271 7432409512 3434568466 5069699240 1388647731 1371236566
3819294363 5311712455 1432900398 1528777016 7071388682 5208821850 6631770548 5206928522 9953476144 0505323489 5068070000
Fig. 9. The value of the central element of level 1152 of 3D analog of Pascal's triangle.
210
JIM N U G E N T
FACTORS of 547 Digit Central Element Level 1152 227 FACTORS 2 2 2 2 3 3 3 3 5 5 5 5 7 11 7 7 17 23 13 23 23 29 31 31 43 41 43 59 71 79 67 79 97 97 101 101 107 103 109 113 137 131 137 139 151 149 157 163 197 193 197 199 211 223 223 211 229 227 229 233 251 257 263 241 277 271 281 283 397 389 401 397 409 419 409 419 431 431 421 433 439 443 443 439 457 457 461 449 463 467 467 463 487 487 491 479 499 503 503 499 521 521 509 523 541 547 541 547 563 563 569 557 571 577 587 571 601 607 613 599 631 641 643 619 659 661 673 653 691 701 709 683 733 739 743 727 761 769 773 757 809 811 821 797 829 839 827 853 863 877 881 859 907 911 887 919 941 947 937 953 977 983 991 971 1009 1013 1021 1019 1033 1039 1049 1051 1063 1069 1087 1091 1097 1103 1109 1117 1129 1151 end of factor list
Start = 06:00:22
Stop = 07:35:58
3 3 7 11 23 37 67 83 103 131 139 193 199 227 239 269 389 401 421 433 449 461 479 491 509 523 557 569 593 617 647 677 719 751 787 823 857 883 929 967 997 1031 1061 1093 1123
IBM PS/2 Model 50Z
Fig. 10. The 227 factors of the 547 digit number in Fig. 9. Factored in 11 hours on a standard IBM PC. Looking for patterns among 2000 or 3000 40-digit numbers is not easy work. "Computer graphics is an excellent method by which patterns in Pascal's pyramid can be made obvious to both the mathematician and interested layperson," according to Pickover[8]. The figures in the following sections are computer generated visualizations that highlight certain information while masking other things. To decide if a 50-digit number is odd or even we only need to examine one digit, the last one. The oct-tet lattice provides not only a mental model but also a physical model of a 3D analog of Pascal's triangle. A group of small models made of toothpicks,
soda straws, or cardboard can prove useful in order to "think" about tetrahedra.
5. BASIC NOTATION
The notation in Fig. 6 is suitable, it agrees closely with Staib and Staib's notation for coordinates on any level while it uses Mueller's scheme for numbering the levels. The first level is set at zero. This is convenient because the value of the second element in the first row at higher levels is equal to the level and the sum of the coordinates for each point on a level is equal to the level index.
211
Pascal's pyramid for PC users
(a)
(b)
(c)
(d)
Fig. 11. Mod values of elements on various levels, (a) Level 127 mod(2); (b) level 55 mod(5); (c) level 55 mod(4); (d) level 55 mod(8).
6. SOME INTERESTING PROPERTIES
6.1. A fully rounded bell curve Any row in Pascal's triangle yields the coefficients of a binomial expansion. A plot of the coefficients gives us the familiar, flat, 2D "bell" curve. This normal distribution can be modeled with a Galton board simulation or with a series of heads or tails coin tosses, each with a probability of 1/2. The triangular levels of the 3D analog yield the coefficients of trinomial expansions. A plot of the coefficients gives us a 3D "bell" curve (Figs. 7 and 8). The 3D version can also be modeled. By constructing the edges of the octahedra and tetrahedra in an oct-tet lattice with hollow tubes, it would be possible to construct a working 3D version of a Galton board. Here we would have a series of decisions with three possible outcomes, each with a 1 /3 probability. The three edge rows of the 3D "bell" curve (see Fig. 7) and three flat faces of the log plot (see Fig. 8) are 2D "bell" curves. The elements on three of the four
faces of the tetrahedral 3D analog are the same as the elements of the 2D Pascal's triangle. Pascal's triangle is contained in the 3D version. 6.2. Factoring elements It appears that each element of a level factors into values that are less than the level number. A random example. The value of the central element on level 1152 is a 547-digit number (Fig. 9). It has 227 factors, the largest being 1151. This 547-digit number has factors that included 85% of the primes below its level index of 1152 (Fig. 10). It took 23 hours to come up with this central element's value and another 11 hours to factor it, on a standard IBM/PC. For example, Pomerance states: . . . factoring is hard. It has been estimated conservatively . . . that to factor certain composite n with 75 decimal digits, using the fastest factoring algorithm known on an imaginary computer faster than any now in existence would take about
212
JIM NUGENT
lip'
...:ii'
(a)
(b)
(c)
(d)
Fig. 12. Elements that are -1-1, -1, or -}- and - (between twin primes) the value of a prime, (a) Level 25; (b) level 35; (c) level 45; (d) level 128. 15 weeks. For certain numbers with 100 digits it could take a life time.[9] The elements of the 3D analog of Pascal's triangle are exceptions to Pomerance's statement. The numbers mentioned above are so large that few personal computer languages can handle them. The True BASIC language along with two language extension packages, the 3-Dimensional Graphics and the Mathematician's Toolkit, were used to compute the examples in this article. The Hugelib library allows for arithmetic of arbitrary precision, up to 100,000 digits by packing numbers into strings. 6.3. Odds and evens A number of interesting 2D (and 3D) patterns can be generated by representing the values of the elements of a level with colored dots. These are similar to the patterns of odd and even distribution within Pascal's triangle [10]. In the 3D analog, the odds and evens are distributed into octahedral and tetrahedral components. When we plot the distributions of other mul-
tiples for various levels, we obtain other interesting patterns (Fig. 11). The mod(2) patterns for the slices of levels 7, 15, 31, 63, 127 • • • are the same as the patterns for the three "exterior" faces of the tetrahedron (see Fig. 2). For a tetrahedron that is one level less than a power of two, all four faces have the same pattern. 6.4. Plus or minus one The values of the elements of this 3D analog of Pascal's triangle factor into many small primes, they are divisible by a high percentage of integers. These same element values ± 1 have few divisors and few factors. Upon investigation we find that many of them are prime. Many elements are one more or less than a prime number. Some are between twin primes (Fig. 12). Because computer languages for personal computers can handle about 15 significant digits, one can calculate values for elements up to about level 35 in a straightforward manner. Program and array size limitations
Pascal's pyramid for PC users
213
pseudoprimes. "The scarcity of pseudoprimes to the base 2 among all the numbers smaller than 20 billion suggests that any number that passes the Fermat test to base 2 is likely to be prime," according to Pomerance [10]. Of course, a good proportion of the values from the 3D analog of Pascal's triangle that I have looked at, are above Pomerance's 20 billion limit. The central values of level 74 are approximately 3.4 X 10^"^. Exploration above level 18 would benefit from faster algorithms and computer systems that are more powerful. Since any element, from one of the levels of the tetrahedral array, is easy to factor (all factors have been less than the level index for every element factored to date). It might be possible to use Dixon's [11] algorithm which is based on a complete factorization of n — 1, or other newer algorithms based on partial factorizations of « — 1 or « + 1.
1#^
Fig. 13. Each element of any level is related to its neighbors by simple ratios. Level 7 is shown here.
in many popular languages such as BASIC limit exploration of the 3D analog of Pascal's triangle to the first 18 levels. Brute force factoring methods also become unbearably time consuming at these levels. To explore above level 18, I switched from using brute force factoring as a prime test to using Fermat's Little Theorem with a base of 2 as a composite test. This can be stated: if Z?" - ^ is a multiple of «, then n is a composite number. Above level 18, the composites I have identified are composite, the primes are another story. Some may be pseudoprimes, some may be Charmichael numbers. It will take more than a personal computer to be able to tell which is which. There have been some estimates of the number of
6.5. The oct-tet algorithm The first line of code sets point (0, 0, 0) equal to 1 by definition. Next we assign a value of 1 to any point (on a vertex) that has 2 coordinates of zero. If an element is not the initial point or a vertex point, then we check to see if it is on the tetrahedral face. If it is, we sum the two values from the level above for any element that is on the edge of a level. The final ELSE statement assigns a value for all the points not on an edge or vertex, setting them equal to the sum of the 3 elements from the level above. Let PT(0,0,0) = 1 FOR level = 1 TO top FOR X = level TO 0 STEP -1 FOR y = (level - x) TO 0 STEP -1 FOR z = (level - {x-^y)) TO 0 STEP -1 IF X = 0 AND y = 0 OR jc = 0 AND z = 0
Calculation Time 1000
0.01 *
LEVEL OF TETRAHEDRON Fig. 14. Log plot of calculation times for first 75 levels of the 3D analog of Pascal's triangle and checking +1 and — 1 values with Fermat composite test.
214
JIM NUGENT
Element Values Plus/Minus One -/lev
•
+/lev
\
RATIO OF PRIMES TO LEVEL
Fig. 15. Ratio of + 1 and -1 primes to level index up to level 76.
OR y = 0 AND z = 0 THEN array is related by a simple whole number ratio to the LET pt{x,y,z) = 1 12 elements around it (Fig. 13). The value of any eleELSE IF X = 0 ment can be calculated from any one of its neighbors. LET pt(x,>^,z) = pt{z,y-\,z) + pt{x,y,z-{) We can start at any vertex element (which has a value ELSE IF y = 0 THEN of 1, by definition) on any level and apply a ratio calLET pt(x,>^,z) = pt(x-l,>^,z) + pt(jc,y,z-l) ELSE IF X = 0 THEN culation, proceeding from element to element, each LET pt(jc,>^,z) = pt(x-l,>',z) + pt(A:,>^-l,z) time incrementing the denominator and decrementing ELSE the numerator of the interval ratio by 1. Using this LET pt(jc,>^,z)=pt(x-1 ,y,z)-^pt(x,y-1 ,z)-\-pt{x,y,z-1) system, the need for array storage is cut drastically. NEXTz NEXT>; Even with shortcuts, the time needed to calculate NEXTx the values of elements and run the Fermat test quickly NEXT level rises (Fig. 14). Level 75 took 7 hours to compute on a personal computer with a 10-mHz 80286 processor. For the first 75 levels, the ratio of primes that are equal 6.6. An alternate algorithm to the value of an element ± 1 appears to hold steady In order to explore above level 18 of the 3D analog (Fig. 15). of Pascal's triangle on a PC, it is necessary to use a language that uses more than 64K of memory and can 6.7. Some other properties handle more than 16-digit integers. Since each level is The value of any element is equal to the number of dependent on only one previous level it would also be different paths from the apex of the tetrahedron to that possible to explore higher levels if we could find an element. In Pascal's triangle, this is the basis of "Taxalgorithm that made more sparing use of computer icab" geometry. memory. The sum of the unique elements on any level equals Alternating between two flat arrays rather than cre- 3 to the power of the level index. For instance, level 7 ating one large cubic array would be one solution. The has eight unique elements: 1, 7, 21, 35, 42, 105, 140, drawback is that it would involve lots of coordinate and 210. These add up to 2187 or 3 to the seventh manipulation. On the other hand, mapping an octa- power. hedron-tetrahedron lattice onto the standard x, y, z cubic coordinate system is wasteful of computer mem7. SUMMARY ory because we can only store 5456 elements in the The 3D analog of Pascal's triangle is of interest for 27,000 storage locations in an array 30 X 30 X 30. the same reasons that Pascal's triangle is of interest. It Another method of reaching higher levels in the 3D touches on number theory, the distribution of primes analog of Pascal's triangle (also true of Pascal's triangle) and twin primes, divisors, factors, combinatorics, and is based on the fact that each element of the tetrahedral geometry.
Pascal's pyramid for PC users The patterns to be found in Pascal's triangle and its 3D analog seem endless. REFERENCES
1. M. Gardner, The multiple charms of Pascal's triangle. Scientific American 128-132 (December 1966). 2. A. K. Dewdney, Five easy pieces for a do loop and random-number generator (Computer Recreations). Scientific American 22 (April 1985). 3. S. Mueller, Recursions associated with Pascal's pyramid. Pi Mu EpsilonJ4{ 10), 417-422 (1969). 4. J. Staib and L. Staib, The Pascal pyramid. Mathematics Teacher 505-560 (September 1978). 5. H. Steinhaus, Mathematical Snapshots, G. E. Stechert & Co., New York, 30(1938).
215
6. R. C. Bollinger, A note on Pascal-t triangles, multinomial coefficients, and Pascal pyramids. The Fibonacci Quarterly \40-\44 {May 1986). 7. A. Loeb, Contribution to synergetics. In Synergetics, R. Buckminster Fuller (ed.), Macmillan, New York, 837 (1975). 8. C. Pickover, Computers, Pattern, Chaos, and Beauty, St. Martins Press, New York (1990). 9. C. Pomerance, Recent developments in primality testing. Math Intelligencer 3 97-105 (1981). 10. C. A. Pickover, On the aesthetics of Sierpinski gaskets formed from large Pascal's triangles. Leonardo, 23(4). 11. C. Pomerance, The search for prime numbers. Scientific American 141 (June 1982). 12. J. D. Dixon, Asymptotically fast factorization of integers. Math. Comp. 36, 255-260 (1981).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
217 Chaos and Graphics
PATTERNS GENERATED BY LOGICAL OPERATORS MiECZYSLAW SZYSZKOWICZ 1157-6 Rockingham Avenue, Ottawa, Ontario KIH 8A6, Canada Abstract—Iterations with logical operators are demonstrated to create aesthetic patterns. a„+i = {a„ + bn)/2, b„.
Logical operators return a bit-wise result which is either true (nonzero) or false (zero). The following examples demonstrate how logical operators may be used: 4 OR 3 = 7 (4 = binary 100 and 3 = binary 11, so 4 OR 3 = 7, binary 111),-1 AND 18 = 18, N O T X = -(X + 1), I X O R l = 0 , 1EQV0 = 0,0IMP1 = l.(XOR means "exclusive or," EQV means "equivalence," IMP means "implication"). Here we use the logical operators to create interesting patterns. As an example two patterns are presented (see Figs. 1 and 2).
where ao = a > 0 , ^o = ^ > 0 . We assume that a and b are positive integers. The above iteration process was used to define the following iteration with the logical operators OR and AND
PATTERN I This pattern is generated on the basis of the arithmetic-geometric mean iteration
After a few executions of this iteration (say « = 2, 3), the obtained value a„+\ + bn+\ is displayed at the initial point (a,b). Fig. 1 illustrates a^ + b^ modulo 2. Other
^^n
= a„ OR Z?„, bn^, = VflTAND^ .
Fig. 1. The arithmetic-geometric mean iteration with OR and AND. Reprintedfrom Comput. & Graphics Vol 15, No. 2, pag. 299-300, 1991
218
MiECZYSLAW SZYSZKOWICZ
Fig. 2. The simple gasket with (>'o,'', ^) = (0.25, 3.569, 128) and with the logical operator EQV. iterations can be used, for example an+i = ia„-\- 3^„)/ The sequence {pj} is defined uniquely if (yo, r, N) are given. Refs. 1 and 2 proposed the following simple rule 4, b„+i = (b„-\- ya„b„)/2, or similar. to define the rows ofJ]j PATTERN II
Consider the rectangular array of numbers/y whose first row (/ = 1) is determined as fij = Pj, ; = 1,2, 3, . . . , where {pj} is calculated as follows
fi+lj
— \fij "fij+l
I-
Fig. 2 illustrates the values {J^j} modulo 2 calculated by using the logical operator EQV, i.e.,
Pj = 128JC;, Xj+i = rxj{\
-
xj). REFERENCES
The initial value used is Xi = yN, where yk^i = ryUl-yk),
/: = 0, 1,2, . . . , 7 V - 1.
1. A. Lakhtakia, A simple gasket derived from prime numbers. Comput. & Graphics 13, 57-58 (1989). 2. M. Szyszkowicz, A simple gasket derived from the logistic parabola. Comput. & Graphics 14, 335-336 (1990).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V All rights reserved
Part IV. Mandelbrot, Julia and Other Complex Maps 1. Feedback The earthworm burrowing through the soil encounters another earthworm and says "Oh, you're beautiful! Will you marry me?" and is answered: "Don't be silly! I'm your other end." Robert Heinlein Feedback is a term we often hear today in a variety of settings; for example, amplifier feedback during rock concerts, biofeedback in medicine and psychology, and chemical feedback in the field of biochemistry. Generally, feedback means that a portion of the output of a system or machine returns to the input. In electronic amplifiers, feedback can occur if the microphone is placed too close to the speaker. In the world of mathematics, feedback is often the result of an "iteration" or "recursion". By iteration, we mean the repetition of an operation or set of operations. In mathematics, composing a fimction with itself, such as i n / ( / ( x ) ) , can represent an iteration. The computational process of determining Xi+\ given x/ is called an iteration. Take for example the simple act of squaring a number. Let's presume we have a magic box that squares whatever numbers are fed to it - if we put in 2, out comes 4. Now let's take the output, 4, and feed it to the input. Out comes 16. This self-squaring process is an example of mathematical feedback, and it may be simply described by the following equation: z-^z^. This particular squaring feedback seems rather uninteresting. The progress of the iteration is monotonic. Even if we add a constant c to the squaring process, the numbers still follow a rather uninteresting and ever-increasing progression: z^^z'^ + c. Gaston Julia (1893-1978) was one of the first mathematicians to notice that, under certain conditions, this feedback loop produces startling results. These results arise when "complex" z values are used as input (complex numbers are of the form a+'ib where i = \ / ^ ) . However, the striking beauty and complexity of "maps" representing such iterative Julia calculations have only recently been explored in detail, due in part to advances in computer graphics. B. Mandelbrot, H. Peitgen, O. Richter, and others have extended the theory and graphic presentation of iterated fiinctions as a special class of fractals. Since their simple graphical representations in the 1980s, the Julia and Mandelbrot sets have emerged as two of the most scintillating stars in the universe of popular mathematics and computer art. The sets often resemble spirals upon spirals, and they serves as an important example of how simple mathematical operations can produce astonishingly complex geometrical forms. The more you magnify a figure's border, the more detail you'll find. This section is filled with Julia and Mandelbrot set maps. As background, let us review how to create a graphical representation of a Julia set. Researchers often start with an array of complex values (z) and have the computer follow the outcome of the squaring process defined by z-^z'^ + c, where c is constant. (Other mappings are also used.) Once the initial points are selected, each iteration represents a step along a path that hops from one complex number z to the next. The collection of all such points along a path constitutes an orbit. The basic goal is to understand the ultimate fate of all orbits for a given system. For example, for certain initial z values, the z^ equation produces larger and larger values; i.e., the function explodes 221
222 or diverges. For other values, it does not explode (i.e., it is bounded). For color figures, the number of iterations needed for an initial point to grow beyond a certain threshold number is represented as different colors to indicate the rate of explosion. In a computer program, you need not use complex numbers, because the equivalent mapping can be written as
Z„^i =Xl-Yl^a,
Yn^i =2XnYn + b.
The variables X and Y usually are thought of as the real and imaginary parts of the complex number z. The filled-in Julia set then is the set of all initial conditions XQ and FQ whose solutions are bounded. The computer is like a microscope opening a portal to a vast, unexplored and unpredictable universe. With many fractals, like the Mandelbrot and Julia sets, who would have thought that such beauty could be hidden within what was initially so lumpy looking? How could such a simple formula produce an inexhaustible reservoir of magnificent shapes and forms? The complexity exhibited by simple formulas correspond to behavior that even mathematicians could not fiilly appreciate before computers could display the results. Arthur C. Clarke in The Ghost from the Grand Banks notes: In principle the Mandelbrot Set could have been discovered as soon as men learned to count. But even if they never grew tired, and never made a mistake, all the human beings who have ever existed would not have sufficed to do the elementary arithmetic required to produce a Mandelbrot Set of quite modest magnification.
2. Beautiful Roots Some of the graphics in this section are based on numerical root-finding methods, for example, Halley's and Newton's method. The use of computational techniques based on recurrence relationships can be traced back to the dawn of mathematics. The Babylonians used such techniques to compute the square root of a positive number, and the Greeks to approximate n. Today many important special function of mathematical physics may be computed by recurrence formulas. The choice of a particular algorithm influences not only the process of computing but also how we are to understand the results when they are obtained. One goal of this section is to give a flavor of the subject of recurrence relations and chaos, and the computer graphics reveals the beauty that can be found in such relationships. Many papers in this section address the process of solving equations of the form/(x) = 0. The problem of finding the zeros of a continuous function by iterative methods occurs frequently in science and engineering. These approximation techniques start with a guess and successively improve upon it with a repetition of similar steps. Some of this section's figures give an indication of how well two of these iterative methods (Newton's method and Halley's method) work, and the papers show where the methods can be relied upon and where they behave strangely. Halley's method is of interest theoretically because it converges rapidly relative to many other methods. Each iteration is "supposed" to lead to a better guess, and the process is repeated. The variables in Newton's and Halley's method behave like comets torn between conflicting tugs of two nearby planets (metaphors for the roots). In some cases it might be difficult to determine which of the two nearby planets a comet will collide with even though we know the gravity equations. Of course, if we knew exactly how the comet is moving at any give time, then we could predict its fixture exactly. But we never do know anything exactly . . .
For Further Reading (1) Clarke, A. (1989) Ghost from the Grand Banks New York: Bantam. (A female character goes insane after exploring the Mandelbrot set.)
223 (2) Brooks, R. and Matelski, J. (1981) The dynamics of 2-generator subgroups of PSL(2,C). In Riemann Surfaces and Related Topics: Proceedings of the 1978 Stony Brook Conference. I. Kyra and B. Maskit, eds. Princeton University Press: Princeton, New Jersey. (Note: this 1978 paper contains computer graphics and mathematical descriptions of both Julia and Mandelbrot sets.) (3) Devaney, R. (1986) Chaotic bursts in nonlinear dynamical systems. Science. 235: 342345. (4) Dewdney, A. K. (1985) Computer Recreations. Scientific American. 253: 16-24. (5) Douady, A., Hubbard, J. (1982) Iteration des polynomes quadratiques complexes. Comptes Rendus (Paris) 2941: 123-126. (6) Julia, G. (1918) Memoire sur 1'iteration des fonctions rationnelles. Journal of Mathematics, Pure Applications 4: 47-245. (7) Mandelbrot, B. (1983) On the quadratic mapping z-^z^ - jji for complex ix and z: The fractal structure of its M set, and scaling, Physica 17D: 224-239. (8) Peitgen, H., Richter, R (1986) The Beauty of Fractals. Springer: Beriin. (9) Pickover, C. (1990) Computers, Pattern, Chaos, and Beauty. St. Martin's Press: New York. (Has a chapter devoted to Halley's method.) (10) Ushiki, S. (1988) Phoenix. IEEE Transactions on Circuits and Systems. July 35(7): 788789.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
225 Chaos and Graphics
A TUTORIAL ON EFFICIENT COMPUTER GRAPHIC REPRESENTATIONS OF THE MANDELBROT SET RAUL ROJAS
National Research Corporation for Mathematics and Computer Science, FIRST Laboratory at the Technical University of Berlin, Hardenbergplatz 2, 1000 Berlin 12, West Germany Abstract—In this paper we present a tutorial of some techniques that can be used in order to calculate the popular Mandelbrot set more efficiently. Emphasized is how to avoidfloating-pointcalculations and how to suppress them completely (using afixed-pointrepresentation). The divide and conquer method, which consists of recursively dividing the calculating region into subregions, is also described. Programming examples are given in a high level programming language, and black and white graphics are included. 1. INTRODUCTION
2. THE MANDELBROT SET
Even if a user does not know how the Mandelbrot set[3] is calculated, most have probably seen different views of it reproduced in computer magazines or periodicals such as Scientific American[2]. Such images (obtained by magnifying the boundaries of the set) are exhilarating, providing astonishing examples of the complex patterns a very simple dynamical process can bring into being [ 1 ]. All around the world computer programmers try to find the most interesting regions [4]. The Mandelbrot set has captured the imagination of computer scientists and transformed an apparently abstruse mathematical function into what is probably the most expensive set in history. Many hours of CPU-time, perhaps worth several hundred thousand dollars, have already been used to chart the Mandelbrot set. Figure 1 shows the well known shape of the set on a grey background. Why should the mathematically simple Mandelbrot set be so expensive? The most important reason is the way it is calculated: several floating-point operations must be repeated within a loop. The loop counter often runs from one to a number between 30 and 1000, and this calculation has to be repeated for each pixel in the screen. Thus, several million floating-point operations are required in order to have an aesthetic graphic. Even with a fast workstation using a floating-point co-processor, the entire process can take several hours if one is investigating a very small region of the set. The main purpose of this article is to show some ways in which the necessary calculations to draw the Mandelbrot set can be accelerated. We show three main sources of inefficiency that one can find in many programs published in computer magazines, and we propose a method to organize the necessary calculations in a recursive way. We also show how to completely avoid floating-point calculations. With this method a significant speed up is achieved in all cases in which a significant portion of the border of the Mandelbrot set is to be drawn. We have tested this method in an IBMPC/AT with no floating-point co-processor and the results are very encouraging. The laser printer graphics in this article were produced by a SUN-3 workstation using a slightly modified version of the same program.
In 1980, Benoit Mandelbrot described the set which now bears his name. He found that the very simple mapping z -^ z"^ -^ c could produce very interesting graphics. The Mandelbrot set is formally defined as the set of all complex c values for which the iterative process z„+, = z^ + c does not escape to infinity with the start point ZQ = (0, 0). So much for the formal definition. An example can clarify the way this calculation is done. Each point in the plane has a pair of coordinates (x, y) that can also be interpreted as the complex number x -\- iy. Suppose that we want to know if the point c with coordinates (2, 0) in the plane belongs to the Mandelbrot set. First, we have to take the point ZQ = (0, 0) as starting point of the iteration. The next point is defined by the relation Z, = Zo + C.
(1)
These are operations with complex numbers (one complex multiplication and one complex addition) and they are performed according to the formulas: (a + ib)(c + id) = {ac - bd) + i{bc + ad) {a + ib) + (c + id) = (a + c) + i(b + d). If we apply this formulas to relation (1) we get z, = (0, 0)(0, 0) + (2, 0) = ( 0 , 0 ) + (2,0) = (2,0). In the next step we get Z2= (2,0)(2,0) + (2,0) = ( 4 , 0 ) + (2,0) = (6,0). We can repeat this procedure several times. Each time we will notice that the next point moves further
ReprintedfromComput. & Graphics Vol. 15, No. I, pag. 91-100, 1991
226
RAUL ROJAS
sources of ineflftciency when dealing with the calculations. It is clear that the greater the radius of the escape circle, the greater the number of iterations that are needed in order to verify that a point succession has trespassed the circle borders. Some programs use very big values for /?, in the hope that this will yield a better result. A well known book on the subject recommends R = \0. Actually it is enough to use a radius of 2 for the calculations. If only the interesting region of the plane is being investigated (the rectangle with xboundaries -2.25 and 0.75 and y-boundaries -1.5 and 1.5) then any point succession which skips out of this circle will never return again and will move farther away in each iteration. On the other hand, it is not possible to use a smaller radius because points to the right of the point (-2, 0) and arbitrarily near to it belong to the Mandelbrot set. 4. HOW MANY ITERATIONS?
Fig. 1. The Mandelbrot set. away from the origin. We then say that the succession of points escapes to infinity. In this case c does not belong to the Mandelbrot set. The same procedure applied to the point c = (0, 0) yields a stationary point succession (stationary at the origin). Because this succession does not escape to infinity, the point (0, 0) belongs to the Mandelbrot set. To test if a point succession escapes to infinity it is enough to see if it is already out of a circle big enough around the origin. We can take for example the circle of radius R = 25. We declare a point succession as one going to infinity if the distance of one of its points from the origin is greater than the radius of this circle. If the point has coordinates (x, y) we have to test only if the square root of x^ + y^ is bigger than R. In practice we cannot calculate an infinite succession of points. We have to set a limit of say 100 iterations. If in 100 iterations the succession has not surpassed the boundaries of the circle of radius R, we accept c as a member of the Mandelbrot set and we paint this point in the screen with the appropriate color. If the point succession exceeds the circle before the iteration limit is reached, then the point does not belong to the set and its escape time is the number of iterations in which the succession escaped the circle. The points with odd escape times can be painted using one color and the points with even escape time using another. Figure 2 shows the Mandelbrot set as well as the points with even escape time in black.
The second most common source of inefficiency when calculating the Mandelbrot set, is the limit for the number of iterations used before deciding that a point belongs in the set. There are programs which use 1000 iterations to draw the main island of the set using a low resolution [6]. It is not surprising that the authors warn about the six or seven hours needed to run the program. There is a kind of superstitious feeling that the graphics will look better with more iterations. Actually it is not necessary for the programs to perform so many iterations to obtain attractive pictures. It is possible to draw the main island of the Mandelbrot set with good resolution using no more than 30 iterations. More iterations bring only negligible variations to the graphic and my experience is that the rougher calculation looks even better than the finer. Even with the resolution of a laser printer, 30 iterations seem sufficient to get a good image (we used actually only 25
3. HOW BIG A CIRCLE?
From this short explanation it is already obvious that in order to decide whether or not a point belongs to the Mandelbrot set, many calculations must be done. In each iteration several floating-point additions and multiplications have to be performed and the distance from the origin has to be compared to the radius R of the escape circle. Here is where we find one of the first
Fig. 2. The Mandelbrot set and contours of the different divergence regions.
Efficient computer graphics of the Mandelbrot set iterations in Fig. 1). This problem deserves more attention. Points which belong to the Mandelbrot set have an infinite escape time, that is they do not escape to infinity at all. Points outside the Mandelbrot set have different escape times, but the nearer the point is to a region of the Mandelbrot set, the greater is the escape time. When the regions of the plane are colored according to the escape time, we get a set of bands around the Mandelbrot set that look much like the known potential lines of an electric field. It is possible to see empirically that the width of these bands decreases as they approach the Mandelbrot set. If we are drawing the main body of the Mandelbrot set and are interested in the escape regions around it, we typically inspect the frame with bounds —2.5 < x < 0.75 and -1.5 < y < 1.5. The side length of this region is equal to 3 units. If the resolution of our screenwindow is 256 by 256, that means we can still look at details that are at least 3/256 units wide. Because of the exponential fall of the cross sections of the escape regions, it is impossible to get a very detailed picture of the nearest bands to the Mandelbrot set. As a matter of fact it is very difficult to notice a change when the number of iterations goes from 25 to 30. According to our experience, 25 iterations are good enough for most purposes when drawing the 256 by 256 resolution region. The above considerations have another important consequence. If we want to make a close up of an interesting region, we have to reduce the length of the sides of the frame we are investigating. If we inspect the frame with bounds 0.375 < x < 0.385 and 0.125 < y < 0.135, we are then dealing with a frame of sidelength 0.01. This is a magnification of the original picture by a factor 300. Even when this region is drawn using 1500 by 1500 pixels we do not have to increase the number of iterations from 25 (for the frame with side 3) to 300 times 25. It is enough with 120 iterations, less than 5 times more iterations than before. This observation has to be taken with a grain of salt. Different regions of the plane require more iterations in order to show the richness of detail that is hidden in them. Figure 4 is an example of a frame of side 0.01
pixel's center
•
•
Fig. 3. A very thin branch could miss the center of all pixels in a small region. In this case it would not be graphed.
227
Fig. 4. A region of side-length 0.01 calculated with 190 iterations.
that required 190 iterations in order to display the sea horses shown there with an acceptable resolution. However, one should not think that more iterations always imply a better picture. It depends on the kind of picture in which one is interested. If one is only interested in the Mandelbrot set proper (and not in the escape regions around it), then some detail can be lost in very chaotic regions of the plane. In the so called "sea horse" region of the plane, for example, one loses many points of the fine filigree that defines the sea horses if the number of iterations is increased excessively. It is clear why: as the number of iterations is increased, the fine strokes that constitute the body of the sea horses become thinner and thinner. It is very difficult for the center of each pixel to lie exactly in one of these thin lines. It is more probable that the center falls to one or the other side of the lines, and in this case the pixel will not be colored (you have to remember that for each pixel its center is taken as a representative and that the calculations have a meaning only for this point). Figures 4 and 5 are a comparison of the results achieved in black and white when the resolution passed from 190 to 300 iterations. Some parts of the Fig. 5 become cleaner and more detailed, but some others lose their contours. In Figure 6 we merged both graphics (one in white, the other in black) against a grey background. How much to iterate is then a very subjective question. It all depends in which region of a figure one is interested in and which resolution is being used. Nonetheless our practical experience has shown us, that the number of iterations required grows approximately proportional to the logarithm of the magnification factor. If the set is being drawn in color, one can almost always iterate deeper. If the escape regions are colored with different tones, we can still get a very
228
RAUL ROJAS
The routine shown does the job, but too many calculations are wasted. Some simple improvements are the following: (a) The square root is not necessary. The comparison can be made against the square ofR (that is against 4 and not 2). One call to the SQRT function is saved in each iteration. (b) It is possible to start with the point (x, y) instead of the point (0,0), because the first iteration takes us always to this point. (c) The squares of x7 and yl can be calculated one time, but they can be used twice: first for the calculation ofx2 and then for the calculation of r. (d) The squares ofxl and yl could be calculated with a special routine, such as that used in Pascal. The square of a floating-point number can be calculated easier than a floating-point multiplication.
Fig. 5. The same region as in Fig. 4 calculated with 300 iterations. good drawing of the shape of different, very chaotic parts of the Mandelbrot set. If one is also drawing the escape regions (with a monochrome screen), using black for the even regions and white for the odd ones, one can iterate deeper, because the turbulence of the stripes that result pays for the lost detail around the thinnest arms of the Mandelbrot set. 5. THE ORDER OF CALCULATIONS
The third source of inefficiency found in many programs is the ordering of the calculations needed to decide if a chosen point belongs to the Mandelbrot set. Program 1 is an example of an ad hoc routine used to plot a given pixel. The routine uses as arguments the coordinates of the point and decides if it should be plotted or not.
Program 2 shows how the first program could be modified in order to make it more efficient. Program 2 PROCEDURE plot(x,y:REAL); CONST kmax= 100; R=4.0; VAR
A::INTEGER;
xl,yl,r,b2,b3:REAU
BEGIN xl:=x; yl: = y; k:=U b2:=SQRixl); b3:=SQRiyl); r:=b2-\-b3; WHILE {{r( 64*256*256*256 -h 16*256*256)) then writeln('it is bigger than four'); Before using this technique one should be completely sure of the internal representation for real variables used by the computer.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
235 Chaos and Graphics
JULIA SETS IN THE QUATERNIONS ALAN NORTON
IBM T. J. Watson Research Center, Yorktown Heights, NY 10598 Abstract—Recent mathematical work on the dynamics of complex analytic functions has givenriseto a new subject matter for computer graphics. The combination of mathematical theory and computer graphics has resulted in new insight into the nature of some of the simplest of mathematical objects, second-degree polynomials. Most of that work has focused on the possibilities within the two-dimensional complex plane. This article shows how these investigations may be extended to higher dimensions, resulting in fractals that naturally reside in the 4-dimensional quaternions. Particular attention is paid to the formula ax^ + ^. A method is given for obtaining various interconnection patterns for the Julia sets in 4-space, and the results are displayed in 3-D computer graphics. INTRODUCTION
Quadratic polynomials are usually presented early in elementary algebra courses, and illustrated using a parabola. One learns how to calculate roots, to locate the focus and directrix. Since all parabolas look about the same, the subject is easily treated in one or two lectures, followed by generalizations to higher degree polynomials. This subject, at least, is one which apt students can understand completely, and use as a simple model for the relationship between algebra and geometry. Or so it seems. But now look at the pictures illustrating this article. These pictures are directly derived from quadratic polynomials; in fact can be regarded as pictures ofquadratic polynomials. These shapes of endless detail are in many respects more naturally associated with the polynomials than are parabolas. One needs more than a pen and graph paper to generate such drawings. The quadratic mapping reveals its inexhaustible content only when examined by the computer. Several studies have appeared in recent years demonstrating the dramatic visual effects obtainable from applying two-dimensional computer graphics to complex polynomials. Fascinating as such pictures are, they are only slim fragments compared to the three- or fourdimensional physical reality. Quadratics do in fact reside in higher dimensions, and we present one such extension in this study. We shall show how the 4-dimensional quaternion algebra can be used to define structures possessing complex patterns of infinitely repeating geometric structure. We do not have complete control over the structure, comparable to the way a sculptor can prescribe the topology and texture of the object being created. We can, however, to a limited extent define the interconnection patterns of these shapes, and will show how such controls can be exploited. An underlying theme in this study is the presence of endlessly repeating geometric patterns. The geometric objects revealed through these techniques are called fractals, and satisfy Mandelbrot's definition [ 5 ]. Mandelbrot asserted that fractals are the Geometry of Nature. In the illustrations of Julia sets in this article we see that the universe of mathematical shapes does not differ in that respect from the real world: Typical
Julia sets are fractals; only rarely do we encounter the smooth objects of Euclidean geometry. DYNAMICS IN THE COMPLEX PLANE
Points in a plane can be represented with two real coordinates. But about three centuries ago it was discovered that much simplicity and conceptual understanding is gained by recognizing the pair of real numbers as a kind of number in its own right, a "complex number.'' Instead of the pair (x, y) representing a point in the plane, the single entity x -I- >'V —I is used. This required introduction of a new "imaginary" number. Unlike real numbers, the number / does not represent distance along a straight line. Instead, / may be treated as a displacement in a direction perpendicular to the real number line. Using this new kind of number, all points in a plane are then regarded as "complex" numbers. The point with coordinates (x, y) is regarded as the complex number x 4- iy. Like real numbers, complex numbers can be added and subtracted, multiplied and divided (except that we still are not allowed to divide by zero.) The complex numbers contain the real numbers as one line (the "real axis") in the complex plane. The rules of complex arithmetic are easily expressed in terms of the arithmetic of real numbers: The sum of x + iy and v + iw is (x + u) + i{y + w). Their product is (xy - vw) -f i(xw + yv). By thinking of points in the plane as complex numbers, we can manipulate geometry with formulas. Consider for example a quadratic polynomial /7(x) = x ^ - 1. This formula determines a value, p(x), associated with a number x. It works equally well whether x is a complex or real number. We can regard it as a geometric rule that, for each point z in the plane associates a point piz), also in the complex plane. Complex derivatives Many of the operations one performs with formulas make sense whether the formula is applied to real or complex numbers. One example we shall use later is
Reprintedfrom Comput. & Graphics Vol 13, No. 2, pag. 267-278, 1989
236
ALAN NORTON
the notion of a complex derivative of a polynomial. Derivatives are usually defined (in calculus class) as the slope of a line tangent to a graph. When we express that definition as a limit lim
pix -\-h)-
meet at the same angle 6. Complex analytic functions (and polynomials in particular) have the property of being conformal everywhere they are defined, except at the places where the complex derivative/'(x) vanishes.
p(x)
A—0
we see that the limit can make sense even if x and h are complex numbers and ifp(x) takes complex values. This derivative of a complex polynomial is then another complex polynomial, and can be computed by the power rule: d —r- = anx" dx The mathematical theory of complex analytic functions was developed during the 19th century. These functions have complex derivatives (as in the above limit) where they are defined. They include, for example, polynomials and the exponential function, but not the conjugation function/(x 4- / » = (x - iy). Geometrically, what makes analytic functions so special is the fact that they are "conformal mappings." To explain this, we need to think of formulas as mappings, in the sense that a formula/(A:) not only tells what / does to a point x, it also gives a way of taking points near x and associating them with points near f(x). Geometrically, we can think of / as stretching or otherwise distorting a piece of a plane near x as it pastes it onto the plane of/( jc). (This is illustrated in Fig. 1.) In this context, conformality means that the mapping has a particularly nice property: It preserves angles. If two lines, crossing at x, form an angle d, then the mapping / may distort the lines so that they are curves instead of straight lines, but the resulting curves still
What is dynamics? The subject of dynamics is concerned with what happens to a physical or geometric system over time, when it is subjected to a force, or undergoes some kind of manipulation. For example the motion of planets about the sun can be modelled as a dynamical system in which the planets move according to Newton's laws. These laws provide a set of rules that one can use to compute the position and velocity of the planets tomorrow, if one is given their position and velocity today. With enough effort we could derive a formula that would approximate what the passage of a fixed time (i.e., one day) does to the solar system. Similarly, a complex polynomial p(x) can be regarded as a rule for moving points in the complex plane. If an object is positioned at z© at time / = 0, then Zx - p{zo) will be its position at time ^ = 1, p{p(zo)) - pizi) will be its position at / = 2, etc. Here of course the rule is completely nonphysical, having nothing to do with Newton's laws. Dynamics is concerned more with the long-term behavior of a dynamical system than the explicit rule defining the change from one time to the next. We would prefer to know whether the earth will eventually fall into the sun than where the earth will be tomorrow. Similarly, with a polynomial p(x), one would like to understand the limiting effect of "iterating" or composing the polynomial with itself To establish some notation, \etp"\x) denote the result of applying (or composing) the function/(x) n times to the starting value x:
r"\x)-fiA'"{Ax))'-)). /(B)
/ /(A)
/(C)
Fig. I. Conformal mapping. A complex analytic function may be regarded as a rule that moves a portion of the complex plane to another portion. This motion may cause some distortion, but angles are preserved.
Julia sets in the quaternions What sort of thing can happen top"\zo) as n becomes large? We give some examples, to motivate some definitions. If/(z) = z^ and we start with Zo = 2, it is easy to compute that/^^H^o) becomes arbitrarily large, or converges to infinity. Similariy, taking Zo = i, successive iterates rapidly approach zero. In general, if z© is within a circle of radius 1 of the origin, ihenp"\zo) converges to zero, and it converges to infinity whenever Zo is outside that circle. This illustrates the phenomenon of "attraction:" Zero is "attractive" in the sense that points nearby zero are moved closer when the formula is applied. Infinity is also said to be attractive in this context, since complex numbers far from the origin are moved further by the mapping. There is also a converse notion of "repulsion." Consider how the transformation / ( x ) = x^ acts on the two numbers 1 and 1.01. Successive iterations of 1 do not change its position; however, iterating 1.01, we obtain successively 1.0201, 1.0406 • • • , 1.08 • • •. In fact, every point nearby to 1, other than 1 itself, moves away from 1 when the formula is applied. We say that 1 is "repulsive" or a "repeller" for the function/. Another concept worth defining occurs in the above example. Note that repeated applications of the formula / do not move the points 0 or 1. These points are called "fixed points" of/. More generally, it can occur that after several iterations a point returns to its starting position. To be precise, suppose that/^^^Zo) = ZQ. Then the/:points Zo, Zi =/(zo), Z2 = / ( z i ) , • • • Z/t-i =/(Zfc_2) are said to form a "cycle of length /:," or "/c-cycle." A fixed point is then a cycle of length 1. Cycles, like fixed points, can be attractive or repulsive, depending on whether iterations of the formula bring nearby points closer to the cycle, or push them further away. For an example of a repulsive cycle, con-A .u . ~^ + ^'V3 , - l - - / V 3 _ ^ sider the values ——r and . (These val2 2 ues are cube roots of 1.) It is easy to check, by iterating nearby points, that this pair forms a repulsive 2-cycle for the formula x^. The formula/(x) = x^ — I has an attractive 2-cycle, consisting of the points 0 and —I. There is a simple rule for determining whether a kcycle is attractive or repulsive, based on the value of the complex derivative. We compute the absolute value of the complex derivative of the iterate/^*\ and evaluate it any point of the cycle. If the result is less than 1, the cycle is attractive. If it is greater than I, the cycle is repulsive. If the result is exactly 1, the cycle is neither attractive nor repulsive, and will be called "indifferent." If a formula has an attractive cycle, we can ask what points in the plane are attracted by the cycle. In other words, what points eventually get arbitrarily close to points in the cycle under repeated iterations of the formula. The set of these points, is called the "basin of attraction" of the cycle, and can be likened to the drainage basin associated with a depression in the earth's surface. It is easy to use a computer to find basins of attraction. Fig. 2 illustrates the basin of attraction associated with the cycle {0, - 1 } for the formula x^ — 1. This
237
picture displays a portion of the complex plane centered at the origin, of diameter 4. The red and yellow portions of the picture comprise the basin of attraction to the cycle. Red corresponds to points that approach 0 on even iterations, yellow points approach 0 after an odd number of iterations. The remaining (black) portion of the picture consists of points that are attracted to infinity. Invariance Another concept of some importance in describing long-term behavior of a dynamical system is that of "invariance." We say that a set 5 of complex numbers is "invariant under / " if/(S) = S, For example, a cycle or afixedpoint is an invariant set. If an invariant set also satisfies/"* (S) = 5, then we say that 5" is "doubly invariant." For example, the point 0 is doubly invariant for the function x^, but the point I is not. The circle of radius 1, its interior, and its exterior are also doubly invariant sets for x^. What is a Julia set? What is perhaps most interesting about Fig. 2 is not the basin of attraction, or yellow and red portion of thefigurebut rather the boundary between that basin and the black region. This boundary is known as the Julia set (or Julia-Fatou set) of the formula x^ — 1. Julia sets are named after the mathematician Gaston Julia, who in the early 20th century elaborated many of their properties. The Julia set is a geometric object in the complex plane associated with a formula; in this sense, a picture of the formula. Any polynomial has a Julia set, and many other formulas have them, too. Like the picture in Fig. 2, most Julia sets are fractals [ 5 ], displaying an endless cascade of repeated detail. There are several equally useful definitions of the Julia set of a polynomial, two of which we shall present here because they can be directly translated into computer algorithms. For a complete discussion, see [ 1 ]. 1. The Julia set is the closure of the set of repulsive cycles of the polynomial. 2. The Julia set is the boundary between the set of points that are attracted to infinity, and the set of points that are not attracted to infinity. How are Julia sets computed? Using the above two definitions we provide two easy algorithms for making computer graphics pictures of the Julia set. An algorithm based on thefirstdefinition can be found in [ 6 ]: Start with a polynomial p{x) and a starting point ZQ in the complex plane, determine a sequence of complex numbers as follows: 1. Given z„, find the inverse of p{x) applied to z„; i.e., find the solutions x of the equation p(x) - z„. There will be no more solutions than the degree of the polynomial; andfindingthe solutions is particularly easy if p is quadratic, requiring a complex square root. 2. Choose z„+i randomly from the set of solutions.
238
ALAN N O R T O N
The above algorithm produces a sequence of points {r„} in the complex plane which converges to the Julia set. If many (thousands) of the points after thefirst20 or so are plotted as separate dots on a screen, they will be seen to trace out a fractal. Fig. 5 was computed using this algorithm. A second algorithm, based on the second definition, will more clearly delineate the Julia set for some polynomials. The object is to identify the Julia set as the boundary between points that are attracted to infinity, and points that do not converge to infinity. For example, if the polynomial has an attractive cycle, then the points that are attracted to the cycle can be rapidly determined as not converging to infinity. Different colors can be used to distinguish the two cases, thereby representing the Julia set as the boundary between two colors in a picture. To present this algorithm, assume the polynomial p(z) has an attractive cycle consisting of A: points, Xi, ^2, • • • x„. We shall also need to choose a "large" number N and a "smalP' number e. Large means, in this case, large enough that for \z\ > N, \p{z)\ > Iz|. In other words, Nis large enough that numbers as large as iVare all attracted to infinity. Similarly € must be small enough that if z is within e distance of .Vi, then z will eventually converge to the cycle. Choosing numbers N and e is not difficult, but may occasionally involve some trial and error. The algorithm consists of evaluating each point on a square grid of the same resolution as the desired display device. If a point iterates to infinity, the corresponding pixel is given one color; if the point ends up in the cycle the pixel is given another color. The mapping between display device and screen coordinates must be chosen so that the desired portion of the complex plane is mapped to the screen. For each pixel on the display device:
color-coding the number of iterations required to get close to an attractive cycle.
Why are Julia sets fractals? First, we provide an informal definition of fractal [ 5 ], sufficient for our purposes: A fractal is a geometric shape that possesses detail at all scales of magnification. In other words, one can magnify a fractal repeatedly, and more detail will appear with each magnification. Most but not all Julia sets are fractals; for example x^ and x^ - 2 have respectively a circle and straight line segment as Julia sets. The repetitive structure of Julia sets can be explained by considering their invariance properties. If x is in the Julia set of a function/, then so is/( x); conversely, if/(,v) is in the Julia set of/, so is .v. (This follows from either of the above definitions of Julia set, and we leave it as an exercise for the reader.) Now, given that the Julia set is invariant, suppose there is some feature For shape that occurs in the Julia set. The double invariance of the Julia set implies that / ( F ) , the image of F under/ also lies in the Julia set. Furthermore, the conformality of the mapping / implies that/( F) will appear very similar to F. Repeatedly applying the function/ we see that any feature that occurs in the Julia set will occur again and again, distorted and rotated but of similar appearance. Not only will an infinite number of copies of such features reappear on the Julia set, but they will reappear in arbitrarily small size, everywhere along the Julia set, because the function / is expanding along the Julia set. Many (but not all) fractals are self-similar, so that the fractal contains repeated scaled-down copies of itself The fractals that occur as Julia sets are only approximately self-similar, in the sense that repeated structures will be distorted rather than precise mag1. Compute the complex number z = Zo that maps to nifications of the original. This approximate self-simthe center of the pixel. ilarity was proved by Sullivan. (A proof can be found 2. Iterate the function (say 50 or more times) as follows in[l].) • compute the next iterate, z„ = /7(z„_i). • Check if z„ has absolute value greater than N. If Classification of Julia sets using the Mandelbrot set so, terminate the iteration, and color the pixel Because different quadratic polynomials giveriseto appropriately. very different Julia sets, it is useful to have a classifi• Check if z„ is within distance e of .Vi. If so, ter- cation of the different possible shapes that can arise. minate the iteration and assign the "othef color This classification is best described with the aid of anto the pixel. other computer-generated illustration, shown in Fig. 4. This set, known as the Mandelbrot set {see [6], where 3. If all 50+ iterations complete without exceeding N, it was first described) provides the mathematical color the pixel as a point that does not get attracted equivalent of a road map for the space of quadratic to infinity. polynomials. The Mandelbrot set should be regarded There are many variations on this algorithm which as a picture of the set of all quadratic polynomials, in can reduce the computation, or make the resulting the same sense that a Julia set is a picture of one parpictures more informative. For example, in Fig. 2 the ticular polynomial. For each complex number c, let/(jc) denote the points that do not go to infinity are recognized by the fact that they become close to elements of the cycle. polynomial x^ + c. The Mandelbrot set is defined as If a point ends up in the cycle, the number of iterations the set of values c for which the successive iterates of modulo the length of the cycle can be used to color- 0 under/ do not converge to infinity. It is the set of code the various components of the basin of attraction. complex numbers c such that This is used to obtain the pattern of four colors in Fig. \m \Pc"\0)\ < X . 3. Much of the striking use of colors in [ 7] results from
239
Julia sets in the quaternions
Fig. 2. This illustrates the Julia set of the formula x^ ~ \, which has an attractive two cycle. Points colored red are attracted to 0 on odd iterations of the formula, and points colored yellow are attracted to 0 on even iterations. The region attracted to infinity is black.
One easy way to compute the Mandelbrot set is as follows:
• For each complex number c on a grid, compute the iterates/,(0),/e(/,(0)), • • • • If the iterate becomes large in absolute value (say greater than 5) then the point c is outside the Mandelbrot set and is shown white. Otherwise, stop the iteration after a suitable number of tries, and display the corresponding pixel as black. As with the Julia set, more information (and more artistic license) can be obtained by color-coding the number of iterations used to determine the fate of a given point. How the Mandelbrot set works By looking at where a given complex number c occurs relative to the Mandelbrot set, it is possible to determine the dynamics associated with the formula A:^ + c, as well as to predict general properties of the Julia set o f ^ . The different types of dynamics that occur when fc is iterated are described as follows:
Fig. 4. This illustrates the Mandelbrot set associated with the formula x^ - c. The formula is iterated for various values of c, and the point c is colored black or white depending on whether or not the iteration remains finite. The values of c designated 2,3,4,5, and 6 determine formulas with attractive cycles of the respective lengths. • The white portion of the figure, consisting of c's for which 0 iterates to infinity, corresponds to Julia sets which are Cantor sets, totally disconnected fractals. All points in the complement of the Julia set are attracted to infinity. Fig. 5 shows an illustration of this. • The interior of the black region consists of values of c for which X has an attractive cycle other than infinity. The various components of the interior of the black region correspond to different cycle lengths. The central (cusped) component contains c's such that fc has an attractive fixed point. Different com-
\
JU;».
'vV
'•^V'. \
yr Fig. 3. This is the Julia set of the formula x^ + .2809 - .53/. There is an attractive four cycle, and the four colors are used to identify the components of the basin of attraction to the cycle. Comparefigures6, 7, 8, and 9 of the quaternion Julia set of the same formula.
X Fig. 5. This illustrates a totally disconnected Cantor set that is the Julia set of a quadratic polynomial. All points in the complex plane, except dots colored black, iterate to infinity.
240
ALAN NORTON
For example, the value c == 0, which lies in the middle of the central shape. The formula fc is just x^, having as Julia set the circle of radius I. Another example, c = - 1 , corresponds to the shape illustrated in Fig. 2. In this case the point lies in the center of the black circle, denoted 2, in the center. The resulting 2-cycle is indicated by the alternating colors in Fig. 2. In general it is easy to find cycles of any length just by picking a value of c from the interior of one of these components. The cycle length is determined by the position of the component. Consider for example the sequence of shapes marked 2, 3, 4, 5, 6 in Fig. 4. They correspond to cycles of lengths 2, 3, 4, 5 and 6. Using a graphics display with crosshair, it is easy to discover values of c for which the formula x^ -\- c has a desired cycle structure. Then by computing the Julia set itself, one can distinguish between other, more subtle features of the quadratic functions. • The boundary between the black and white portions of Fig. 4 is perhaps the most significant feature of the Mandelbrot set. Values of c along this boundary are associated with many different (and beautiful) dynamical systems. Not only are such Julia sets the most complex and intricate, but the mathematics of the underlying dynamics is itself not completely understood. We shall not describe the possibilities here, but refer the reader to [7] and [I ]. The animation "Dynamics of ^'*" [9] illustrates the transition in structure of the Julia sets that occur along that boundary. Why does the Mandelbrot set work? In order to understand the relevance of the Mandelbrot set to the dynamics of quadratic polynomials, we reconsider its definition. The trajectory of the point 0 under repeated applications offc determines whether the point c lies inside or outside of the Mandelbrot set. The significance of the starting point 0 is that it is the "critical point" of^; that is, the derivative f'c{z) vanishes at the point z = 0. The Mandelbrot set can be regarded as a diagram of the behavior of the critical point under the quadratic mapping. Fatou and Julia were well aware of the significance of the critical point in classifying the dynamics of iteration. A basic result of Fatou (see [1 ]) is that the basin of attraction of an attractive cycle always contains a critical point. Consequently, any attractive cycle for fc can be found by following the iteration that starts at 0. If that iteration goes to infinity, fc can have no atFigs. 6, 7, 8, and 9. These four illustrations show components tractive cycle other than infinity. of the Julia set ofx^ + .2809 - .53/ in a three-dimensional In general, the critical points of a mapping are imsubspace of the quaternions. The planar fractal shows the Julia set in the complex plane. The differentfiguresshow how the portant in describing the dynamics. Changes in the behavior of the dynamical system defined by a formula four colored regions extend into higher dimensions. are accompanied by changes in the behavior of critical points under iteration. This general principle can be applied to many transformations other than quadratic ponents correspond to different cyclic structures, mapping, and we shall soon see its usefulness in deboth in the length of the cycle, and in how the com- scribing the geometric structures that occur in iteration of quaternion mappings. ponents are arranged.
241
Julia sets in the quaternions
Fig. 10. This picture is associated with the formula \,06ix{ 1 - x). The planar Julia set of this formula is identical with the Fig. 12. This illustrates the three-dimensional extension of the Julia set of x^ + .2809 - .53/, illustrated in Fig. 3; except that Julia set of Fig. 2, from the formula x^ - \. Note that this is it is rotated by 90 degrees. The four colors are used to illustratejust the three-dimensional figure swept out by rotating the Julia set of Fig. 2 about the real axis. all the components of the quaternion Julia set and how they connect to the planar fractal. The resulting quaternion Julia set is quite different topologically from the one illustrated in Figs. 6-10 because of different interconnections resulting from sions. After this discovery, Hamilton and his contemthe placement of the imaginary axis. poraries devoted a considerable effort advocating the application of quaternions to physics and other disciplines[4]. EXTENDING TO HIGHER DIMENSIONS There are several reasons for elevating quaternions Given the complexity and beauty of Julia sets and above the status of "a mathematical curiosity." For the Mandelbrot set, it is natural to seek higher dimensional generalizations. This is not only an interesting example, the real numbers, the complex numbers, and mathematical question; such dynamical systems can the quaternions are now known (by a theorem of Hurprovide useful models for other disciplines, like com- witz) to be the only Euclidean spaces in which we can perform addition, subtraction, multiplication, and diputer graphics and physics. In the following we show how the dynamics of the vision (by nonzero elements). The standard vector quadratic mapping gives rise to interesting geometric operators (dot and cross products) are naturally structures in the 4-dimensional quaternion algebra. We embedded in the multiplication of quaternions. The present these results not to show a completed analysis, dynamics of motion in 3-space is thereby easily exbut to demonstrate the wide range of possibilities for pressible in terms of quaternion operation. This relacomputer graphics illustration of dynamical systems. tionship implies computational advantages in using quaternions to express 3-D spatial manipulation (see [10]). What is a quaternion? We can describe quaternions as an extension of the Quaternions were discovered in 1843 by the Irish physicist and mathematician William R. Hamilton[2]. complex plane, comparable to the previous discussion Attempting to define a 3-dimensional multiplication, of complex numbers as an extension of the real number he found it necessary instead to extend to four dimen- line. Complex numbers provide an extension of the notion of "number" to permit us to consider numbers as two-dimensional quantities. In other words, complex numbers are just a set of rules for multiplying and adding points in two dimensions. Similarly, quaternions may be regarded as a way of extending the notion of "number" to four dimensions: The rules of quaternion multiplication and addition provide a way of doing arithmetic on four-dimensional quantities. To explicitly define quaternion multiplication, we represent points in four dimensions in the form: Q = ao + aii -\- aij + a^k where /, y, k are (like the imaginary number /) unit vectors in three orthogonal directions, perpendicular to the real jc-axis. To add or multiply two quaternions, we treat them as polynomials in /,7, /c, but use the following rules to deal with products: Fig. 11. This shape is also associated with a rotation of the Julia set of Fig. 3, in this case a rotation of about 30 degrees. The formula is (2. + 1.06/)A:( { -X). Note that the interconnection pattern of loops differs from the pattern in Figs. 6-10.
-1; ij = -ji = k\ jk = -kj = /; ki = -ik = j .
242
ALAN NORTON
regarded as situated inside the quaternions. This makes it possible for us to consider any complex polynomial as a polynomial over the quaternions as well. Expressions like: ax^ + bx -^ c are then polynomials. However, the noncommutativity of the quaternions implies that many polynomials cannot be so simply described. For example, unless the coefficients a and b are real, the above polynomial is not equal to x^a + Z?x + c,
x^a + xZ? + c.
xax -\- bx -\- c. etc. For the purposes of this article, we shall consider only a small class of such quadratic polynomials, those expressible in the form ax^ + b, where a and b are complex numbers. We shall see that even this class of polynomials introduces a wealth of structure not seen in the complex quadratic mapping.
Figs. 13, 14, and 15. These show the result when a 90 degree rotation is applied to the formula of Fig. 2, resulting in i(x^ + 1). No longer is the quaternion Julia set simply a rotation of the planar Julia set. Figs. 14 and 15 illustrate the extensions of the red and yellow components into three dimensions. Fig. 16 illustrates the combination of both red and yellow, showing how the pair of shapes is linked together infinitely many times. We note that, since for example ij - ~ji, the multiplication rule for quaternions is noncommutative; the result of multiplying two quaternions depends on their order. This greatly complicates the rules for doing algebra with quaternions. Analogous to the absolute value of a complex number, we have the "norm," defined by: \Q\^^al
+
a\-¥al^a\.
This equals the squared distance from Q to the origin in four-space. Quaternion polynomials Note that if we identify the quaternion / with the complex number /, then the complex plane can be
What is a Julia set of a quaternion polynomial? We begin with the observation that a quaternion polynomial can be used to define a dynamical system on the quaternions: Ifp(z) is a quaternion polynomial, then for any quaternion q, p(q) is another quaternion. With the aid of a computer, quaternion polynomials can be easily iterated, to evaluate the long-term behavior. We can still speak of attractive and repulsive cycles, basins of attraction and the like, where the notion of complex number is replaced by quaternion. We shall generalize the (second) definition of Julia sets for complex polynomials: The Julia set of a polynomial p(z) is the boundary of the set of quaternions q such that p^"\q) converges to infinity as n becomes large. There is another definition of more generality, which we shall provide in the appendix, but for the purposes of computing the shapes in this article, this one definition will suffice. Do quaternion Julia sets extend beyond the complex plane? Consider a complex polynomial p(z). It will have a Julia set / i n the complex plane, and /will necessarily be contained in the quaternion Julia set of p(z). But /could in fact be the entire Julia set in the quaternions as well. In other words, extending to the quaternions could provide us with nothing new. Fortunately, some Julia sets can easily be seen to extend beyond the complex plane, forming truly 4-dimensional objects.
Julia sets in the quaternions
243
Fig. 16. This is associated with the formula (0.617 Fig. 18. This quatemionic Julia set is associated with the cubic + 0.774/)x( { -x). The repeated pattern of holes in this shape polynomial, x^ + (0.596 + 0.161/), showing a three-fold patresults when the imaginary axis intersects the planar Julia set tern resulting from the singularity of the cubic mapping. multiple times. Consider the polynomial p(z) = ax^ + b, where a and b are complex numbers, and suppose furthermore that p{z) has an attractive cycle in the complex plane. That means there is an area in the complex plane of points z such that p^"\z) converges into the cycle. If we show that other points outside the complex plane are also attracted into the cycle, that will imply that the domain of attraction to the cycle, as well as the Julia set, extend beyond the complex plane. This is in fact true, and a proof will be presented in the appendix. Generally the polynomials of the form
ax^ + bdo have Julia sets that extend, although other polynomials, like ax^ + bx, do not share this property. How we compute and visualize a Julia set in the quaternions Techniques for computing and viewing quaternion Julia sets were presented in [8]. We shall briefly review the methods used. The first problem is to model the Julia set in such a way as to be tractable for 3D computer graphics. The second problem is to construct a 3D image that conveys the fractal nature of the object. How 4-dimensional quatemionic Julia sets can be computed in three dimensions The quatemionic Julia set as defined is a subset of 4-space, and such sets can in general only be sampled, not fully exhibited in one 3D picture. However, in the particular case that the polynomial has complex coef-
Fig. 17. An illustration of (-0.6 + 1.04/)x( 1 - x), associated with a four-cycle. The long strands result from choosing the imaginary axis to cross multiple components of the planar Fig. 19. A three-dimensional slice of a Mandelbrot set of x^ - c, in the quaternions. Julia set.
244
ALAN NORTON
ficients we can use certain symmetries to reduce the dimension of the problem. Consider a three dimensional subspace of the quaternions that we obtain by adjoining to the complex plane any quaternion g that lies in the plane ofj and k. The four dimensional Julia set intersects this three-dimensional space with a set Jg that depends on the q chosen. In fact, the sets 7^ are congruent (i.e., of identical geometric shape) regardless of the choice of ^. This means that, in order to completely understand such 4-dimensional Julia sets, we need only compute their intersection in one 3-dimensional space containing the complex plane. For example, we can use the space spanned by 1, ij. Computing the 3D Julia set In theory these could be computed by the same simple algorithm we presented above for complex Julia sets. The polynomial could be iterated, starting with each point on a 3D grid, determining for each such grid point whether the corresponding quaternion iterates to infinity. In practice, that method is intractable, requiring evaluation of billions of grid points to obtain moderately high-resolution pictures. To compute illustrations for this article, the amount of computation is substantially reduced by only computing boundary points, rather than evaluating every vertex on the grid. The algorithm follows the boundary of the basin of attraction for a cycle, wherever the boundary may lead, tracking it through a 3-dimensional grid. Points far from the boundary are never evaluated. By selectively following various components of the basin of attraction, it is possible to determine how these components are connected, without determining the whole Julia set. Figs. 6-9 show different components of the basin of attraction to the four-cycle associated with p{x) = jc^ + (0.2809 - 0.53/). By computing and viewing them separately we determine how they are interconnected. Making pictures of 3D fractals Once the Julia set has been computed, as a set of vertices in a three-dimensional grid, a second computation is required to produce a two-dimensional image, suitable for raster display. Because of the fractal nature of the surface it is important to present the image in a manner that conveys information about surface texture. When we view real physical objects, we understand the three-dimensional surface structure by noticing shadows and shading on the surfaces. Similar visual cues must be generated by the computer if we are to perceive the surface structure. In the images presented here, we simulate the surface illumination by a "z-buffer" algorithm [ 8 ]: All surface elements (i.e., grid points) are projected into a depth buffer to determine the element closest to the light source. Only surfaces visible to the light source receive illumination. Only after the illumination is complete, and a brightness value is known for each surface element, is the actual image computed. This is done through another z-buffer projection to the viewer.
Interconnections and loops in Julia sets The images of quatemionic Julia sets, resulting from the above computation, reveal a surprising wealth of detail, not obviously deducible from the Julia sets in the complex plane. Perhaps the most striking features of these shapes are the long strands or loops that interconnect different portions of the complex Julia set. Consider for example the shape depicted in Fig. 6. This shows the complex Julia set as a planar slice through the quaternionic Julia set. Only one component of the basin of attraction to the four-cycle has been followed into the quaternions. We see how some of the planar components (colored yellow) become interconnected in three dimensions, and others do not. We can alter the loop interconnection pattern (and therefore the quaternionic Julia set) without changing the complex planar Julia set. For any angle B, the formula e^\^ + 6^"'V defines a Julia set in the complex plane that is congruent to the Julia set of x^ 4- c. This just rotates the Julia set of x^ -I- c by the angle B about the origin in the complex plane. This change of the formula does more than just a rotation in the quaternions, resulting in a change in the topological structure of the Julia set. See for example Figs. 10 and 11, illustrating the quaternionic Julia sets that result when the TT
TT
angle B is, respectively, - and - radians. 2 6 We shall show how one can predict these interconnections, and provide a mechanism for obtaining a set with desired connections. To explain the interconnection patterns it is necessary to discuss the squaring mapping p{x) = x^ in terms of how it acts on the 4dimensional space of quaternions. The squaring mapping and its critical set in the quaternions Recall first how the squaring function acts on the complex plane. If we represent a complex number in polar coordinates, z = re'\ then its square is z^ = r'^e^'^. Squaring results in a doubling of the polar angle, so that the mapping wraps the plane twice around the origin. Squaring is a two-to-one mapping except at the single critical point, 0, which is mapped to itself Similarly, in the quaternions, the squaring map is usually a two-to-one map: A quaternion and its negative have the same square. However, there is a much larger critical set, where the mapping fails to be twoto-one. Recall from the definition of quaternion multiplication that /^=7^ = A:^ = - 1 . This shows that - 1 , at least, has more than two square roots. In fact, there is an entire two-dimensional sphere of quaternions q such that q^ = - 1 ; namely q can be any norm-one quaternion with zero real part. The critical set of the quaternion polynomial ax^ + bis precisely the set of quaternions of zero real part. The above examples illustrate the fact that the quaternion squaring map fails to be two-to-one precisely on that set of quaternions of zero real part; the square of any such quaternion lies on the negative real axis.
Julia sets in the quaternions We describe the squaring mapping as follows: Let L'be the set of quaternions with positive real part, and -U those with negative real part. Under a squaring operation, both C/and -C/are mapped onto the complement of the negative real axis. Every quaternion, except those on the negative real axis, has exactly two square roots, one in (/and one in —U. The boundary of U (the quaternions with zero real part) is folded onto the negative real axis, taking all points of the boundary of radius rto the negative real number —r^. Collapsing of two-spheres Note that the inverse under the squaring map of any negative real number is a two-dimensional sphere, so that the action of the mapping is to collapse such spheres to points. This "collapse of 2-spheres" has consequences in the geometry of shapes invariant under a squaring operation. Suppose a set 5 is invariant under the polynomial ax^ + b. If a point q of S lies in the set which is collapsed to a point under the squaring, then invariance of 5 implies that the entire collapsing 2-sphere containing q lies in S. Since the Julia set is an example of an invariant set, this implies the existence of numerous 2-spheres in the Julia set, if the Julia set crosses the set of quaternions with zero real part. The loops in the 3-dimensional shapes pictured here can be explained by this phenomenon. The 2-spheres in the Julia set correspond to 1-spheres (loops) in the 3-dimensional slices of the Julia set that we are displaying. The loops that are visible in the illustrations result from intersections between the Julia set in the complex plane and the imaginary axis: If such an intersection occurs at a point P in the complex plane, then there is a loop in the 3D shape, connecting P and -Pin a. circle. Once one such loop L exists, there will occur in the Julia set an infinite cascade of other loops, n a m e l y / - • ( L ) , / - ' ( / - ' ( Z ^ ) ) , • • . , etc. How can we determine the topology of a qiiaternionic Julia set? The discussion above gives a recipe for constructing loops in the quatemionic Julia set. More generally, we can design Julia sets with various interconnection patterns. Consider again the formula fc = x^-\- c, having complex planar Julia set Jc, and suppose thatX has an attractive cycle, so that Jc is the boundary between the points (in the basin of attraction) that are attracted to the cycle, and the points attracted to infinity. If two components of the planar basin of attraction are located diametrically opposite, we can modify the formula to cause those components to be interconnected by a loop in the quaternions. This is done as follows: Choose a line through the origin that intersects both the opposite components. Let d be the angle of rotation (clockwise) between the positive X-axis and the line. The formula to be iterated in the quaternions is then e'^x^ + e~'^c. This formula then has the same complex planar Julia set as^, except that it is rotated by the angle d about the origin. In the
245
quaternions, however, the two components to be connected now lie on the imaginary axis, so there will be a loop (more precisely, a two-sphere in four-space) in the quaternion basin of attraction, intersecting and connecting them both. In some instances, not only one loop, but an infinite cascade of interconnected loops are created by this process. Suppose for example that a component of the 2-D basin of attraction that intersects the loop contains a point of the attractive cycle (not just a preimage of the cyclic point). The connected 4-dimensional component of that cyclic point will then be an invariant set under the mapping/. The invariance of this component implies that it will contain an infinite number of loops, preimages of the starting loop. One final example to illustrate this technique. We have seen already (in Fig. 2) the complex planar Julia set ofx^ — I. When computed in the quaternions Fig. 12 results, a surface of revolution about the x axis. The only interconnections are those introduced by the components on the imaginary axis, and all of the loops are simple rings about the x axis. Instead, let us rotate the complex Julia set by 90 degrees, obtaining the formula i{x^ + 1 ) . The components of the basin of attraction, formerly situated along the real axis at - 1 and +1, are now along the imaginary axis at +/ and —/. This causes the component containing — / and its opposite, the component containing /, to become connected in the quaternions. By considering the preimages of this pair (these are necessarily connected as well), it is not difficult to showthat all of the quaternionic basin of attraction becomes divided into just two connected components, illustrated in Figs. 13 and 14. The red component consists of points attracted to 0 on odd iterations, and the yellowpoints are attracted to 0 on even iterations. These two components fit together (and intertwine) without overlap, as illustrated in Fig. 15. Other directions We have only presented some of the simplest geometric manipulations that can be imposed on the quaternion Julia sets. Figs. 16-18 illustrate some of the further directions that one can explore. These depict the formulas (0.617 + 0.774/)A-( 1 - x), (-0.6 + 1.04/).Y(l - x), and x^ + (0.596 + 0.261/), respectively. Fig. 16 shows that, by careful placement of the critical set, it is possible to cause repeating patterns of holes in the Julia set (rather than repeating patterns of interconnectivity). Fig. 17 demonstrates how long strands in the quaternionic Julia set can be induced by appropriate manipulation of a '^stringy" Julia set in the complex plane. Fig. 18 shows the Julia set of a cubic polynomial, illustrating that the critical set of higher-degree polynomials can similarly be manipulated. Mandelbrot sets in higher dimensions Implicit in the above discussion (but not proved here) is a method for describing the structure of quatemionic Julia sets for quadratics of the form ax^
246
ALAN NORTON
+ b, with a and b complex numbers. That structure can be derived from a knowledge of the planar Julia set together with a parameter 6, determining how the imaginary axis (and therefore the critical set) intersects the planar Julia set. A three-dimensional space (the planar Mandelbrot set, together with 6) is required to parameterize these dynamical systems. There is a space that serves as Mandelbrot set for these functions, classifying the dynamics that occurs in the quaternions. Unfortunately, that space can be embedded only in four dimensions, so we can only show three-dimensional slices as exhibited in Fig. 19. This Mandelbrot set can be identified with the boundary of the set of pairs of complex numbers ( z , c) such that fc"\z) remains bounded as « - • oo. The slice of this shape in Fig. 19 is the subset defined by restricting c to values on the boundary of the central component of the Mandelbrot set.
of equicontinuity: A set of functions {/} is said to be equicontinuous at a point x if for any constant 5 there is an € such that for every / \f{x-^h)-f{x)\
0 is positive real. Despite Gauss* assertion that "the theory of numbers is the Queen of mathematics" because queens do not dirty their hands with grime, this branch of mathematics is increasingly being applied. Thus, the quadratic Gauss sums )| < 7 , |T(z^°>)| < 7 the corresponding values of z^' ^ are generated by the transformation
In Fig. 3, we again apply the secant method to z^ 1 = 0, selecting our initial guess z^°^ from
T(z^'^) = IR(z^^)),
>) = T(z^^>)
This time we seem to have wielded the scalpel carelessly. The structure revealed is distorted and uninformapping the real and imaginary parts of z^^^ to the mative. Perhaps this is not a good plane to slice along? But taking a similar slice—that is, interchanging the horizontal and vertical axes, respectively, and generating z^'^ from z^'^ = z^^^ + e, where e = 0.001 (1 + /). real and imaginary parts of z^°^ to obtain z^'^—through Each starting point is assigned a color depending on a different object gives good results. Fig. 7 is just such the root it ultimately leads to, and the parity of the a slice through the object sin(z) = 0; z^°^ lies in the number of iterations required to reach that root. When range 64 iterations from a given starting point have not led |IR(z)| ^ 110, |T(z)| < 1.5,
T ( » ) _
>)| < 2
Fig. 2. The secant method applied to find the real root of x^ _ J= Q
^ , , Fig. 6. The secant method applied to find the three complex roots of z^ - 1 = 0; z^'^ obtained by interchanging real and complex parts of z^^K
Fig. 3. The secant method applied to find the three complex roots of z^ - 1 = 0; z^'^ set to z0. For the fourth, suppose for induction that c < Cn implies f'„(c) < 0. Then (f^ic^Y = 2 . / „ ( c ) . / ; ( c ) , which is negative for c < c„. Now f'„+\(c) = 2« / . ( c ) - / ; ( c ) + 1 =(/„(c)2)'+ l , a n d ( / , ( c ) Y = 2(fn(c))^ + 2'f„{c)'f'„(€), which is positive for c < c„, and so{f„{cY)'is monotone increasing for c 2. (Note that for each of these polynomials, z = 0 is the unique critical point.) For even m, M{m) has a spike along the negative real axis and so our Cycle Finder could easily be adapted tofindthe center of the left-most«-cycle midget along this spike. For each even m, the family of polynomials defined by gi(c) = c and for n > 2,g„(c) = (g„-i(c)r
12 16 10
20
12
24
To illustrate the uniformity of the convergence, we present the difference ofRn,(40) from the claimed limit:
+ c (4)
| i ? 2 ( 4 0 ) - 4 | < 10-2' | i ? 4 ( 4 0 ) - 8 | < 10-^2
qualitatively exhibits much of the same behavior as the family X(^) of Section 3. To find a good initial guess for the secant method with the f„(c), we used the observation that^( - 2 ) = 2 for « > 2. For even m > 2, c = —2 is a very bad initial guess. To find a better initial guess, use
\Re(40)-
121 < 10-^'
\Rs(40)-
161 < 10"^
|i?io(40)-20| < 10'^^ | / ? , 2 ( 4 0 ) - 2 4 | < 10""
Proposition 4: For even m, let Coo = -2'^^'""'^ Then for«> 2,g„{Coo) = -Coc. Proof: For fixed m even, induct on n. For « = 2, note g2(c) = c'" + c, sog2ic^) = (-I'^^'^-'^r - 2^/^'"-'^ = 2i/('"->).(2 - 1) = I'^^'^-'K Assume ^„-,(Coo) = -Coo, and observe gnic^o) = (g"~\c^)r + c^o _ /2^/('"~'))'" — 2^^^"^~^^ = 2^^^"^~^^*(2 — 1) = 2i/(w-i)^ j - |
Note that for each even m, Coc = - 2 '^^'""^Ms a Misiurewicz point for g„(c) with the given value of m: gniCoo) = -Coo 2indg„ig„{Coo)) = gn(-Coo) = "Coo- That is, Coo is eventually fixed, but is not fixed. (In general, recall such a point is eventually periodic, but is not periodic.) Misiurewicz points are powerful tools for understanding dM, but we shall not pursue this further here. Since the centers of the hyperbolic components are dense in dM(m) (the argument given on page 101 of [1] extends directly to M(m)), and since the graphs Q^gn{c) have zeros approaching c^ as n increases and have no zeros less than Coo, we see that CQC is the leftmost point of M(m) along the real axis. For each even m, using Coo and Coo - c as initial guesses, the secant method applied to ^„(c) converges to the center of the left-most «-cycle cardioid component along the negative real axis. Repeating the calculation of the limit for large n of the ratio Fig. 5. Top: the log of the distance between the centers of successive w-cycle midgets in our series, as a function of the cycle number n,3 ^ n ^ 101. Bottom: the log of the headto-center distance of successive «-cycle midgets in our series, i?m(«) = as a function of the cycle number «, 3 ^ « ^ 101. C„+2
276
M. FRAME, A. G. D. PHILIP, and A. RoBucri
Table 1. Cycle number versus the ratio of distances between centers of successive midgets in our series.
^
Cn - Cn+1 Cn+1 - Cn+2
3 4 5
4.16637414605908662208496455654839111377920160972260972260354 4.07459062274231735159872047478088055695713550822857469822557 4.02710240282901100185576866924130444467989408991256485727581
6 7 8 9 10 11 12 13 14 15 16 17 18
4.00896145399839807438351789583510757789206905695806750914514 4.00279737020555418877607870167518113275671966025453046005272 4.00083979224262016238306903536659879312871447469506726371456 4.00024517934233964400834854096899560219758409417089377370461 4.00007011346947268604441935445897870877419505642951991048702 4.00001973395248636269474770773131172432979721769628461560051 4.00000548496041719596635305681848766516348688043312852899005 4.00000150911421351233416983822142941109388727464014583290479 4.00000041174754750354060161134376777114411930757412052662773 4.00000011155417077780054836089339684144202559220741679612024 4.00000003004286630462413131008633668373963446705923881158999 4.00000000804929767225869647538780671141504228956751437866251 4.00000000214696970508878925854772371226865818738297428307093
19 20
4.00000000057040375014435997223335468317845104367457196263031 4.00000000015101626851953529433021629056983224685242576916949
21 22
4.00000000003985789976446295084695921763677430746956084488204 4.00000000001049043311938054289697531184468438351487206318541
23
4.00000000000275409782443605834183826009929569225117701075806
24 25
4.00000000000072139684225845777744272378692858709212242616572 4.00000000000018856730710209327881315809436431153971247802389
26
4.00000000000004919635090990112683171621201009654984064735376
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
4.00000000000001281271876107028681967591528956519905441238843 4.00000000000000333158744866636064592263708822339640222221017 4.00000000000000086499880176628997376054102053109799957119195 4.00000000000000022427518534149746454013573957615773096013330 4.00000000000000005807516756035581694248314990257490858270184 4.00000000000000001502038469633424713050425587400643598046215 4.00000000000000000388049437565084338365270649189938510756026 4.00000000000000000100147314427180282663159623930366237300917 4.00000000000000000025820567369677466139102603627653680330808 4.00000000000000000006651076531763883981033834237978619610126 4.00000000000000000001711752805425865916238117310636739666795 4.00000000000000000000440184119477690209311325917845420182901 4.00000000000000000000113107509399728484891236447207677886078 4.00000000000000000000029042247232508604363690495402606935065 4.00000000000000000000007451904278771271876144959821830965622 4.00000000000000000000001910811687353848165341955148168635444
43
4.00000000000000000000000489661826253719590411926222864384583
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
4.00000000000000000000000125405182667244284872091482587763006 4.00000000000000000000000032098727192764668035300389656328035 4.00000000000000000000000008211539679679566213144479582280809 4.00000000000000000000000002099599390291991354365965730507100 4.00000000000000000000000000536578465166022788861452198401138 4.00000000000000000000000000137064270689761934782854129186472 4.00000000000000000000000000034995981272004543087585982715063 4.00000000000000000000000000008931473717892150619864643204065 4.00000000000000000000000000002278488029445791366958197682504 4.00000000000000000000000000000581026907354636269737558641106 4.00000000000000000000000000000148107951836956174433891965452 4.00000000000000000000000000000037739794208813320358348567379 4.00000000000000000000000000000009613150114596899277056034533 4.00000000000000000000000000000002447837919247617116131216160 4.00000000000000000000000000000000623097077461502353249631874
Scaling along the spike of the Mandelbrot set
277
Table 1. (Cont'd.)
^ 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
4.00000000000000000000000000000000158558668777775106866604971 4.00000000000000000000000000000000040335767047543656355201610 4.00000000000000000000000000000000010257966725160883998437994 4.00000000000000000000000000000000002607997922108963477018896 4.00000000000000000000000000000000000662876040731926488607073 4.00000000000000000000000000000000000168438150234153026989855 4.00000000000000000000000000000000000042789322571331107956985 4.00000000000000000000000000000000000010867276896030989791626 4.00000000000000000000000000000000000002759305787307300648501 4.00000000000000000000000000000000000000700448087651713462274 4.00000000000000000000000000000000000000177767432119150440605 4.00000000000000000000000000000000000000045105710581343128910 4.00000000000000000000000000000000000000011442390783224661917 4.00000000000000000000000000000000000000002902088480278385401 4.00000000000000000000000000000000000000000735894816187651331 4.00000000000000000000000000000000000000000186566878076426577 4.00000000000000000000000000000000000000000047290013026485080 4.00000000000000000000000000000000000000000011984576633465879 4.00000000000000000000000000000000000000000003036662502577622 4.00000000000000000000000000000000000000000000769295211697193 4.00000000000000000000000000000000000000000000194856199437495 4.00000000000000000000000000000000000000000000049347148987673 4.00000000000000000000000000000000000000000000012495062028993 4.00000000000000000000000000000000000000000000003163334202766 4.00000000000000000000000000000000000000000000000800725724571 4.00000000000000000000000000000000000000000000000202654474612 4.00000000000000000000000000000000000000000000000051281879520 4.00000000000000000000000000000000000000000000000012975035097 4.00000000000000000000000000000000000000000000000003282400078 4.00000000000000000000000000000000000000000000000000830260345 4.00000000000000000000000000000000000000000000000000209980167 4.00000000000000000000000000000000000000000000000000053098812 4.00000000000000000000000000000000000000000000000000013425645 4.00000000000000000000000000000000000000000000000000003394147 4.00000000000000000000000000000000000000000000000000000857970 4.00000000000000000000000000000000000000000000000000000216851 4.00000000000000000000000000000000000000000000000000000054802 4.00000000000000000000000000000000000000000000000000000013848 4.00000000000000000000000000000000000000000000000000000003498 4.00000000000000000000000000000000000000000000000000000000883 4.00000000000000000000000000000000000000000000000000000000223 4.00000000000000000000000000000000000000000000000000000000056 4.00000000000000000000000000000000000000000000000000000000014
Motivated by these suggestive results, we give an ai^gument supporting this observation: for each even m, lim^,^ Rm{n) = 2m. Using the notation of Proposition 4, write points near c^asc^^ + s, and expand g„(c^ + e) = -c^ + a,fi + p„(e), where p„(e)is simply all the higher-order terms of g„(c^ + e). For example, ft(Ca, + e) = (C.. +«)"• +(Co. + £)
= -Coo + a2*C + P2(c)
With the multinomial expansion we establish the recursion relation a„+i = a„- nt-i-c^)"'' + 1. Now writing c„ = c^ + e„, we have 0 = g„(c„) = g„{c,^ + e„)!==i-c^ + a„ •£„, whence e„t=>Coo/a„ = e„. It follows that
1 - - ^
(5)
Cn+2
278
M. FRAME, A. G. D. PHILIP, and A. ROBUCCI
Table 2. Cycle number versus the ratio of successive head-to-center distances for the midgets in our sequence.
n 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
'n - "n Cn+1 - hn+1 18.3401551994738078932293364270477004897785651570168500752764 16.9161183378306161702891764725654156643446147792235057394940 16.3085803740513327005257203105555287743134320449526969582979 16.0978321921328113285899928603600429128825482691063137539968 16.0297704370594686295146318159185441569131503544733273560405 16.0087874423429305973593640970435509561252722245350994806777 16.0025347635074281843881918406858425056673654910371699614997 16.0007183225733905134024956364052860491842074579038390280277 16.0002007520316907404888446214546727496170948444828839394015 16.0000554819652667942813475626919991804253118466696285494226 16.0000151940691096469587282777717463601460537372365258032764 16.0000041294185874686103949264713484271893166522228129959041 16.0000011150804954166347568476884785217414081172023977429657 16.0000002994516248697882485964200301170907943279976569103495 16.0000000800332844320451599356735908558664204136049505306140 16.0000000213009183023437288982263750885678201123057289530762 16.0000000056484229525721835591242374636811579891077268598887 16.0000000014928337032418059687293769574708956441984829448625 16.0000000003934171913107017701898556874707084164002808234904 16.0000000001034034963382996876636889847766229992526222249331 16.0000000000271131737125980748796832226074433941310049146265 16.0000000000070938683351807493790564906693819166998015290823 16.0000000000018523608105547634787376943709278194873666851535 16.0000000000004828136343287401844607767604061854160531723825 16.0000000000001256342665072699371036302017294626013444377153 16.0000000000000326412811109556568337534673224741868084741582 16.0000000000000084684993763806587856528094589475056406989989 16.0000000000000021941719182935193477140650342670851609427130 16.0000000000000005678004832128563027938017789791674207747931 16.0000000000000001467661680832563870739638702954127058537484 16.0000000000000000378953647558028740223109014921345458822604 16.0000000000000002372810458549583308209820628681165837127022 15.9999999999999997750126891568508622559412499651631196728737 16.0000000000000000006485442650120188546072574861921814672882 16.0000000000000000001668384988115546260638736594985423754484 16.0000000000000000000428852328425261346200479239420440674917 16.0000000000000000000110152102455409031813621972058072093856 16.0000000000000000000028272780701125681849765452206305325123 16.0000000000000000000007251883947099776575418174011007967127 16.0000000000000000000001858893179729543571832640451505460481 16.0000000000000000000000476203843171341732841206030129637264 16.0000000000000000000000121921097850997452137593007705871334 16.0000000000000000000000031197808817605708436550712294161828 16.0000000000000000000000007978837273833521267276081665817865 16.0000000000000000000000002039572731718008808520195594240952 16.0000000000000000000000000521132687620016530483053665531324 16.0000000000000000000000000133025888469821186534635608250748 16.0000000000000000000000000033970195370666077403133215729370 16.0000000000000000000000000008667728306136001353431323212752 16.0000000000000000000000000002210729451897706216968282579268 16.0000000000000000000000000000563653194299708283250403194453 16.0000000000000000000000000000144263348914140737153994248636 16.0000000000000000000000000000036876785047875028668950009118 16.0000000000000000000000000000174823277264000135912059302490 16.0000000000000000000000000002680623584714668750651575971558 15.9999999999999999999999999997155924255655618707462523681616
Scaling along the spike of the Mandelbrot set
279
Table 2. (Cont'd.)
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
16.0000000000000000000000000000000153643222290414029913551954 16.0000000000000000000000000000000039079061431579391931396341 16.0000000000000000000000000000000009936829322638819096101173 16.0000000000000000000000000000000002525973321845697552338315 16.0000000000000000000000000000000000641934828257922582662834 16.0000000000000000000000000000000000163094081513605194310272 16.0000000000000000000000000000000000041426113990682435738710 16.0000000000000000000000000000000000010519676900740893224965 16.0000000000000000000000000000000000002670706325952794379190 16.0000000000000000000000000000000000000677873356680091362054 16.0000000000000000000000000000000000000172017532967996063034 16.0000000000000000000000000000000000000043641681691492276317 16.0000000000000000000000000000000000000011069745035246401051 16.0000000000000000000000000000000000000002807267411904931388 16.0000000000000000000000000000000000000000711774641249565628 16.0000000000000000000000000000000000000000180433107380724608 16.0000000000000000000000000000000000000000045730638612264526 16.0000000000000000000000000000000000000000011588250094837307 16.0000000000000000000000000000000000000000002935960134168339 16.0000000000000000000000000000000000000000000743714436660766 16.0000000000000000000000000000000000000000000188359713877967 16.0000000000000000000000000000000000000000000047697796781486 16.0000000000000000000000000000000000000000000012078562400568 16.0000000000000000000000000000000000000000000003101130220790 16.0000000000000000000000000000000000000000000001276501434379 16.0000000000000000000000000000000000000000000007942675591695 16.0000000000000000000000000000000000000000000054464061200197 16.0000000000000000000000000000000000000000001646024960717090 15.9999999999999999999999999999999999999999998291280292468739 16.0000000000000000000000000000000000000000000000000830371180 16.0000000000000000000000000000000000000000000000001031147495 16.0000000000000000000000000000000000000000000000010152836877 16.0000000000000000000000000000000000000000000000182751063798 16.0000000000000000000000000000000000000000000002111790070561 16.0000000000000000000000000000000000000000000064978156017275 16.0000000000000000000000000000000000000000000582204277914789 16.0000000000000000000000000000000000000000008649892129019734 15.9999999999999999999999999999999999999999990700619955097304 16.0000000000000000000000000000000000000000000000000000003377 16.0000000000000000000000000000000000000000000000000000000853 16.0000000000000000000000000000000000000000000000000000000215 16.0000000000000000000000000000000000000000000000000000000054 16.0000000000000000000000000000000000000000000000000000000013
a„
an+2
Un+i
Cln + \
1
°^ \m-\
lH-m*(-Coo)
n^^ CO. Because of the steepness of the polynomials near Coo, this fesult remains elusive.
CLn i
^
7. CONCLUSION
H
where the limit is evaluated using the recursion relation and the observation lim„-*oo l/a„ = 0. To see this linearization argument is sufficient, we
T h e Mandelbrot set exhibits m a n y scalings. Milnor ^^^ others have generalized the Feigenbaum sequence; we present another approach, not based directly on the self-similarity of the Mandelbrot set, but rather looking for relative sizes and positions of the features associated in other natural ways. Presumably, many more sequences of this type are to be found in the quadratic and in the generalized Mandelbrot sets. While our se-
would have to show that '-^^^^ becomes small as e„
^^^^^^ '' ^ manifestation of a much more elementary feature than are the Feigenbaum a n d Milnor scalings.
xirri'i \
— c )'""'H
— I -^ ^n+1 / m*(-c
)'"~^ = m-l
(1)
280
M. FRAME, A. G. D. PHILIP, and A. ROBUCCI
Mathematics Department of Union College, and with David Peak of the Physics Department of Union College. Considerable support for the computations of this project was provided by Lance Spallholz of the Computer Science Department of Union College.
Fig. 6. The 85-cycle midget in our series, at a resolution of 400 X 300. The magnification is 1.89 X 10 •^, the dwell is 2000, and the center is on the real axis at -1.99999999999 9999999999999999999999999999999999999990107826 1203241533145505932256565548427495965286099483 24978.
Fig. 7. The 200-cycle midget in our series, at a resolution of 100 X 76. The magnification is 5.68 X 1 0 " ^ the dwell is 10000, and the center is on the real axis at -1.9999999999 9999999999999999999999999999999999999999999999 9999999999999999999999999999999999999999999999 9999999999999999426685746903701524868873414969 9219827953939104649515643786208826673859032991 1741950434088623707585559846010582920065846534 438813818139373097636.
we believe this and similar sequences are useful tools for navigating at high magnifications around the Mandelbrot sets.
Acknowledgements—Throughout this project, the authors have benefitted from extremely helpful conversations with K. W. Philip of the Institute for Arctic Biology of the University of Alaska at Fairbanks. Indeed, his picture of a midget at a magnification of 2 X 10^', first mentioned in [4], was the catalyst that began our work. Some aspects of the mathematical analysis were clarified significantly through discussions with Susan Niefield of the
REFERENCES 1. B. Branner, The Mandelbrot set. In Chaos and Fractals: The Mathematics Behind the Computer Graphics R. Devaney and L. Keen (Eds.), American Mathematical Society, Providence, 75-105, (1989). 2. P. Collet and J. Eckmann. Iterated Maps of the Interval as Dynamical Systems, Birkhauser, Boston (1980). 3. P. Cvitanovic and J. Myrheim, Universality for period «-tuplings in complex mappings. Physics Letters A 94, 329-333(1983). 4. A. Dewdney, Computer recreations. Scientific American 260, 12-15 (June, 1989). 5. A. Douady and J. Hubbard, On the dynamics of polynomial-like mappings. Ann. Sci. Ecole Norm. Sup. Paris 18,287-343(1985). 6. J. Eckmann and H. Epstein, Scaling of Mandelbrot sets generated by critical point preperiodicity. Commun. Math. Phys. 101,283-289(1985). 7. J. Eckmann, H. Epstein and P. Wittwer, Fixed points of Feigenbaum's type for the equation/''(Xx) = \f{x). Commun. Math. Phys. 93, 495-516 (1984). 8. M. Feigenbaum, Universal behavior in nonlinear systems. Los Alamos Science 1, 4-27 (1980). 9. A. Gorberg, Ya. Sinai and K. Khanin, Universal properties for sequences of bifurcations of period three. Russian Math. Surveys 38, 187-188 (1983). 10. M. Jakobson, Absolutely continuous invariant measures for one-parameter families of one-dimensional maps. Commun. Math. Phys. 81, 39-88 (1981). 11. O. Lanford, A computer-assisted proof of the Feigenbaum conjectures. Bull. Amer. Math. Soc. 6, 427-434 (1982). 12. B. Mandelbrot. The Fractal Geometry ofNature, Freeman, New York (1983). 13. M. Metropolis, M. Stein and P. Stein, On finite limit sets for transformations ofthe unit interval. / Combinatorial Theory (A) 15, 25-44 (1973). 14. J. Milnor, Self-similarity and hairiness in the Mandelbrot set. In Computers in Geometry and Topology, M. Tangora (ed.). Marcel Dekker, New York, 211-257 (1989). 15. J. Milnor, W. Thurston, Iterated maps ofthe interval. In Dynamical Systems, Lecture Notes in Mathematics (vol. 1342), J. Alexander (ed.). Springer-Verlag, New York (1988). 16. M. Misiurewicz, Horseshoes for mappings ofthe unit interval. Bull. Acad. Polon. Sci. Ser. Sci. Math. 27, 167168(1979). 17. A. G. D. Philip, An introduction to the Mandelbrot set. In CCDs in Astronomy II, A. G. D. Philip, D. Hayes, S. Adelman (eds.), L. Davis Press, Schenectady, NY, 275286(1990). 18. A. G. D. Philip, A. Robucci, M. Frame, K. Philip. Mm., L. Davis Press, Schenectady, NY (1991). 19. S. Sarkovskii, Coexistence of cycles of a continuous mapping ofthe line onto itself Ukrain. Mat. Z. 16, 61-71 (1964). 20. S. Ulam, J. von Neumann, On combinations of stochastic and deterministic processes. Bull. Amer. Math. Soc. 53, 1120(1947).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
281 Chaos and Graphics
FURTHER INSIGHTS INTO HALLEY'S METHOD RAY REEVES
Graphics Research Laboratory, Department of Computer Science, University of Massachusetts at Lowell, 1 University Avenue, Lowell, MA 01854 Abstract—Algebraic analysis of Halley transforms reveals the nature of the so-called director nodules that characterise iteration maps.
1. INTRODUCTION
and substituting this in the Halley transform we get:
An earlier note [1] on features of Halley's method when applied to simple polynomials is here elaborated by analysis. The salient features noted were:
H{z):
ziz''^ a) a(z"-\- l/a)
in+ 1) • The fractal nodules in a map of z" — 1 all have the where: a = in-\)' form of a bilinear (Mobius) transformation of the entire map. This factors to: • There are distinguished "director" nodules through which the forward orbits escape to their target basin. \aV • A map of z(z" - 1) exhibits parabolic separators «,io^+i/(i«r/"62-^/") and twice as many director nodules.
-!n
(3)
(4)
So, the Halley transform for this class of polynomial is precisely the product of n Mobius transforms (toScrutiny of the nodules situated on unit circle in the gether with a zero at the origin), each of the anticipated map of z^ — 1 reveal that their own principal nodules form. In the case of « = 7, o: has the value: are also on unit circle (see Fig. 1). It follows that the biUnear (Mobius) transforms that generate them are of a particularly simple form: 2. THE MOBIUS TRANSFORM
which is about 1.042. The pole and zero in these factors are close together and each pair locally dominates the behaviour of the transform. The pole is just inside unit circle, and the zero just outside. which preserves unit circle. The modulus of a appears These factors account for the whole set of director to be about 1.04, and in the case of the nodule at — 1 nodules, and explain the crucial orbit step directing it is real. Such a transform is self-inverse, and will the forward orbit out of the nodule and into the target transform radial lines from the origin into coaxial cir- basin. The remaining (infinite) set of nodules are found cles, exactly as seen at the nodules. Since the map con- by composing the Halley transform with itself to find tains both radial spokes and their images, it is self- where the images of the director nodules fall. Unlike conjugate with respect to a Mobius transformation and its factors, the Halley transform is not self-inverse and does not appear altered by it, but the interior points the orbit does not loop. These images form a sequence of each nodule are mapped into it's exterior. to infinity and to zero, with a spacing that appears to be asymptotic to the ratio a. As well as the principal sequence of nodules along the separators, it must be 3. HALLEY TRANSFORM OF z" - 1 remembered that each nodule is an image of the whole The Halley transform is defined as: scene, and contains all the other nodules in it, which accounts for the myriad smaller nodules seen between f(z) H(z):z(2) those of the principal sequence. For any root-finding iterator, we require the fixed f\z)- r{z)fiz) 2f\z) points of the transform to be just at the roots for which we are searching. It can be seen from eq. (3) that z = The general formula for the primitive «th roots of unity 0 is an unwanted fixed point where the orbit and all is: its images will be trapped. Apart from that, it can be ascertained that equating expression (3) to z does, in fact, have solutions at just the roots of z" - 1. z" - 1 = 0 (z-a) ia*z - 1)
(1)
Reprintedfrom Comput & Graphics Vol 16, No. 2, pag. 235-236, 1992
282
R A Y REE^^P'=^
4. HALLEY TRANSFORM OF ziz"
-1)
The earlier note also discussed the class of polynomials: z(z"-l)
(5)
which, by introducing a root at the origin will clearly make a profound change from the radial spoke pattern. Substituting this in eq. (2) we get:
^(z" + ( ^ ^ ^ ) ^ + 2_,„., ( ^ - 4 ) z" + ( « + l)(« + 2) (« + 2)
(6) Fig. 2. z(z^- 1).
This does not factor into Mobius transforms, because the denominator is quadratic in z", giving two poles for each zero not at the origin. For values of n up to 4, the map is characterized by parabolic separators around each root on unit circle, isolating it from the root at the origin; and by two director nodules on each separator, not one. Since the separators do not meet at the origin, the zeros of the transform are not conspicuous as "stars" on the nodule as the poles are. However, they are seen as isolated spots distance one step from the root at the origin, and colored accordingly. Figure 2 is a general view of z(z^ — 1) and the zeroes are marked there with crosses. They are positioned just inside unit circle. The two adjacent director nodules are seen as stars on the separators, produced by the poles of Halley, consisting of a loop around the image of each root that is not adjacent to that separator. For values ofn greater than four, the separators web over and join up, and the basin about the origin breaks up into a sequence of basins to infinity. The first of these contains a zero of the Halley transform, showing that it is one step away from the origin in Halley distance. For values of n above seven, the adjacent pole pairs are no longer separated on a circle centered at the origin, but are then separated on a constant radius through the origin. In this sense, the separators are no longer a composite of parabolic separators, but are integrated into radial strips of more complex patterns.
Of particular interest are the fixed points of this transformation.
I
(n+l)l
n = z (1) n+ 2 ,2.^(«-4) (« + 2) z" + ( « + l)(« + 2) which reduces to:
,.._(ZL±2),„^. (AT+
1)
1 («+1)
(8)
It can be seen that, as well as the fixed points on unit circle, as desired, there is another set at the apex of the parabolas (also seen as black spots in Fig. 2), where the orbits will be trapped. Although these anomolous points are not attractive, and have no basin, they will trap the orbit by virtue of a finite epsilon of change used as a stopping criterion in a practical method. Notice they are situated just where the basins seem to touch. 5. CONCLUSION
The so-called director nodules form a basis for the whole picture. They correspond directly to the poles and zeros of the Halley transform, and get their status as directors by mapping their interiors to their exteriors, i.e., to the target basin. The other nodules that look identical except for scale, are images of the directors due to repeated Halley transforms, which direct the forward orbit to the directors, where they escape. When the Halley poles and zeros are paired up close to each other, as in z" - 1, they dominate the local behaviour and behave as simple Mobius transforms, as was originally perceived. Analysis reveals unwanted fixed points in the Halley transform that can trap an orbit and give false results as a root-finder. REFERENCE
Fig. l . z ^ - 1 Detail at-1,0.
1. R. Reeves. A note on Halley's method, Computers & Graphics 15, 89-90(1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
283 Chaos and Graphics
VISUALIZING THE DYNAMICS OF THE RAYLEIGH QUOTIENT ITERATION CLIFFORD A. REITER
Department of Mathematics, Lafayette College, Easton, PA, 18042 Abstract—The chaotic behavior of the Rayleigh Quotient Iteration over the complex numbers is explored. The global behavior is seen to be related to the behavior at a point. The contrast between the behavior on non-Hermitian and Hermitian matrices is studied visually. 1. INTRODUCTION
Much recent work has taken advantage of computer generated images to study the behavior of numerical iteration. General references include [1-5] and some examples using specific numerical algorithms are in [6-8]. This note utilizes computer generated images for insight into the behavior of the Rayleigh Quotient Iteration in the complex plane. The Rayleigh Quotient Iteration is a numerical technique for estimating eigenvalues. It typically converges to an eigenvalue quadratically but the convergence is cubic when the matrix is Hermitian. While there is a sense of unpredictability in the convergence, distinct basins of attraction often have smooth boundaries. 2. THE RAYLEIGH QUOTIENT ITERATION
An elementary introduction to the Rayleigh Quotient Iteration can be found in [9]. An advanced introduction is in [10]. The dynamics of a real variable version of the algorithm are studied in [11]. The Rayleigh Quotient Iteration begins with a fixed square, complex, matrix A, an initial estimated eigenvalue IXQ, and an initial estimated eigenvector XQ, then the algorithm iterates the following steps: (a) Solve the system {A - n„I)Y = X„ for Y, (b) let X7+1 be the unit vector in the direction of Y, (c) and let n„+i = X^+iAX„+i. (The Rayleigh Quotient) The matrix /designates a square identity matrix of the appropriate size and the superscript "H" designates a Hermitian conjugate. The iteration halts when the system to be solved is singular, up to numerical tolerance, or the maximum number of iterations is reached. The system is singular exactly when /u„ is an eigenvalue, so this halting condition is appropriate. The program used to generate thefiguresuses floating point computations carrying about 19 significant figures. The system solver uses maximal column pivoting. Experiments with Gauss-Jordan elimination as an alternate system solver resulted in a few changed pels, but did not change the essential features observed. The system was considered to be singular when a pivot of magnitude 10~"* or smaller would have been required. The maximum iteration of 50 was never achieved in these images. Each image uses afixedvector as the initial vector while the initial estimate for the
eigenvalue corresponds to change in position in the complex plane. 2.1. Examples Five basins of attraction are visible in Fig. 1 with the basins colored green, blue, red, magenta, or cyan. Within each basin the iteration count modulo three determines whether black, or a dark shade, or light shade of the appropriate color are used. The appearance of black makes the basin ambiguous, but highlights symmetries. Since three colors are used per basin, the orientation of the basins can be determined in the sense that moving across contours within a basin from black to the dark shade and then to the light shade is moving in the direction of increasing iteration count. Figure 1 results from the algorithm run on the companion matrix of x^ — 1 which is given in matrix (/), see Table 1. The eigenvalues are thefifthroots of unity. All the figures use 1 1 1 1 1 (truncated to the appropriate dimension) as the initial estimate for the eigenvector except for Fig. 1. Matrix (/) has that vector as an eigenvector associated with 1; thus an alternate vector, 1 0 0 0 0, is used as the initial estimate for the eigenvector in that case. The image in Fig. 1 show five basins of attraction dividing the plane into five sectors with no turbulence on the boundary. The Rayleigh Quotient Iteration behaves in the manner that is hoped for; namely, the nearest eigenvalue value to the initial estimate is eventually located. Figure 2 gives the first visual example the author recorded of intertwining basins. Thefigurearises from the algorithm applied to matrix (//). The real eigenvalue dominates the global behavior while the basins of attraction of the complex conjugate pair intertwine within a disk. Notice the symmetry about the real axis and the near perpendicular crossovers of the boundaries of the basins of attraction along the real axis. Figure 3 results from matrix (///). That matrix has one entry changed an imaginary unit from matrix (//). Figures 2 and 3 are very similar even though the eigenvalues for matrix 3 are all nonreal and the intertwining pair of basins do not result from complex conjugate eigenvalues. Figure 4 was generated using matrix (IV). This is a symmetric matrix with one of the middle eigenvalues dominating globally. Figure 5 indicates that Hermitian matrices can have basins with more than one com-
Reprintedfrom Comput. & Graphics Vol 16, No. 3, pag. 341-344, 1992
284
CLIFFORD A. REITER
Fig. 1. The Rayleigh Quotient Iteration on matrix (/) with - 4 < Re (fio) 2) then the corresponding pixel is colored A'}, { D, D'} and finally {E, E'}. Therefore the innerwhite. The complex plane (P has been partitioned into most (smallest) ring is the Or^(z) where z E C or C 2 disjoint sets called basins of attraction. The boundary and the largest ring is the Or^(z) where z G E or E'. between the 2 sets is the Julia set Jc. The set of black Figure 2 was created by first plotting an image of Kc points is called thefiUed-inJulia set and is denoted as like in Fig. 1, then interactively prompting the user for Kc= {ze(P|Or+(z)+^ 00 }. The complement of i^c a particular value of z for which the forward orbit was is the basin of attraction for the point at infinity denoted superimposed on the image. as ^(oo). Note that Jc is the boundary of ^(oo), deFigure 3 shows a single forward orbit for z E D'. In noted as d^(oo) as well as the boundary of Kc such that dAioo) ^ Jc = dKc. Therefore, Fig. 1 is a visual- this case, however, the topology ofOr^ is demonstrated ization of the final behavior of the forward orbits. It by connecting the forward iterates. This presentation says nothing about the orbit itself What path in (P of the same data demonstrates not only do the iterates does the orbit follow? Is it a random path or does it settle down to a particular ring in the disk, but the way have structure? In the case of the Siegel disk the answer that the iterates make up the ring. For example, one could imagine the first point of the ring being foUowed to this question is especially interesting. by the next iterate and so on around the rings perimeter, ^ Presently at Bolt Beranek and Newman Inc., Union Sta- z,, Z/+1, Z/+2, . . . . This is clearly not the case, the trajectory seems to resemble that of a triangle, whose tion, New London, CT 06320. The quadratic Julia sets arising from the familiar dynamical system z„+i = f(z„) = zl + c where z, c are complex, have one of five basic morphologies: (a) a Jordan curve, homeomorphic to the unit circle; (b) a periodic basin of attraction; (c) a parabolic basin of attraction in which the Julia set reaches inward to the fixed point, (d) a dendrite where there is but one basin of attraction, and (e) the Siegel disk[l]. This paper will show how computer graphics can be used to gain a better understanding of the dynamics associated with the Siegel disk morphology.
Reprinted from Comput. & Graphics Vol. 17, No. 3, pag. 321-324, 1993
298
G. T. MILLER
Fig. 1. Filled-in Julia set K_o.39054-o.58679i •
vertices are consecutive iterates, that is being rotated about its centroid. The resulting path of the vertices make up the points in the ring. 3. SIEGEL DISKS IN THE TRANSCENDENTAL JULIA SETS
The quadratic Julia sets are not the only ones exhibiting the Siegel disk dynamics. The Julia sets of the
transcendental function such as e^, sin z, cos z are other candidates. In fact the dynamical system defined by/(z) = X sin z where z,\^G has been investigated by R. L. Devaney [ 3 ] and associates. They have found a Siegel disk in the sine family at X = 0.6 -f- 0.8/ and have produced a video (available from the American Mathematical Society) showing the explosion of the Siegel disk as the critical points for /escape to infinity.
Fig. 2. Siegel disk visualization.
A tutorial on the visualization of forward orbits
299
Fig. 3. Path from the forward orbit of D'.
4. CONCLUSION The time invested in creating fractal images such as these is primarily dedicated to the computation of the forward orbit of each and every pixel in the image. After all the computations, only the final behavior of the orbit (convergence or divergence) is shown in most representations. By visualizing the orbit, a better appreciation for the underlying dynamics is achieved. Also the manner in which the orbit is visualized can give different information. For example, in Fig. 2 it was apparent that an orbit made its way to one of the rings and then was trapped on the ring, never proceeding further to the fixed point in the center. Figure
2, however, did not show how the iterates made up the ring. This was displayed in Fig. 3, when the iterates were connected by lines. Figure 4 shows a larger collection of orbits in the region of the Siegel disk. Watching the image unfold on the computer screen is especially interesting as the rings seem to oscillate in and out from the center of the disk as some of the trajectories near the edge of the disk flare out away from the disk and then return. Although computer experimentation can never replace the rigor of the mathematics, visualization can enhance one's understanding of the phenomena being studied. REFERENCES 1. H. O. Peitgen, P. H. Richter, The Beauty of Fractals, Springer-Verlag, New York, (1986). 2. H. O. Peitgen, Fantastic deterministic fractals. In The Science of Fractal Images, H. O. Peitgen and D. Saupe (Eds.), Springer-Verlag, New York, 189-190 (1988). 3. R. L. Devaney, An Introduction to Chaotic Dynamical Systems (2nd ed.), Addison-Wesley Reading, MA (1989). APPENDIX The C-style pseudo-code for the generation of Fig. 1 is as follows. For the Julia set with the Siegel disk p = -0.39054 and q = -0.58679, The value a is the screen resolution in pixels. 1
Fig. 4. Orbits in the region of the Siegel disk.
2 3 4 5 6 7 8 9 10
Let xmin = ymin = -1.5, xmax = ymax = 1.5, M = 100 dx = (xmax - x m i n ) / ( a - l ) dy = (ymax - y m i n ) / ( a - l ) for(nx=0 - • nx=a){ for(ny=0 -^ ny=a){ X = xmin+nx*dx; y = ymin+ny*dy; count = 0; while ( x * x * + y * y < M and count < maxcount){ tempx = x*x — y*y + p; y = 2*x*y + q; X = tempx; count-f-+;
300 11 12 13 14 15
G. T. MILLER
} if(count= =maxcount) then Plot—the point (nx,ny) } end of ny loop } end of nx loop
To draw something like Figure 2, insert a line after line 9 that will store the orbit as it is being computed. 9.1
xor[count] = x; yor[count] = y;
and then replace lines 12-13 with: 12 12.1 12.2 12.3
if(count==maxcount) siegel (xor, yor, dx, dy); else if (count%2==0) Plot—the point(nx,ny)
Notice the subroutine siegel ( ) that does the plotting of the ring is only called for bounded orbits. The unbounded orbits will be plotted as the level sets in lines 12.2 and 12.3. The subroutine siegel ( ) will expect the arrays xor, yor
and the floating point numbers dx and dy computed in the main program. This is a listing of the subroutine. 16 17 18 19 20 21 22 23 24 25
siegel (xor, yor, dx, dy) float xor [ ], yor [ ], dx, dy; { int i, sx, sy; for(i=0 to i<maxcount){ screen—x = (int)((xor[i]-xmin)/dx); screen y = (int)((yor[i]—ymin)/dy); Plot—the—point (screen—x, screen—y); } end of i loop } end of subroutine
Notice that this code will plot all the forward orbits for the z Ei Kc along with the level sets of the points z ^ Kc. The picture will very quickly become too congested and one may want to do variations on the code to plot just a few of the rings. Perhaps the subroutine siegel could prompt the user for a particular z value, and then it could calculate the forward orbit as in the main program and plot the points associated with the orbit. Notice that lines 21,22 map the z-coordinates of the orbit from the C plane to the screen coordinates where as line 6 maps the screen coordinate (nx, ny) into the z-value of the C plane.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
301 Chaos and Graphics
IMAGE GENERATION BY BLASCHKE PRODUCTS IN THE UNIT DISK HOI SUB KIM,^ HONG O H KIM^ and SUNG YONG SHIN*
^Department of Mathematics and *Department of Computer Science, Korea Advanced Institute of Science and Technology, 373-1 Ku Song Dong Yusung Gu Taejon 305-701, Korea Abstract—After the computer graphical representation of the mysterious Mandelbrot set in the late 1970s, computer graphics are contributing greatly to the representations of natural phenomena and structures of dynamical systems. In particular, the visual representation of the dynamics of a simple complex analytic map becomes afieldof computer art. In this paper, the convergence patterns of sequences of partial products of infinite Blaschke products are visualized and are exploited to generate color graphics images. 1. INTRODUCTION
After the emergence of the fantastic computer-generated images of the Mandelbrot set by B. Mandelbrot and the equally enticing mathematical work of Douady, Hubbard, and Sullivan in the late 1970s, renewed attention was once again drawn to the rich structure of dynamical systems in the complex plane [4-6]. Computer graphics are contributing greatly to the generation of aesthestic art and the visual representations of mathematical functions and physical phenomena [7, 8]. A (finite or infinite) Blaschke product / is an interesting function in itself and plays a very important role in the analytic function theory. For example, any bounded analytic function / on the unit disc of the complex plane can be factored as a product of the Blaschke product B carrying all the zeros of / a n d another bounded analytic function^ without zeros having the same superimum norm as/. In this paper, the convergence patterns of sequences of partial products of infinite Blaschke products are visualized by color graphics images and are exploited to generate aesthetic graphics. 2. BLASCHKE PRODUCTS
the zero function on the unit disc [2,3]. Here is a short and direct proof: If we note that x < e^~^ and , _ ( 1 - \a„\^)(l 1 - \b„(z)\' = 11 - a„z\ then
\BAz)\ =n iwz)i ^expj,{\b„(z)\
\an\ an- z a„ 1 - dnZ
and let Bj,iz) = U^^ib„iz),
N=U2,
\an\ 1 when an = 0. If an the sequence {un} satisfies the Blaschke condition 2( 1 - | as a finite set of grid points of mesh size h and use a finite number K of colors that can be displayed on the graphics terminal
Reprintedfrom Comput. & Graphics Vol. 17, No. 4, pag. 489-494, 1993
302
H. S. KiM, H. O. KIM and S Y. SHIN
Fig. 1. a„ = 11 - ^^^j|^)exp(/v;rrT)
Fig. 4. a„ = (1 - ^ ^ - ^ ) e x p ( , \ / ^ T T )
Fig. 2.a„ = (l-
Fig. 5. a„ = (1 - ^^^py^)exp(,V^TT)
Fig. 3.a„ = (l-
—!-j^jexp(/V^TT).
'
jexp((V/;+ 1).
Fig. 6. a„ = (1 - („+'i)0.i)exp(/V^TT)
303
Image generation by Blaschke products of a computer. Choose a large number M. If N^z) > M for the grid point z, we set N^z) = M. We now assign a color corresponding to the number L = N,{z) (mod K) to the grid point z. 4. EXPERIMENTS AND OBSERVATIONS For a given tolerence € and a point z in D, N^z) depends on the sequence {a„] of complex numbers. First, we consider an = Tne'^" with
rn= 1
1
(«+ l)^
(«+ 1)^
« = 1,2,
The parameters p and ^ measure the growth of r„ and ^„, respectively. The "eyes" in Figs. 1-6 appear at the points a„. The point a„ appears as a zero in Bi^(z) only for N > n (provided Umi^ a„for m < n, as in our case), and so the eyes given by these zeros can have different colors. It is for this reason that eyes appear in figures with a„ not satisfying the Blaschke condition even though the limit function is identically zero. We emphasize that eyes appear at z = ^„ because the product BN(Z) converges (to zero) at a finite value of A'^. The following argument may support that the eyes are asymptotically circular: We note that
Fig. 7. a„ = (1 - ^^j-^)exp(i(n + 1)»').
\Bj,Mz)-Bj,{z)\ ^N+l
~ Z
1 - a^+iz |^iV-l(«iv)|
\Br,-Az)\
1
QN
11 - ^ivz
^AT+i^AT
1
\aN\'
X \aN- z\ = yN+i\ciN- z\ for z near ajs/. Therefore, in a small neighborhood of UN, the points on the concentric circle around attend to have the same color in the graphics images. In Figs. 1 through 6, we can see the effects of the rate of r„ tending to 1 for a fixed sequence 6„ = ]l(n + 1. In Figs. 1 and 2, the sequences {a„} of zeros satisfy the Blaschke condition, and the images are generated with small number of eyes because the moduli go fast to one. Figures 3, 7, and 8 are for g = 0.5, 0.7, and 1, respectively, for fixedp = \. The spiral patterns in these figures reflect the growth of the argument of a„ for different ^'s. As n becomes larger, the absolute value r„ approaches one, and thus the shape near the unit circle is complex because many eyes appear there. For a fixed p, we can observe the more detailed pattern changes by varying q gradually. Similar results can be obtained for different p's and ^'s. We now choose a„ so that they are not dense in the unit circle. For example.
^"^(•-^H^)
Fig. 8.fl„= (1 -
Fig. 9. a„ = (1 -
'
jexp(i(» + D).
jexp(2Tm).
304
H. S. KIM, H. O. KIM and S, Y. SHIN
Fig. 10. a„ = (1 - ^^j-j-jyj jexp(«>,).
Fig. 13. a„ = (1 - ^^-^i^JexpdV^TT).
Fig.ll.a„ = ( l - ^ ^ ) e x p ( ^ )
Fig. 14. a- = ( j -
Fig..2..„ = ( l - ^ ) e x p ( f ) .
Fig. 15. Q„ = (-l)"^'(l -
'
)exp(/(w + D).
'
)exp(i(w + 1)).
305
Image generation by Blaschke products
Fig. 16. (exp(0.07r/)-
Fig. 17.
jexpf/——-J, « = 0(mod5)
|exp(0.47r/) - ^;^77yi)e^p(^";^ ' « ^ 1 (mod 5)
ar,= < ^ e x p ( 0 . 8 7 r O - ^ ^ ; - ^ j e x p | / ^
O.OTT
1 -
(«+l)
jexpl
«-2(mod5)
0.47r
II, n = 0 ( m o d 5
I I, « = 1 (mod 5
«+ \)l O.STT
II, « = 2 ( m o d 5 )
« + 1// | e x p ( 1 . 2 7 r / ) - ^ ^ ^ ^ j e x p | / ^ j , «-3(mod5)
(exp(1.6./)-^^)exp(/^),«^4(mod5).
for fixed A^o- The zeros a„ head out to the unit circle in a periodical pattern of period A^o • This pattern is reflected in the following figures. In Fig. 9, the zeros appear as eyes on its right. The concentric circles around the point at - 1 reflect the following fact:
x^¥A T^¥A
1.2ir
1.67r-
^ j ] , « = 3(mod5)
II, «^4(mod5)
the images in Figs. 16 and 17. Figure 18 is a simple black-and-white rendition of Fig. 2 using the rule L = NJ^z) (mod 2) for assigning black and white to each point. For the graphics in this paper, we choose € = 10"^, h = 0.002, M = 5000 and K = 256 except for Fig. 13,
(1 - ^ i v + i ) ( l + z ) 1 - a^+iz
^
B^(-\) 1
- ciN+i -|l+z|, 1 + aN+
1 +
QN+I
1 +z|
for z near — 1. The points z on a small concentric circle around the point at - 1 tend to have the same number N^z) and hence the same color. This pattern is also reflected in Fig. 11. In Figs. 10 and 12, we can observe that these effects are interfered by respective zeros on the opposite rays. Finally, we make some variations in choosing zero sequences and in color assignments. Figures 13 and 14 have the images like a "jewel" and a "shellfish," respectively. A minor modification of{a„} in Fig. 8 generates a completely different image in Fig. 15. Similar experiments are performed to obtain
Fig. 18.a„ = | l - ^ ^ ^ ^
jexp(/V^TT)
306
H. S. KIM, H. O. KIM and S. Y. SHIN
for which K= 44. They are generated on HP9000 with the screen resolution of 1280 X 1024. 5. CONCLUSION The computer graphical representation of convergence patterns of sequences of partial products of infinite Blaschke products gives a method of generating various color images, illustrating the convergence patterns, and producing beautiful graphics images. The flexibility of this method is the arbitrariness of the choice of zero sequences. The graphics can be transformed in principle to any simply connected region that is not the whole plane by a conformal mapping. We can also apply this method to other infinite products for generating images. Acknowledgement—We wish to gratefully acknowledge the helpful comments of referees on this paper, which greatly improved its quality and to express our gratitude to the CAD
Department, Samsung Electron Devices, Ltd. for allowing us to use their facilities. The second author was partly supported byTGRC(KOSEF). REFERENCES 1. P. Colv^eW, Blaschke Products, The University of Michigan Press, Ann Arbor (1985). 2. P. L. Duren, Theory ofH'' Spaces, Academic Press, New York/London (1970). 3. W. Rudin, Real and Complex Analysis (3rd ed.) McGrawHill, New York (1986). 4. M. Barnsley, Fractals Everywhere, Academic Press, New York (1988). 5. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, Addison-Wesley, Reading, MA (1989). 6. H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer Verlag, New York (1986). 7. C. A. Pickover, Mathematics and beauty: Time-discrete phase planes associated with the cyclic system. Comp. & Graph. 11,217-226(1987). 8. C. A. Pickover, Mathematics and beauty: Turbulent complex curls. Comput. & Graph. 11, 499-508 (1987).
APPENDIX. THE PSEUDO-CODE FOR DRAWING FIGS. 1 THROUGH 8 C C C C
c c c c c
A(I) TOL P Q GRIDSIZE IN COLOR-TABLE COLOR
THE ZEROES OF A BLASCHKE PRODUCT. THE TOLERANCE. THE POWER FOR RADIUS. THE POWER FOR ARGUMENT. THE MESH SIZE. THE MINIMUM NUMBER SATISFYING THE TOLERANCE TO WHICH WE ASSIGN A COLOR. THE RESERVED COLOR AT HP9000. THE COLOR ASSIGNED TO THE PIXEL.
COMPLEX*8 A(5000),CC,BP,Z,OLDBP READ*,P,Q READ*,GRIDSIZE CC=(0.,1.) TOL=l.E-5 GENERATE THE ZEROES OF A BLASCHKE PRODUCT. DO 1=1,5000 A(I) = (1. l./FLOAT(I+l)**P)*CEXP(CC*FLOAT(I+l)**Q) ENDDO COMPUTE THE MINIMUM NUMBER AND ASSIGN COLOR. DO X = -l.,l.,GRIDSIZE DO Y=-l.,l.,GRIDSIZE IF((X*X+Y*Y).LE. l.)THEN Z=X+CC*Y BP=(1.,0.) OLDBP=(1.,0.) IN=5000 DO 1=1,5000 BP=BP*CABS(A(I))/A(I)*(A(I)-Z)/(I.0-CONJG(A(I))*Z) IF(CABS(BP-OLDBP) .LT. TOL) THEN IN=I BREAK ELSE OLDBP=BP ENDIF ENDDO ENDIF COLOR=COLOR_TABLE(MOD(IN,256)) WRITE THE PIXEL AT (X,Y) WITH COLOR ENDDO ENDEX) END
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
307 Chaos and Graphics
AN INVESTIGATION OF FRACTALS GENERATED BY z ^
X/z^n + c
KEN W . SHIRRIFF
571 Evans Hall, University of California, Berkeley, CA 94720 Abstract—This paper explores methods of generating fractals from the mapping z^>^ z~" -\- c and discusses the structure of the resulting images. Lyapunov exponents and cycle periodicity show details of these fractals that are obscured by prior escape-time techniques. The resulting fractals are shown to have a hypocycloid shape. The associated Julia sets can be classified into a variety of types. 1. INTRODUCTION
Several programs and papers have used escape-time methods to produce images of fractals based on the complex mapping Eq. (1), where exponent «is a positive integer. z-"" + c
the Lyapunov exponents of the mapping in Eq. (1). Figure 3 shows the results of this process for « = 2; black points are those with a positive Lyapunov exponent, corresponding to chaotic behavior. According to [4], the Lyapunov exponent X for the mapping z„+i = F{Zn) -\- c can be computed from:
(1)
However, these methods do not clearly show the fundamental structure of the fractals. This paper explores alternative methods of generating these fractals that reveal new structures. These methods are Lyapunov exponent computation and cycle periodicity checking. 2. GENERATING THE FRACTALS
Fractals have been generated from Eq. (1) using escape-time techniques, for example by Gujar and Bhavsar[l] and Glynn[2]. Figure 1 shows a c-plane escape-time fractal generated by starting with an initial z value, iterating the mapping (Eq. 1) with exponent « = 2 and c depending on the pixel, and stopping if the magnitude of z exceeds a fixed bound. Note that the initial value ZQ should be infinity, since infinity is the critical point of Eq. (1). However instead of starting with ZQ = infinity, it is simpler to start with Zi = c, which yields the same result. (A critical point of z ^• F(z) + cis a point where F'(z) = Q. The role of critical points is explained in [ 3 ].) The escape-time technique is not as satisfactory for Eq. (1) as it is for fractals such as the Mandelbrot set, due to the difference in dynamics between the two mappings. For the Mandelbrot mapping, z^^ z^ •\- c, infinity is an attracting value; sufficiently large z values will diverge to infinity. However, the mapping in Eq. (1) doesn't diverge to infinity since large z values get mapped back near c. As a result, looping until z is large is not a rigorous stopping condition for mapping Eq. (1); the structure of the fractal strongly depends on the stopping radius, as Glynn found in [2]. This is illustrated by Fig. 2, which shows a fractal generated by the same method as Fig. 1, but with a stopping radius of 10 instead of 3. This suggests that much of the structure of the fractals in Figs. 1 and 2 is an artifact of the stopping criterion. The remainder of this paper examines methods of generating fractals from Eq. (1) that avoid these artifacts. One method of displaying the fractals is to compute
X= lim - Z
ln\F'{z„)\
(2)
A positive Lyapunov exponent indicates chaotic behavior, and a negative Lyapunov exponent indicates stable behavior. For Fig. 3, the Lyapunov exponent was approximated at each point by performing 250 iterations of the mapping in order for the values to settle, and then summing Eq. (2) over the next 250 iterations. (See [4] for more details on computing Lyapunov exponents.) The Lyapunov method reveals several new features of the fractal, as can be seen by comparing Fig. 3 with Fig. 2. The main difference is that the large dark circular regions of Fig. 2 have disappeared; they are artifacts of the escape-time techniques. These regions correspond to areas that are mapped near infinity by Eq. (1), causing them to exceed the escape-time bound. Figure 3 is much less dense than Fig. 2; it has a lacelike structure and numerous voids. Figure 3 probably shows the fundamental structure of the fractal; its shape does not depend on arbitrary values such as the escape bound. Figure 4 shows a detail of a very small part of Fig. 3; this detail reveals several interesting things. First, there are numerous stable triangular structures resembling the quartic Mandelbrot set generated by z - • z"* + c. Presumably these arise because iterating z~^ twice results in z"*. Second, Fig. 4 is roughly self-similar; zooming in on Fig. 4 to any level of detail results in an image resembling Fig. 4. Finally, all the unstable parts of Fig. 3 appear to have small details resembling Fig. 4. Thus, there doesn't seem to be any uniformly chaotic part of the fractal; there are tiny stable regions everywhere. This probably accounts for the lace-like structure of Fig. 3. A second technique for generating a fractal from Eq. (1) is to color points according to the periodicity of the resulting sequences. For each c value, we can
Reprintedfrom Comput. & Graphics Vol. 17, No. 5, pag. 603-607, 1993
308
K. W. SHIRRIFF
-**^i
Fig. 1. Escape-time fractal generated from z -^ z~^ + c. The initial z value is c; the escape condition is \z\ > 3. Dark points diverge quickly; white points are stable.
iterate the mapping and test if the resulting sequence of z values approaches a cycle. Points leading to cycles can be colored according to the length of the cycle, and points that never enter a cycle but wander cha^ otically can be left black. (An algorithm for finding cycles is given in [5].) Figure 5 shows the results of this process. There is an outer white area in which z converges to a fixed point, a central red region that converges to a 2-cycle, other regions that converge to
Fig. 3. Lyapunov exponent fractal generated from z-*- z~^ + c. Stable points (/>., those with negative exponents) are white; unstable points are black. longer cycles, and black points that apparently don't converge to cycles. If we color periodic points white and nonperiodic points black, we obtain an image nearly identical to Fig. 3. This is not surprising since stable cycles have negative Lyapunov exponents. (Mandelbrot [6] and Peitgen and Richter [7] applied a similar coloring technique to z -^ X(z - 1/z). Interestingly, the resulting image contains quadratic Mandelbrot set "island molecules" analogous to the quartic Mandelbrot sets that appear in Fig. 4.) 2.1. Structure of the fractal By examining fixed points, we can mathematically determine the basic shape of the fractal. Consider the
Fig. 2. Escape-time fractal generated from z -^ z ^ + c. The escape condition is \z\ > 10.
Fig. 4. A very small detail of Fig. 4. The coordinates are 0.546 <x< 0.547, 0.620