CHAOS AND FRACTALS A Computer Graphical Journey
This Page Intentionally Left Blank
CHAOS AND FRACTALS A Computer Graphical Journey Ten Year Compilation of Advanced Research
Edited by
CLIFFORD A. PICKOVER IBM T.J. Watson Researc h Center Yorktown Heights, NY 10598 USA
1998
Elsevier Amsterdam - Lausann e - New York - Oxford - Shanno n - Singapore - Tokyo
ELSEVIER SCIENCE B.V. Sara Burgerhartstraat 25 P.O. Box 211, 1000 AE Amsterdam, The Netherlands
Library of Congress Cataloging in Publication Data A catalog record from the Library of Congress has been applied for. ®The paper used in this publication meets the requirements of ANSI/NISO Z39.48-1992 (Permanence of Paper)
ISBN 0 444 50002-2 © 1998, ELSEVIER SCIENCE B.V. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the publisher, Elsevier Science B.V., Copyright & Permissions Department, P.O. Box 521, 1000 AM Amsterdam, The Netherlands. Special regulations for readers in the U.S.A.-This publication has been registered with the Copyright Clearance Center Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923. Information can be obtained from the CCC about conditions under which photocopies of parts of this publication may be made in the U.S.A. All other copyright questions, including photocopying outside of the U.S.A., should be referred to the copyright owner, Elsevier Science B.V., unless otherwise specified. No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. Printed in The Netherlands
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 mathematica l functions ... Lesser folk, like me, need to hear music played and see numbers rendere d to appreciate their structures . Peter B. Schroede r The line between science and art is a fuzzy one; the two are fraternal philosophies formalized by ancient Greeks like Eratosthenes , the astronome r and poet, and Ictinus, the architect of the Parthenon . Computer graphics helps reunite these philosophies by providing scientific ways to represen t 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 seawee d 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 encourag e 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 antenna s 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 mathematica l patterns in new ways - ways sometimes dictated as much by a sense of aesthetic s as by the needs of logic. Moreover, computer graphics allows non-mathematician s to experience some of the pleasure mathematician s 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 appeare d together in a single sentence . However, computers and computation are now providing humankind with an unlimited landscap e 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 researcher s do with a computer: simulating, uisualizing, speculating, inventing, and exploring. Some of the topics in the book may appear to be curiosities, with littl e 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 unexpecte d practical applications. I urge you to explore all of the topics in this book with this principle in mind. I would like to thank Professo r Jose Encarna9ao , Editor-in-Chief of Compw/er5 and Graphics, and Annette Leeuwenda l 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. Cliffor d A. Pickover Yorktown Heights, New York
This Page Intentionally Left Blank
Introduction
I wonder whether fractal images are not touching the very structure of our brains. Is there a clue in the infinitely regressin g characte r 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, Professo r 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 demonstration s of complicated and beautiful structures that can arise in systems based on simple rules. The section also presents papers on the seemingly paradoxica l combinations of randomnes s 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 mathematic s and art. This book is a smorgasbor d 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 Littl e did I know that I would have my first encounte r 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-vessel s 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 shape d 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 characterizin g and modeling the century-old goose's guts. These days computer-generate d 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 mathematicia n 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 understandin g chaotic processe s and for performing image compression . The dazzling computer-generate d images can be intoxicating, motivating students' interest in math more than any other mathematica l 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-decreasin g cats in Dr. Seuss' s The Cat in the Hat Comes Back, certain aspects of fractal patterns can be made more apparen t 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 geometrica l space. Physicists are interested in fractals becaus e 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 mathematician s 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 littl e computer programming skill. Some readers may wonder why scientists and mathematicians use computer graphics to display mathematica l results. Science writer James Gleick said it best: Graphic images are the key. It's masochis m for a mathematicia n 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 manifestation s of chaotic, or irregular, behavior arising from simple formulas. Get set for the erratic side of nature and mathematic s - the discontinuous , infinitely-detailed monstrosities .
3. Chaos To ancient humans. Chaos represente d 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 phenomen a exhibiting a sensitive dependenc e on initial conditions. Although chaos often seems totally "random" and unpredictable , it often obeys strict mathematica l rules derived from equations that can be formulated and studied. One important researc h 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, supersoni c panel flutter in supersoni c 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. Amalgamate d Researc h Inc., of Idaho, USA, manufacture s space-filling fractal conduits. These devices contain many root-like outlets and are designed to minimize turbulence. The company's engineere d fractal cascad e (EFC) can draw or inject fluid simultaneousl y throughout a mixing vessel. Amalgamated Research' s basic invention replaces random scaling and distribution of free interfluid turbulence with the geometrically-controlle d scaling and distribution of fluid flow through "engineered " fractals. This means that EFCs can be used as fiinctional alternatives to turbulence, acting as engineere d 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 antenna s 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 antenna s hold great promise, becaus e these miniature, virtually-invisible devices may be used in everything fi-om wireless LAN s to cell phones and televisions. Most cellular and wireless devices use wand antenna s protruding from cases . Fractenna s 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, regardles s of the shape of the optical tube. You can use these tubes lik e periscope s by bending them in order to see around a corner. Several years ago, Lee Cook, a fiberoptic researche r 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 developmen t of assembl y techniques and fractal array structures that allowed the Galileo researcher s to prepare highly ordered fiber arrays. One patent has already been granted on these techniques , and Incom, Inc. of Charlton, Massachusetts , has recently purchase d Galileo's fractal fiberoptic technology. Fractal fiberoptics (a trademarke d term) may have been the first engineere d 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 increase d 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 segment s 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 increase d growth: geology, medicine, astronomy, and pure math. Al l of these fields benefit becaus e fractal geometry provides a language and conceptual framework for ill-defined geometries , and the power law inherent in fractals condense s 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 randomnes s of transcendenta l 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 Professo r 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 methodologie s don't usually e more evidence that make use of the scale invariance characterizin gfi-actals,and as we accumulat many real data sets exhibit the long-term dependenc e 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 all fieldswill 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 computationa l power to do proper statistics on DLA clusters and turbulent flow patterns, we may begin to develop some real understandin g of these processes . On a different level, the perceived complexity of our surroundings depend s 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 processe s exhibit scaling, fractals provide an . As we develop our ability to understan d and analyze fractals, important componen t of any language our language for understandin g the world improves and simplifies. I thank Professo r 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 reference s 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 celebrate d fractal program is the freeware Fractint. Developed through collaboration between its main authors ("The Stone Soup Group") and hundreds of interested programmer s and artists, Fractint features numerous fractal types and hundreds of control options. Fractint can be found at http://spanky.trium f 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 abundanc e 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-reviewe d program won the first annual Computers in Physics contest for innovative educationa l 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 Demonstration s 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. (Articl e 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. Decembe r 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 electromagneti c phenomena , biological self-replication, and fractals. Contact: YLEM, Box 749, Orinda, CA 94563.
Contents Preface Introduction
v vii
Part 1. Geometry and Nature
1
Chaos game visualization of sequence s H.IJeffrey
5
Tumor growth simulation W Duchting
15
Computer simulation of the morphology and developmen t of several species of seawee d using Lindenmayer systems J.D. Corbit and DJ. Garbary
19
Generating fractals from Voronoi diagrams K.W Shirriff
23
Circles which kiss: a note on osculatory packing C.A. Pickover
27
Graphical identification of spatio-tempora l chaos A.V Holden and A.V Panfilov
33
Manifolds and control of chaotic systems H. Qammari and A. Venkatesa n
35
A vacation on Mars - an artist's journey in a computer graphics world C.A. Pickover
41
Part IL Attractors
47
Automatic generation of strange attractors J.C. Sprott....
53
Attractors with dueling symmetry C.A. Reiter.
61
A new feature in Henon's map M. Michelitsch and O.E. Rossler
69
Lyapunov exponents of the logistic map with periodic forcing M. Markus and B. Hess
73
Toward a better understandin g of fractality in nature M. Klein, O.E. Rossler, J. Parisi, J. Peinke, G. Baier, C. Kahlert and J.L. Hudson
79
On the dynamics of real polynomials on the plane A.O. Lopes
93
XIV
Phase portraits for parametrically excited pendula: an exercise in multidimensiona l data visualisation D. Pottinger, S. Todd, I. Rodrigues, T. Mulli n and A. Skeldon 103 Self-reference and paradox in tw^o and three dimensions P Grim, G. Mar, M. Neiger and P St. Denis
Il l
Visualizing the effects of filtering chaotic signals M.T. Rosenstei n and J.J. Collins
115
Oscillating iteration paths in neural networks learning R. Rqjas
121
The crying of fractal batrachion 1,489 C.A. Pickover
127
Evaluating pseudo-rando m number generator s R.L. Bowman
133
Part III. Cellular Automata, Gaskets, and Koch Curves
143
Sensitivity in cellular automata : some examples M. Frame
149
One tub, eight blocks, twelve blinkers and other views of lif e J.E. Pulsifer and C.A. Reiter
155
Scouts in hyperspac e S. Shepard and A. Simoson
161
Sierpinski fractals and GCDs C.A. Reiter
169
Complex patterns generate d by next neares t neighbors cellular automata WL i
177
On the congruenc e of binary patterns generate d by modular arithmetic on a parent array A. Lakhtakia and D.E. Passoja 185 A simple gasket derived from prime numbers A. Lakhtakia
191
Discrete approximation of the Koch curve S.C. Hwang and H.S. Yang
193
Visualizing Cantor cheese construction C.A. Pickover and K. McCarty
201
Notes on Pascal's pyramid for persona l computer users J. Nugent
207
Patterns generate d by logical operators M. Szyszkowicz
217
Part IV. Mandelbrot, Julia and Other Complex Maps
219
A tutorial on efficient computer graphic representation s of the Mandelbrot set R. Rojas
225
Julia sets in the quaternions A. Norton
235
XV
Self-similar sequence s and chaos from Gauss sums A. Lakhtakia and R. Messier
247
Color maps generate d by "trigonometric iteration loops" M. Michelitsch
251
A note on Halley's method R. Reeves
253
A note on some internal structures of the Mandelbrot set KJ. Hooper
255
The method of secants J.D. Jones
259
A generalize d Mandelbrot set and the role of critical points M. Frame and J. Robertson
263
A new scaling along the spike of the Mandelbrot set M. Frame, A.G. Davis Philip and A. Robucci
269
Further insights into Halley's method R. Reeves
281
Visualizing the dynamics of the Rayleigh quotient iteration C.A. Reiter
283
The "burning ship" and its quasi-Julia sets M. Michelitsch and O.E. Rossler
287
Field lines in the Mandelbrot set K.W: Philip
291
A tutorial on the visualization of fonvard orbits associate d w^ith Siegel disks in the quadratic Julia sets G.T.Miller
297
Image generation by Blaschke products in the unit disk H.S. Kim, H.O. Ki m and S.Y. Shin
301
An investigation of fractals generate d by z ^^ l/z"" + c K.W: Shirriff
307
Infinite-corner-point fractal image generation by New^ton's method for solving e x p [ - a ( C + z ) ( C - 2 ) ] - l =0 Y.B. Kim, H.S. Kim, H.O. Ki m and S.Y. Shin
313
Chaos and elliptic curves S.D. Balkin, E.L. Golebiewski and C.A. Reiter
321
Nevs^ton's method for multiple roots WJ. Gilbert
327
Warped midgets in the Mandelbrot set A.G. Davis Philip, M. Frame and A. Robucci
331
Automatic generation of general quadratic map basins J.C. Sprott and C.A. Pickover
341
Part V. Iterated Function Systems Some nonlinear iterated function systems M. Frame and M. Angers
347 353
XVI
Balancing order and chaos in image generation K. Culik II and S. Dube
361
Estimating the spatial extent of attractors of iterated function systems D. Canright
383
Automatic generation of iterated function systems XC. Sprott
391
Modeling and rendering of nonlinear iterated function systems E. Gr511er
401
Part VL Computer Art
411
Automatic parallel generation of aeolian fractals on the IBM power visualization system C.A. Pickover 415 Julia set art and fractals in the complex plane I.D. Entwistle 425 Methods of displaying the behaviour of the mapping z —> z^ + // I.D. Entwistle 429 AUTUM N - a recipe for artistic fractal images J.E. Loyless
433
Biomorphic mitosis D. Stuedell
435
Computer art representin g the behavior of the Newton-Raphso n method D.J. Walter
437
Systemise d serendipity for producing computer art D. Walter.:
439
Computer art from Newton's, Secant, and Richardson' s methods D. Walter
441
Author index
447
Subject index
449
About the Editor
451
PARTI GEOMETRY AND NATURE
This Page Intentionally Left Blank
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 repeate d application of dynamic procedures . Questions about the fundamenta l rules underlying the variety of nature and mathematica l 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 repeate d w^hen possible, and inanimate forms such as mountains and snovv^flakes are constraine d 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 mathematic s 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 represen t all kinds of biological objects (for an excellent book on techniques for simulating nature, see Rivli n (1986)). The Fibonacci sequences , as w^ell as a number of published papers, address the generation of mathematicall y derived morphological models for plants (Jena, 1984). Researcher s 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 livin g specimen s (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 successe s provide continuing incentive for more researc h on the mathematica l basis of natural forums. More recent discussion s by David Avnir and colleagues at the Hebrew^ University of Jerusale m 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 developmen t and use of fractal geometry for understandin g 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 computationa l 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 characterizatio n of the lungs' bronchial tree, the Weierstras s 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 VISUALIZATIO N OF SEQUENCES H. JOEL JEFFREY
Computer Science Dept., Northern Illinois University, DeKalb, IL 60115 Abstract—Iterate d function systems can be used to produce a representatio n of complex images. It was recently shown that one can produce visual representatio n of the structure of long (2-100 K) sequence s 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 subsequence s produces nonuniformity in the CGR. The CGR is a picture of the sequence , often with visually striking features correspondin g to sets of subsequences , thus a new set of questions and areas of investigation. This paper present s the technique , severa l examples using DNA sequence s as examples of nonrando m sequence s whose structure is of great independen t interest, algorithms for approximating arbitrarily closely subsequence s correspondin g to observabl e features of the CGR, and a description of a program based on these algorithms that has useful for exploring features of CGRs. Finally, severa l extension s to the basic CGR algorithm are proposed .
INTRODUCTION
It seems to be very difficult for human beings to develop intuition for long sequence s 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-dimensiona l 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 representatio n [4] is a technique for converting the one-dimensiona l sequenc e into a twodimensiona l form that preserve s subsequenc e structure while providing a provocative visual representation . Further, CGR can be used to approximate any set of subsequence s in terms of other sequence s 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 comesup 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 mathematica l 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 (pentagon s within pentagons , a striated hexagon, or heptagon s 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 c a b 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-scoo p appearance . As discusse d in the next section, each point in the CGR correspond s to exactly one subsequenc e (starting from the first base), up to resolution of the screen. Therefore, this graphic pattern indicates repeate d patterns in the gene sequence . The same is true of any other visible pattern. The "double-scoop " correspond s to a comparative sparsenes s of CG pairs in the sequence ; a random sequenc e with all CG pairs has a CGR with a completely empty double-scoo p area. (This is discussed in more detail in Section 4.) 2. Note that any base v^U always be plotted somewher e 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 shade dfilled-in square (see Table 3). 5. The self-similarity and division into quadrants , subquadrants , etc., is a consequenceof the nonuniform probabilities of subsequence s 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 usefulnes s of the CGR for investigating DNA sequenc e 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 sequenc e itself. We shall assume that the sequenc e 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," o r " 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 shade dfill-in square
Fig. 3. CGR of human beta globin region on chromosom e 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 correspondin g 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) correspond s to the initial /c-long sequenc e s. Therefore, {x,y) correspond s 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 sequenc e is always plotted somewher e in the quadrant of square with that label: for any string 5, sa is plotted somewher e in the - F F F Q [ + + + + A ] [ -- — I ] F F f h P7: h - • F F F Q [ + + + + A ] [— —IjFFf i pg: i-»• FFFQ[+++fp]FFfi —IjFFf k p^: j - • F F F Q [ + + + + A ][ p,o: k — + F F Q [ + + + + A ] [ — —IjFFf I p , ,: 1 -H- F F F Q [ + + + + A[ -IjFFf m 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 - • FF
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-++rijr Q Piy q ^ fF[ -—B][+++++I]F r p,6: r -^ fF[ - C ] [ + + + + J ] Fs Pn: s -»• fF[ Dir+++KlF t PiB-1 ^ f F [ — E K + + L 1 F Right branchlets Px9. A - • BF P20: B — Ff+C P 2 i : C - ^ F f +D /722: D ->• Ff+E P23: E - • F f +G /724: G — Ff+ L^y? branchlets P25: H ^ I F 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->f F /7i2: m - • n Pxi. n - • f F F [ — A ] F o P u: 0 — f F F [ — B ] Fp Pis: p ^ f F F [ — C ] Fq p,6: q ^ f F F [ — D ] F /?/^/z? determinate Pif. r - ^ stfF Pis. s -> fF
branch
/7i9: t - » •
u
/72o: u -»• ;72i: V -*• ;722: w - • /723: X - *
fFF[4-+A]Fv fFF[++B]Fw fFF[++C]Fx 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 ] FG P21: G - * f F F [ - P ] FH 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 P 3 . : Q - ^ FQ
A developmenta l sequenc e for Antithamnion densum is shown in Fig. 4. The sequenc e begins with a single cell that represent s 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 subsequen t 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 generate s 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-branchin g basal cell is produced.
Subsequen t apical cell divisions in the branch also result in cells that branch. . The Antithamnion produces two types of branches t in all three species studied here first type, apparen (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 seawee d X \ \ \ X "^Vy '
-A'
V
t I
N N ^
11>
! /;>: / / / / ^
"c^^ **.^ \ \ V\ \ \ \
X f
AN \ \ N
>V \ \ \
^'
/ ;"
*' > ^x / / / /^^ N
f
/'>- - '" '
/ / Fig. 1. Image generate d 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 represen t 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 successfull y capture many of the structural features of real plants, several species in the genus Antithamnion. The L-systems presente d here generate images that look very much like the plants they are intended to represent . A comparison of the
\. \
•
""V
\
\
d by the L-system for A. densum Fig. 2. Image generate (15 iterations).
22
JOHN D . CORBIT and DAVI D J. GARBARY
'^^f^^M Fig. 5. Photograp h of an actual specimen oi A. tenuissimum (From A. Athanasiadis , A comparative study of Antithamnion tenuissimum and three varieties of ^4. Crucialum, including var. scandinavicu m 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 encouragin g 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 Researc h Council of Canada to DJG.
Fig. 3. Image generate d by the L-system for A. tenuissimum (24 iterations).
1
•1 • I 10
Fig. 4. Developmenta l sequenc e showing the first 12 iterations in the developmen t of ^. densum.
REFERENCE S 1. A. Lindenmayer, Mathematica l models for cellular interactions in development : I. Filaments with one-sided inputs. / Theor. Biol. 18, 280-299 (1968). 2. A. Lindenmayer, Mathematica l 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 Biomathematic s 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 representatio n 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 Southeas t 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 biogeograph y 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 describe s how to generat e 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 generate d by recursively creating a Voronoi diagram inside each Voronoi polygon. (A Voronoi diagram consists of nearest-neighbo r 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 pseudocod e description of the algorithm. Figure 1 demonstrate s 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 parameter s 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 emphasiz e 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—point s (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 e for the Voronoi fractal algorithm. Listing 1. Pseudocod 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 generate d by subdivision by 10. The four levels have 10, 100, 1000, and 10000 points.
Fig. 5. Nonuniform distribution on a square . Successiv e 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 researc h 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. Preparat a 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).
This Page Intentionally Left Blank
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 Gaussia n 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).
This Page Intentionally Left Blank
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 l chaos in irregular spatio-tempora l patterns Abstract—A graphical method for identifying spatio-tempora . 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 enthusias m 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 mathematicia n 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 reconstructio n of a low order, strange (apparently with a fractal structure) attractor from numerical l observations . This can be solutions or experimenta 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 reconstructe d 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 processe s of interest are not simply time series, but spatially extensive. Thus, they are spatio-tempora l d in discrete space by patterns, and can be represente 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 whetherspatio-tempora l irregularity (in a model or in experimenta l 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-tempora l chaos can be considere d as a pattern that does not repeat itself as long as the model is iterated [7]: the determinism is guarantee d by a simple model. This is not applicable to experimenta l observations . We have been interested in modelling wave phenomena in cardiac tissue [8] , where recirculation of electrical activity is associate d 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 apparen t only at the fast s front of the rotating vortex; with time, the difference increase and spread s throughout the medium. However, the vortex structure is still apparen t 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 instabilit y 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 successiv e waves [10, 11]. This spatio-tempora l irregularity is obtained in numerical solutions of deterministic partial differential equations, however, if it is spatio-tempora l chaos, it is necessar y to demonstrat e a sensitivity to initial conditions. To demonstrat e 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-tempora l 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.
REFERENCE S 1. A. V. Holden (ed.), Chaos, Mancheste r 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.), Mancheste r University Press, Manchester , UK (1986). 5. P. Grassberger , Estimating the fractal dimensions and entropies of strange attractors. In Chaos, A. V, Holden (ed.), Mancheste r 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-generatio n of turbulent vortices in a two-dimensiona l model of cardiac tissue. Phys. Lett. A., 151, 23-26 (1990). 11. A. V. Panfilov and A. V. Holden, Spatio-tempora l irregularity in a two-dimensiona l 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. Al l rights reserved
35
C h a os a nd G r a p h i cs
MANIFOLD S AND CONTROL OF CHAOTIC SYSTEMS H E L EN QAMMAR ^ and A. V E N K A T E S AN Department of Chemical Engineering, University of Akron, Akron, OH 44325, U.S.A. Abstract—^Becaus e 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 understan d 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) nonfeedbac k where a small driving force is added to the chaotic system and thus the effectivenes s 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 . I t 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-spars e 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 understan d 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 mathematica l 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-dimensiona l 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 dimensionles s reactor temperature , y. dVm ., , . PiTif ,, fqoui - 7 - = (1 - 1000 THEN GOTO 560 IF X < XMI N THEN XMI N = X IF X > XMA X THEN XMA X = X IF Y < YMI N THEN YMI N = Y IF Y > YMA X THEN YMA X = 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
XMA X
'Calculate Lyapunov exponent 'Strange attractor found 'Unstable 'Limi t 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 • (XMA X - XMIN ) : DY = .1 * (YMA X - YMIN ) XL = XMI N - DX: XH = XMA X + DX: YL = YMI N - DY: YH = YMA X + 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 RD A. REITER Department of Mathematics , Lafayette College, Easton, PA 18042, U.S.A. e-wa//:
[email protected] u 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 . Scheme s similar to genetic algorithms can be used to search paramete r 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 constructe d [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 preserve d 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 meansthat the attractor associate d 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 . For example, respect to C„ and D„ is well developed from [1] we know that the polynomial functions that are equivariant with respect to D„ are of the form where f(z) = Vx(u{z), v[z))z -h ViHz), v(z))z"-i 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 subsequen t 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 parameter s 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 connecte d 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 repeatedl y 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 sequence s 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 seminormaUzatio n 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 correspondin g 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 d then f2(0 dominates the z update. We may imagine attractor shown in Fig. 2 as though it corresponde to / = 1 overlai d with the resul t of projecting the the attractor as fitting inside a *can' shaped region in d space where the / coordinate correspond s to the attractor shown in Fig. 3 as though it corresponde 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 d into a much smaller area. symmetry of fi(z) at one end of the can and by the are compresse 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 limitin g 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 limitin g 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 wit h a real coordinate, /. Let fi{z) and f2(z) denote functions in the complex plane which are equivariant wit h 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 (compareto 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 increase s 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 parameter s 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 thousand s 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 estabUshe d the attractors can be mated by taking the parameter s for the outer symmetry from one member of the population and taking the
Attractors with dueling symmetry
65
' ^ - ^ ^ ^ Fig. 5. A semi-inverte d projection of the two 2-D attractors from Figures 2 and 3.
parameter s 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 paramete r ±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 becaus e 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 associate d 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 constructe d using simple automatic measure s of whether the attractor is plausibly interesting. The population of plausible attractors can be pruned to include the most appeahn g attractors . Genetic algorithm like procedure s 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 [13] providing a foundation for the developmen t of code used to generate the images is appreciated . Conversation s with Thomas Yuster regarding potential sinew functions were most helpful. 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-dimensiona l 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 Processin g 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 parameter s for the outer symmetry and the second gives the parameter s for the inner symmetry. Table 2 shows the parameter s used for Figs 2, 3, 5 and 6; Table 3 gives the parameter s used for Fig. 7; Table 4 shows the parameter s used for Fig. 8; Table 5 shows the parameter s used for Fig. 9; Table 6 gives the parameter s used for Fig. 10; and Table 7 gives the parameter s 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.
This Page Intentionally Left Blank
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 MARI O MARKUS' and BENNO HESS
Max-Planck-Institut fiir Emahrungsphysiologie , Rheinlanddam m 201, D-4600 Dortmund I, FRG Abstract—The iterative map x„+i = r„x„ (1 - jc„) is investigate d with r„ changing periodically between two , e.g., {r„} = {BABA ...} or {r„ } = {BBABA BBABA values A and B. Different periodicities are assumed ...}. The Lyapunov exponen t (a measur e of average stability) is displayed with high resolution on the Ay appealing self-similar structures . Furthermore , these images 5-plane. The resulting images have aestheticall allow with one glimpse the identification of a number of system properties : coexistenc e of attractors , superstabl e curves, order by alternation of chaotic processes , and chaos by periodic resetting from a stable into an unstablefixedpoint. INTRODUCTION
METHOD
A number of natural phenomen a can be described by one-dimensiona l 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-Zha botinskii 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 reference s therein). The bifurcation paramete r 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 sequence s {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 encourag e the reader to try out other sequence s of r„ , as well as other intervals of ^4 and B as those appearing in this paper. We emphasiz e that in contrast to most graphical representation s of dynamical systems , our plane is defined by bifurcation parameter s 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 discussion s on chaos see [6, 8-10] and reference s cited there.
For each paramete r pair {A, B) we calculated the Lyapunov exponent
' To whom correspondenc e should be addressed .
X = lim -- 2 log2
dx„. dXn
(I )
where dx„^i/dx„ = r„- 2r„Xn in our special case. We use double-precisio n arithmetics. Since the approach to the limes in Eq. (1) is highly irregular, a reliable convergenc e 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 subsequen t 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 correspond s 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 characterize d 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 representatio n of a rectangula r 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 correspon d to periodicity (X < 0), while the picture background s correspon d to chaos (X > 0). Within the periodic regions, one readily identifies the (dark) superstabl e 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-shape d 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 e of two branches (around A = B = 3.85). Coexistenc means that different attractors exist in the [0, 1]-interval for the same values of the control parameter sA and By depending on the initial condition ^o- At the crossing, one branch covers the other. The branch above is visible here in the coexistenc e region becaus e 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 becaus e of the visibility of its continuations into regions where only one attractor exists. Thus, our overall representatio n 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 generate s 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-overlappin g
coexistenc e 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 correspon d 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 richnessof 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 paramete r 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 processe s 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-dimensiona l paramete r space. Changes of paramete r periodicities and areas of display lead to a never ending cascad e 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 photographi c 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, Observatio n 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 mechanism s in ecology and epidemiology? IMA J. of Math. Applied in Med and Biol. 2, 221-252 (1985). l models with very com6. R. M. May, Simple mathematica plicated dynamics. Nature 261, 459-467 (1976). 7. S. J. Chang, M. Wortis and J. A. Wright, Iterative properties of a one-dimensiona l 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 associate d 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-sectio n of the probably simplest strange attractor of a three-dimensiona l 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-dimensiona l flow of the ODE. The trajectory is dotted for a better visibility of the position of the cross-sectio n at the left side, (b) Poincare cross-sectio n 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-sectio n 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 paramete r space as the collection of all nonexploding orbits, (b) A fiUedin Julia set, correspondin g to the attractive orbit of period 11.
"critical points" with locally infinite contraction which are essentia l in generating the correspondin g 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 essentia l to acknowledge that there exists a gap between the "artificial fractals" generate d by complex analytic mappings, at the one end, and the "natural fractals" generate d 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 encouragin g sign comes
from studies on «-dimensiona l real invertible maps. Even though the basin boundaries found therein are comparably smooth (except for one direction, see Fig. 4), they nevertheles s 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 mechanis m 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 s are so chosen as to yield a chaotic attractor map [eq. (8)]} x„+i = 1 + >;„ - axl, y„+\ = bXn- The parameter 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 considere d as a function of two real variables, lik e 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-Rieman n 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 nevertheles s contains smooth segments , which they ^fx{x,y)ldx=df2{x,y)ldy called the "wil d goose" (Fig. 7). Peinke et ^/.[27] who r space, found smooth segment s dfx{x,y)/dy = -df2{x,y)ldx (3) looked at paramete arising on the boundary beside the remaining self-sim. Fig. 8 presents numerical evidence that are satisfied. The prototypic map, eq. (2), is of special ilar structures interest becaus e it already generate s fractal boundaries . vortex-like structures resembling those of "sea horses" The Mandelbrot set in paramete r space and a filled-in in the original Mandelbrot set may survive {cf. Fig. g Julia set (Fig. 9) shows striking Julia set in the plane of variables are presente d above 3a). A correspondin analogies to the structure seen in paramete r space. in Fig. 3 a and b, respectively. There are several ways to study the effects of deIt seems that destroying analyticity generate s differstroying analyticity in the complex analytic logistic ent structures , characterize d 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 undisturbe d Julia set of eq. (2), respectively , eq. (4), with a = 0. (b-f) Perturbed Julia set of eq. (4), with increasing perturbation paramete r a < 0.
83
Fractality in nature
Fig. 6. Blow-ups of Fig 5b, the self-similar "hook" structure (for technicaldetails, 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 "bifrac- (with x„, ;v„, Ci, C2 E i?) do not fulfil l the Cauchytal"[28] basin boundaries are limited to "very special Riemann equations [eq. (3)]. In the case of eq. (5a), cases of two-dimensiona l maps," whereas , in normal we get two-dimensiona l maps, "striated" fractal boundaries , dfx{x,yMbx^ly ¥= bh{x,y)lby ^Ix, 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, and in case of eq. (5b), we have dense region in paramete r space, therefore, came as a dfx{x,y)ldx^lx + df2{x,y)ldy = lx + ly. surprise. On the other hand, it can be shown that analyticity Both these maps generate geometrically distorted of a map is definitely not a property that has any direct Mandelbrot sets (Fig. 10). The Mandelbrot set of eq. relevance on the dynamical behavior of a system. There (5a), for example, is slightly stretched and rotated r exist infinitely many smooth automorphisms , which, about the origin toward the first diagonal of paramete even though violating the Cauchy-Rieman n conditions space (ci, C2). With an appropriate choice of the two , namely [eq. (3)], posses s structures indistinguishable from free parameters those obtained by the complex logistic map [eq. (2)]. c\ = C1-C2/V3 For example, the maps 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 paramete r 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)
Fractality in nature
85
Fig. 10. Different examples of Mandelbrot sets in nonanalytic maps (for technical details, see Table 1 in Appendix), (a) Stretche d 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 paramete r 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 separate d Mandelbrot-like sets (see [31]), which should be no surprise. We wish to present another astonishing map which gives rise to a three-dimensiona l rotated Mandelbrot set. Eqs.(5) and (7) were designed under the assump tion that the Mandelbrot set and Julia sets may be treated as well-defined sets of the two-dimensiona l
Fig. 11. The basin of attraction of eq. (7) (for technical details, see Table 2 in Appendix), (a) Total view of the transforme d 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 fundamenta l 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 represent s the point of maximal r space and variable (with x„, yn, Zn, Cu C2, Ci Ei R). The Jacobian reads decoupling between paramete Sx(x^ + y^ -\- z^). For x = 0, there are infinitely many space. Fig. 13 shows the deformed Mandelbrot-like set t resemble s the original structure. finite critical points [the whole (y, z) plane generate s which still somewha g Julia-analogou s sets. a zero Jacobian ]. But only when using the origin as Fig. 14 shows some correspondin initial condition, one will generate the original Man- For the time being, we can only give numerical evidelbrot set. This is becaus e the origin is the "point of dence of self-similarity and fractality. It seems possible d with eqs. (14) and (15) inmaximal decoupling" between paramete r and variable that the fractals generate space. Decoupling means that the whole iteration se- clude striated structures not found in the complex anquence is given by the paramete r values independentl y 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-dimen OF FRACTAL BOUNDARIES sional paramete r 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 mechanis m 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 bounds nontrivial fractal boundaries . To motiequal to zero, so that it possesse s no finite critical point: ary, generate
(d)
(e)
Fig. 12. Two-dimensiona l 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 paramete r 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 Leatherseller s Guild for their Scholarship . A.S. and T.M. acknowledg e 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 mechanis m 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/dat a 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 undergoe s before chaos sets in. In addition, by using colour to mimic the effect of a fourth dimension, an improved understandin g of the bifurcation process could also be given. For instance, the interpretation of the "lip " around the edge of the two separat e 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 developmen t of practical methods for
REFERENCE S 1. J. M. T. Thompson and H. B. Stewart, Nonlinear Dynamics and Chaos, John Wiley, New York (1988). 2. J. Guckenheime r 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. Broomhea d and G. King, Extracting qualitative dynamics from experimenta l 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-dimensionalpendulum 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 multidimensiona l 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 Professo r 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/X A in 370 compatibility mode. The resulting WINSOM images may be displayed on an IBM 5080, or the more powerful IBM 6090, graphics workstation.
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
111 Chaos and Graphics
SELF-REFERENC E AND PARADOX IN TWO AND THREE DIMENSIONS PATRICK GRIM, GARY MAR , MATTHEW NEIGER, and PAUL S T. DENIS
Group for Logic and Formal Semantics , Departmen t of Philosophy, SUNY at Stony Brook, Stony Brook, NY 11794 Abstract—The Liar paradox is a familiar sentenc e that assert s 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 semantic s using iteration within an infinite-valued logic. Strange r in two dimensions for the Dualist and in three dimensions attractors and fractal escape-tim e diagrams appea for the Triplist. 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 sentenc e is false. Here our image has been confined to the unit square, reflecting the fact that semantic values for X and Y Its semantica l 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. l rather than simulx„+i , reflecting merely a sequentia Just slightly less familiar is the Dualist, which in- taneous pattern of reasoning , we get the attractor and volves not one sentenc e but two: escape-tim e diagram shown in Figs. 3 and 4. Beyond the Dualist lies the Triplist. Consider for X: Sentenc e Y is false. example a Triplist variation in which each of three F: Sentenc e X is true. sentence s asserts that it is half as true as the difference l pattern of between the other two. Using a sequentia 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 s can be modelled in our logic for this triad of sentence sentence s 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: l sentenc e that asThe Liar paradox is a self-referentia serts its own falsity:
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 sentence s 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 e diagram for X = 1 — y. When we plot an escape-tim these points—mappin g the number of iterations required for X and y to reach a certain "distance" from (0,0), or pure falsehood for both sentences—w e 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 developmen t 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 sentence s 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-tim e diagrams. For Triplist variations we can similarly go on to construct escape-tim e solids, in which l area is colored in each point of a three-dimensiona terms of how many iterations are required for the initial s to reach a certain set of values (x, y, z) it represent distance from (0,0,0) under iteration. Figures 10 and 11 show two views of an escape-tim e 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
VISUALIZIN G THE EFFECTS OF FILTERING CHAOTIC SIGNALS MICHAEL T. ROSENSTEIN^ and JAMES J. COLLINS
NeuroMuscula r Researc h Center and Departmen t of Biomedical Engineering , Boston University, 44 Cummington Street, Boston, MA 02215, USA Abstract—It is well-known thatfilteredchaotic signals can exhibit increase s in observe d fractal dimension. However, there is still insufficient knowledge regarding the underlying cause s of this phenomenon . We provide further insight into this problem through the use of computer animations and three-dimensiona l e to a dynamical ray-tracings.Specifically, we show that lowpassfilterscan induce a nonuniform convergenc system's mean state-spac e location. With chaotic attractors , this convergenc e distorts the attractor's normal geometrica l configuration such that the observe d system acquires increase d 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 researcher s 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-sys tems researc h has focused on the practical use of numerical algorithms for examining systems suspecte d 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 researc h groups [3-6] showed that lowpass filters can increase the observed fractal dimension of a chaotic system, there is still insufficient understandin g of this phenomenon. * Hence, this paper provides further insight into the mechanism s 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-dimen sional 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 paramete r 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 generate d for subsequen t processing . Signal processin g consisted of lowpass filtering the time series using a first-order {i.e., single-pole) filter with the following impulse respons e {h): h[n] = a"' u[n], where a is the filter paramete r (0 < ^ < 1), w is the unit step function, and n represent s 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 presente d 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 ^ Presen t address : Dynamical Research , 15 Pecunit Street, filter output; that is, the chosen filter is an infiniteCanton, MA 02021, USA. impulse respons e (IIR) filter. The correspondin g fre* When estimating fractal dimension,one typically evaluate s quency respons e of this lowpass filter is a relevant quantity {e.g., the correlation sum[7]) over a specified range of length scales . With lowpass-filtere d data, an in1 crease in observe d dimension is apparen t over length scales H{en dominated by the chaotic signal. However, on length scales dominated by noise, one may actually observe a decreas e 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 fil e 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 characteristic s 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 successiv e segment s 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_P I
57.2957795 1
ConstructTube(FIL E *dataFile)
int i; if(HasLinks) { /* first define a unit segmen t 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 segmen t */ for(i=l ; i^i),..., (x^,, y^), whereby the input patterns are vectors of dimension m and the output in the x direction and patterns are scalars.The weights of the linear associato r can be ordered in an m-dimensiona l column vector w Ayii) = -2ybx + aAy{i - 1) and the learning task consists of finding that w, which minimizes the quadratic error in the y direction. An optimal paramete r 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 - yP 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 convergenc e 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-dimensiona l case we could found at w = X^y, where X"^ is the pseudoinvers e of have oscillations in some of the principal directions the matrix X. A solution can also be found using back- and slow convergenc e 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-dimensiona l 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 ]. eigenvalue s of the covariance matrix X^X. Gradient descen t 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 eigenvalue s of the covariance of the error function. When the axes of the paraboloid matrix X^X, and since one of these eigenvalue s 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 descen t yields the iter- neutralized by increasing the momentum term. A deation rule tailed discussion of the one-dimensiona l case provides
l case. Fig. 1. Optimal 7 in the two-dimensiona
Oscillating iteration paths
divergence zone
0,5 Momentum rate
Fig. 2. Convergenc e and nonconvergenc e regions. us with the necessar y insight for the understandin g of more complex cases. In the one-dimensiona l 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-dimensiona l case and integrating the length of the iteration path. Parameter combinations in the divergence region lead to the explosion of the iteration process. Paramete r 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 convergenc e 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 backpropagatio n learning (linear associators) .
124
R. ROJAS
Fig. 4. Bounded nonlinear error function and the result of severa l iterations. 1/2A:, the convergenc e speed is optimal for a unique a. The optimal combinations of a and 7 are the ones represente d by the jagged line in the diagram. The more interesting messag e 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 convergenc e improve their convergenc e speed. Obviously when dealing with n directions in weight space, this compromise could be dominated by a single direction in weight space.
The adjustmen t of the learning and momentum rate in the nonlinear case is even more difficult than in the linear case, becaus e there is no fast explosion of the iteration process . At least in the quadratic case whenever the learning rate is excessivel y 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 adjustment s 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. 4. CRITICAL PARAMETER COMBINATIONS Figure 4 shows the possible shape of the error function Backpropagatio n is normally used in those cases in for a linear associato r with sigmoidal output and the which we do not have an analytic expressio n of the associate d oscillation process for this kind of error function to be optimized. A learning rate 7 has to be function in the one dimensiona l case. The jagged form chosen without any previous knowledge of the co- of the iteration curve is reminiscent of the kind of variance matrix of the input. In on-line learning the learning curves shown in many papers about learning training patterns are also not always defined in advance , in nonlinear neural networks. and are generate d one by one. A conservative approach is then trying to minimize the risk by choosing a very small learning rate. But in this case backpropagatio n 5. CONCLUSIONS can be trapped in a local minimum of a nonlinear In this paper we have shown that backpropagatio n error function. The learning rate should then be in- with momentum can exhibit a highly oscillating becreased . havior under some paramete r combinations . PresumIn the case of a covariance matrix X^X with some ably this is the kind of situation found in some applivery large eigenvalues , a given choice of 7 could lead cations when the learning rate is just too large. Alto divergence in the associate d direction in weight space though in the quadratic case mainly large momentum (assuming for simplicity that the principal directions rates lead to oscillations, in the nonlinear case a gamma of the quadratic form are aligned with the coordinate which is excessivel y large can also produce oscillations axis). Let us assume that the selected gamma is near even when no momentum rate is present. to the explosion point 2/k found in the one-dimenResearcher s in the field of neural networks should sional case and shown in Fig. 2. In this case only values be concerne d not only with the possibility of getting of the momentum term near to one can guarante e stuck in local minima of the error function when convergence , but oscillations in some of the directions learning rates are too small, but also with the possibility in weight space can become synchronized . The result of falling into the oscillatory traps of backpropagatio n is oscillating paths in weight space, reminiscent of Li- when the learning rate is too big. Learning algorithms sajous figures. Figure 3 shows some paths in a two- should try to balance the speed-u p they are attempting dimensional weight space for several linear associator s to obtain with the risk of divergence involved in doing trained with momentum rates close to one and different so. Two different kind of remedies are available: adap7 values. In some cases the trajectories lead to con- tive learning rates and statistical preprocessin g of the vergence after several thousand iterations. In others a learning set in order to decorrelatethe input patterns momentum rate equal to one precludes convergenc e trying to avoid the deleterious effect of too large eigenof the iteration process . In many cases in which back- values of the covariance matrix [6 ]. In the case of highly propagation does not converge, at least it diverges with correlated input patterns the analysis of the converelegance . gence regions for backpropagatio n becomes more
Oscillating iteration paths complex and the iteration paths become more irregular than those shown in Fig. 3. REFERENCE S 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, Fachbereic h Mathematik und Informatik (1993). 5. R. A. Jacobs , Increase d rates of convergenc e through learning rate adaptation . Neural Networks 1, 295-307 (1988). 6. L. B. Almeida and F. M. Silva, Speeding-u p backpropa gation by data orthonormalization . In T. Kohonen, K. Makisara (Eds.), Artificial Neural Networks, NorthHolland, Amsterdam, 943-948 (1991).
This Page Intentionally Left Blank
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 Researc h Center, Yorktown Heights, NY 10598, U.S.A. Abstract—^This essa y describe s a class of integer sequence s with unusua l graphical behaviors and histories. Simple graphical methods are presente d in order to encourag e student/teache r 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 mathematica l 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 formulasinvolving integers. As background , perhaps the most common example of recursion in programming and in mathematic s is one that that defines the Fibonacci numbers. This sequenc e of numbers, called the Fibonacci sequence, plays important roles in mathematic s and nature. These numbers are such that, after the first two, every number in the sequenc e 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 littl e compHcate d 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 sequenc e 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 mathematicia n John H. Conway presente d this recursive sequenc e at a recent talk he gave at AT& T Bell Labs entitled "Some Crazy Sequences " [1]. He noticed that the value a{n)/n approache s 1/2 as the sequenc e 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 sequenc e 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 sequenc e 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 arrangemen t 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 sequenc e starts with fl(l) = l, and a(2) = 2. The "future" values at higher
Let us consider how fast the frog approache s 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 correspondin g 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 Departmen t at Harvard University is one of the world's leading experts on this Batrachion. He notes that the sequenc e is subtly connecte d with a range of seemingly unrelated topics in mathematics : variants of Pascal's triangle, the Gaussia n 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,62 1 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 successiv e 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 researcher s 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 squeeze d into the range of 0 to 1.) Figure 4 illustrates my visualization and shows the beautiful but intricate relationships between successiv e 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 generate d 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 + 26 + 57. This shows that a point in hump 6 is generate d from two points in hump 5 which are far apart. Fve chosen one way to represen t 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 correspondin g 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 sequenc e was mentioned in Hofstader's [4] famous Goedel, Escher, Bach, but no figure was given to show its magnificent and bizarre behavior. (The sequenc e 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 approache s 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. Renormalize d 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
i
1
w
c o ^^
(U a;
^ • • o ,n; -H -p 13 (d -p
•H
•^
o td 4-) (d ffl
fd
o o «
II
o
•H
\ _ ,^* + c
»P •H
1—1
H 1
1—1
fd 1
+
1
c "fd
Id
+ 1
^
1
>^
-H
fd
•K
0)
>
-H
fd 0)
H
7 c
n-n O r-, CO
'""'
H O
c
s ^—'^(d K ^-^ ^ "^ m^ *m \ \ \
rg (U C O H •—' U fd ^, M-I •H
+J fd S o w H II rr HH H II P4 :3 m !3 o O "c" fd u
0)
II II ^ o " ' ' ^^ c \ 7 ^ ,-IIII^ 1 fd (u g c *:?w C —' +J
m
The crying of fractal Batrachion 1,489
II ^ H
H - P .-. T-\ c\ O •^ G r j I •* H II fd W II 00 +J II II CO O ^ + , fd K '^ o 'IT '^ n 1 H 0) o •- o ""• o < „ o 0) II •H iH rH II OJ i H -p g fd fd H 5^ fd td fd H O H -H
c o o
* \
c c «. II .^ ro •- II >
H
II fd > < ^ - X. H HH y\ O rH 3 * M-I O * •H M-i fd I H
+
r-n
-H o O
._.
+ -H O CN
C.
\ C
: 4-1 g
c • O fi^ O
r-n - H
td ' Q Q cu -p fd H a» C
II II M -k O ^ C ^ (U °
g M O c i)} is: 0 •if
(3) (4) (5)
To implement this algorithm efficiently in Mathematica, I converted the spherical coordinates to cartesian coordinates and made a simple 3D plot instead of positioning spheres at the points.
Fig. 7. Graph of Pickover's "noise sphere" for the 5000 random numbers generate d by the LCGX using Mathematical s default orientation of the 3-D graphic.
138
R. L. BOWMAN
Short [ Table [ N[Apply[Plus,Drop[rm,-i] Drop[rm,i]]/ sumsq], {i,0,pts-l},7] Out[24]//Short= {1., 0.0362677 , -0.0807374, -0.0497768, -0.0713839, -0.00412415 , 0.300523, 0.131343, -0.0205783, 0.0311595 , -0.185502, -0.0979904, 0.143689, 0.0808925 , 0.025406, -0.054287, 0.0410849, «75)), -0.0365932, 0.00268043 , -0.0140809, 0.00170648 , -0.025088, -0.00605305 , -0.00274483, 0.00321278 }
'ft..??
i5^
Fig. 8. Pickover's "noise sphere" (Fig. 9) rotated so as to view more of its structure (accomplishe d by specifying a different ViewPoint in the Mathematica code).
tocorrelation of the sequenc e of random numbers wil l give information of a more global nature, i.e., how much the nature of the sequenc e of random numbers as a whole depends on the value of the preceding member in the sequence . If two data sets, { X ] and { y ) , with zero means exist, then the correlation coefficient between the two sets is given by [ 9 ] :
r = ixy/(Zx'Lr')'
( 6)
The correlation coefficient must be in the range - 1 ^ r < 1. The two data sets of interest here would be the entire sequenc e of random numbers and the sequenc e beginning with one particular element of the sequence . The autocorrelation of { Ut ] is the set of all such correlation coefficients for 0 ^ / < (A^ - 1) if the sequenc e has A^ random numbers. The first element of the autocorrelation is from the sequenc e correlated with itself. The second element is the correlation of the sequenc e itself with the sequenc e where the elements lag by one element, and so forth. A modified list of random numbers is created by subtracting 0.5 (this theoretical mean is very close to the actual mean for all of the examples in this paper) from each number in order to form a series of random numbers with a zero mean, and an equal number of elements with a value of zero are added to this sequenc e (without affecting the results here) to facilitate later calculations. In[22] : = rd[100]; rm = J o i n [ r a n l - . 5 , T a b l e [ 0 , { p t s } ] ] ; In[24] : = sumsq = Apply [Plus, rm r m ] ;
The above output is a list of the autocorrelation coefficients for the first 100 numbers of the sequenc e of random numbers under study. Only the first 17 coefficients and the last eight are printed. The remaining 75 coefficients are indicated in standard Mathematica form by the symbol " ( ( 7 5 ) ) ." The calculation of the autocorrelation can be made more efficient by using FFTs. Again, the sequenc e must have a zero mean, and the results wil l have to be normalized by dividing each coefficient by the zero-lag coefficient since any sequenc e of numbers must have perfect correlation with itself, i.e., a correlation coefficient equal to 1. To eliminate end effects from a sequenc e that is not periodic, the padding with zeros is necessar y (as was already done in forming r m ). In[27] : = correl = Chop[InverseFourier[Abs[Fourier[rm]]^2]]; Short [cor = correl/correl[[l]], 7 ] Out[28]//Short= {!. , 0.0362677 , -0.0807374, -0.0497768, -0.0713839, -0.00412415 , 0.300523, 0.131343, -0.0205783, 0.0311595 , -0.185502, -0.0979904, 0.143689, 0.0808925 , 0.025406, -0.054287, 0.0410849, ((175)), -0.0205783, 0.131343, 0.300523, -0.00412415 , -0.0713839,-0.0497768 , -0.0807374, 0.0362677 } The two methods generate identical values except, that in the hhT case, the autocorrelation set is almost twice as large with ai = a„, a2 = a„-i, etc. Obviously the sequenc e should have absolute correlation with itself, hence the zero-lag term has a value of 1. Again, a plot wil l help in visualizing the results. In[29] : = ListPlot[ Take [cor, p t s ] , {PlotRange-^AU, PlotJoined^True} ] Figure 9 shows the graph of the correlation coefficients with lines connecting all of the graphed points. Knuth[2] suggests that the correlation coefficients (except for the zero-lag value) should be in the range {-[2/(N1)][A^(A^ - 3)/(A^+ 1 ) ] ' ' ' [l/iNl)]to[2/(NimN(N - 3)/{N + l)V'^[l/(N
Evaluating pseudo-rando m number generator s
139
Fig. 10 is a plot of the resulting "noise sphere" for the above example in which only every fifth generate d point is used to form the sequenc e of random numbers. The plot suggests that this procedure did not help the problem of dependency . In fact since LCGX-type of generators have a finite period, this procedure only changes the structure of the dependency . It does not destroy it. Compare this plot with the similar one previously shown in Fig. 7. (See also Pickover[6].)
Fig. 9. Autocorrelation coefficients for the first 100 random numbers generate d by the LCGX. Points are connecte d with straight lines to aid in visualization.
- 1)]} at least 9 5% of the time for good generators where N is the number of random numbers in the sequence . In the case of the LCGX, this means that the correlation coefficients should be in the interval ( - 0 . 2 1, +0.19) for at least 94 of the 99 coefficients. Only one of the 99 values is outside of this range. Since the autocorrelation test examines how a sequence as a whole correlates to the same sequenc e offset by a fixed number of elements, the LCGX does well on the global scale. However, since the plots of the 2-tuples and 3-tuples tests how each number separatel y correlates with its predecessors , the LCGX does not do well on a local scale.
5. IMPROVEMENTS
5.1. Shuffling One modification that can be used to improve the independenc e of a random number generator algorithm is to use some form of shuffling [ 3 - 5 ] . This is essentially a method whereby one random number sequenc e is used to shuffle another random number sequence . This does require more computer code and therefore is somewhat less efficient.
5.3. An irrational modulus generator How would the results change if a noninteger modulus were used? As an example let a = 13, c = 1 and M = 27r in Eqs. ( 1) and ( 2 ). The calculations were done on a NeXT computer using Mathematica's default precision of 16 digits. Only selected data wil l be shown. (The necessar y Mathematic coding is the same as shown earlier for the LCGX generator unless otherwise noted.) Since this generator with infinit e precision does not appear to be periodic, its bar chart of 2000 points (Fig. 11) has more realistic variations than that of the LCGX near the completion of one period (Fig. 2 ). The mean and square of the standard deviation (0.505296, 0.0844273) for these 2000 points are comparable to the theoretical values (0.49975, 0.083375). The FFT analysis of this sequenc e (Fig. 12) shows less periodic structure than did the correspondin g plot for the LCGX (Fig. 3 ). The Fourier coefficients are generally smaller, and essentially all periods contribute to the resulting sequenc e of random numbers, i.e., very few of the periods have a zero Fourier coefficient as compared to the coefficients for the LCGX. Further evidence of the independenc e of the elements of the sequenc e from each other comes from
5.2. "Turning the Crank" n times Another alternative to reducing near-neighbo r dependence would seem to be simply to take only every nth output value from a generator. In other words, the generator is "cranked" n times for every output random number. This can be simply done in Mathematica using a D o [ ] loop.
In[91 : = pts = 5000; rnd = 2; ran = Table [ Do[rnd = Mod[N[157 rnd + 1 ] , 2 0 4 8 ] , { 5 } ] ; rnd/2048, {i,pts}]; In[12] : = disp = (material deleted) In[13] : = Show [ Graphics3D [ disp ] ]
Fig. 10. Pickover's "noise sphere" for the sequenc e produced by ' 'cranking'' the LCGX five times for each random number generated .
140
R. L. BOWMAN
Fig. 11. Bar chart of the counts of random numbers, for the first 2000 numbers produced by the linear congruentia l generato r with modulus IT^ (see text for details), in each of ten equal subintervals in the interval [0, 1).
illil
[U.ii.ll
ih
.iLiiillliiil
dl
liillkiit^lilll-hi4lli^iiJlilltJ;|Fig. 12. Fourier coefficients calculated using Fast Fourier Transforms for the first 6144 numbers produced by the linear congruentia l generato r with modulus In.
the plot of the random numbers in the order in which they were generate d (Fig. 13). This plot shows less structure than the correspondin g plot for the LCGX. However, the plots of the 2-tuples (Fig. 14) and the "noise sphere" plot of the 3-tuples (Fig. 15) all show obvious structure. The global independenc e as measured by the autocorrelation is still within the bounds described by Knuth[2] and wil l not be shown here. Since there is no apparent fixed period for the sequence, the " « - c r a n k" technique does help produce more local independence . Selecting every second
Fig. 13. Plot of 5000 random numbers in the order in which the linear congruentia l generato r with modulus ITT generate d them.
Fig. 14. Graph of the 2-tuples for the 5000 random numbers generate d by the linear congruentia l generato r with modulus 27r.
number generate d provides a more random appearing plot of the "noise sphere" (Fig. 16). The results of all of the other analyses (described earlier for the LCGX) are also suggestive of a good random number generator. For example the 2-tuple plot of 5000 points (Fig. 17) displays no obvious structure. 5.4. A more efficient irrational modulus generator M y search finally led to a generator that does not require a "crank" to meet the conditions described in this paper. This generator is similar to the one just described but with a = 157, c = 1 and M = n in Eqs. (1) and ( 2 ). The tests for uniformity looked very good as do those for independence . The x^ test gives a /?-value of 1 - 0.41 = 0.59, meaning that the null hypothesis can be rejected only with 4 1% confidence. Different seed values do give slightly different statistics, but at least for seeds (rnd) 0, 1,2, and 3 all of the tests were favorable.
Fig. 15. Graph of Pickover's "noise sphere" for the 5000 random numbers generate d by the linear congruentia l generator with modulus ITT.
Evaluating pseudo-rando m number generator s
Fig. 16. Pickover's "noise sphere" for the sequenc e produced by "cranking" the linear congruentia l generato r with modulus 27r two times for each random number generated .
141
Fig. 19. Cartesian plot of the 3-tuples for the 5000 random numbers generate d by the linear congruentia l generato r with modulus TT.
was used to form a sequenc e of 2000 random numbers.) The plot of the autocorrelation (Fig. 20) also supports the acceptability of this generator.
Fig. 18. Graph of the 2-tuples for the 5000 random numbers generate d by the linear congruentia l generato r with modulus TT as described in the text.
A s an example of the results of the tests for independence. Fig. 18 is the plot of the 2-tuples, and Fig. 19 is a Cartesian plot of the 3-tuples. (A seed value of 2
5.5. Other generators A s a point of comparison, the output from Mathematical s own Random[] function and the output from the RND function in BASIC on the Commodore 64 wil l be studied. Pickover[13] shows a "noise sphere" for output from IBM-PC BASIC Version A2.10 which shows definite structure and thus local dependency . However, the Commodore 64 BASIC did not show any obvious structure in a similar plot. Its x^ l^st for a 2000-numbe r sequenc e gave a/?-value of 0.14, meaning that the null hypothesis can be rejected only at the 86% confidence level. And in the tests of independence , it did as well as the best generator above. The output from Random[] in Mathematica also looked good when subjected to all of the above tests.
?V^MwWvHV^'^-vr°° Fig. 17. Graph of the 2-tuples for the sequenc e produced by "cranking" the linear congruentia l generato r with modulus l-K two times for each random number generated .
Fig. 20. Autocorrelation coefficients for the first 100 random numbers generate d by the linear congruentia l generato r with modulus TT. Points are connecte d with straight lines to aid in visualization.
142
R. L. BOWMAN
But interestingly, its appearanc e in these tests was no better than that of the best irrational modulus generator and the C-64 BASIC generator in these tests. Of course, there are additional tests, not discusse d in this tutorial, which may be conducted to asses s the quality of these random number generators .
6. CONCLUSION The graphical and computationa l capabilities of Mathematica make it an excellent choice for visualizing the randomnes s (or lack thereof) of a sequenc e of numbers that is the output of a particular random number generator. Some of the limitations of linear congruential generators with integer parameter s were readily observable with these techniques . However a congruential generator with a modulus of TT did very well in the tests outlined here and wil l hopefully be of use to others needing a quickly programmable random number generator. The generators used by Mathematica and Commodore 64 BASIC also equally passed . There are many more tests that could be applied to the generate d sequence s [ 5 ] . Students and researcher s may wish to investigate the use of such tests when programming in Mathematica. Acknowledgements—The author wishes to thank Dr. Nelson Blachman for extensive Internet conversation s and Dr. Clifford Pickover for his suggestio n of the "noise sphere" plots. This study was supported in part by a sabbatica l grant from Bridgewater College.
REFERENCES 1. Wolfram Research , Inc., Mathematica, Version 2.2, Wolfram Research , Inc., Champaign , ILL (1993). 2. D. D. Knuth, The Art of Computer Programming, Vol. 2, 2nd ed., Addison-Wesley , Reading, MA (1981). 3. W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in FORTRAN, 2nd ed., Cambridge University Press, Cambridge, England (1992). 4. B. D. Ripley, Stochastic Simulation, John Wiley, New York (1987). 5. J. Dagpunar, Principles of Random Variate Generation, Oxford University Press, New York (1988). 6. C. Pickover, Random number generators : pretty good ones are easy to find. The Visual Computer, in press. 7. W. H. Press and S. A. Teukolsky, Portable random number generators . Computers in Physics 6, 522-524 (1992). 8. G. Marsaglia and A. Zaman, Some portable very-longperiod random number generators . Computers in Physics 8, 117-121 (1994). 9. J. B. Kennedy and A. M. Neville, Basic Statistical Methods for Engineers and Scientists, 3rd ed.. Harper & Row, New York (1986). 10. B. J. T. Morgan, Elements of Simulation, Chapman and Hall, London (1984). 11. P. Boyland, A. Chandra, J. Keiper, E. Martin, J. Novak, M. Petkovsek , S. Skiena, I. Vardi, A. Wenzlow, T. Wickham-Jones, D. Withoff, et ai. Guide to Standard Mathematica Packages, Version 2.2, 3rd ed.. Wolfram Research, Inc., Champaign , IL (1993). 12. S. Wolfram, Mathematica: A System for Doing Mathematics by Computer, 2nd ed., Addison-Wesley , Reading, MA (1991). 13. C. A. Pickover, Picturing randomnes s on a graphics supercomputer . IBM J. Res. Develop. 35, 227-230 (1991). 14. C. A. Pickover, Computers and the Imagination, St. Martin's Press, New York (1991).
PART III CELLULAR, AUTOMATA, GASKETS AND KOCH CURVES
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
Part III. Cellular Automata, Gaskets, and Koch Curves Cellular automata are a class of simple mathematica l systems that are becoming important models for a variety of physical processes . They can exhibit random-looking behavior sometimes and highly ordered behavior at others - depending on the rules of the game. Generally speaking, cellular automata are mathematica l idealizations of physical systems in which space and time are discrete. Interesting previous applications include the modeling of the spread of plant species , the propagation of animals such as barnacles , and the spread of forest fires. One notable recent application of cellular automata is in traffic engineering (Gaylord, 1995). Referred to variously as "cellular automata", "homogenou s structures", "cellular structures", and "iterative arrays", cellular automata have been applied to, and reintroduced for, a wide variety of purposes . Ofl;en, cellular automata consist of a grid of cells that can exist in two states, occupied or unoccupied. The occupanc y of one cell is determined from a simple mathematica l analysis of the occupanc y of neighbor cells. Mathematician s define the rules, set up the game board, and let the game play itself out. One popular set of rules is set forth in what has become known as the game of "Life " (Poundstone , 1985). Though the rules governing the creation of cellular automata are simple, the patterns they produce are very complicated and sometimes seem almost random, like a turbulent fluid flow or the output of a cryptographic system. Cellular automata have also played important roles in the development s in the field of artificial lif e - an early example is the use of cellular automata to simulate the origin of lif e (Tamayo, 1989). A good survey of relations between cellular automata and complexity is provided in (Gutowitz, 1996). Recent researc h has shown that some cellular automata exhibit self-organization , lifelik e cellular patterns, and self-similarity (Barbe, 1996). Other researcher s have recently related linear cellular automata to iterated function systems (Haesler, 1992) and cellular automata to chaos (Codenotti, 1996). This book section also discuses fractal gaskets . In everyday life, the term gasket refers to a piece of material from which sections have been removed. Mathematical gaskets, such as Sierpinski gaskets , can be generate d by removing sections of a region according to some rule. Usually the process of removal leaves pieces which are similar to the initial region, thus the gasket may be defined recursively. The resulting shapes are of interest mathematically , and they reveal a visually striking and intricate class of patterns which make up a family of regular, fi'actal networks. For me, the most interesting gasket patterns are self-similar; for example, if we look at any one of the triangular motifs within Pascal's triangle mod 2 (as in Jim Nugent's paper in this section), we notice that the same pattern is found at another place in another size. The two- and three-dimensiona l networks revealed in several of this section's figures are known as Sierpinski gaskets which share important geometrica l features with percolation problems and cellular automata. The Sierpinski gasket consists of triangles nested in one another like Chinese boxes or Russian dolls. This kind of dilation symmetry has been discovered and applied in different kinds of phenomen a in condense d matter physics, diffusion, polymer growth, and percolation clusters. One example given by Kadanoff is petroleum-bearin g rock layers. These typically
145
146 contain fluid-filled pores of many sizes, which, as Kadanoff points out, might be effectively understoo d as Sierpinski gaskets . Fractal gaskets have a practical importance in that they can provide models for materials scientists producing new structures with novel properties. For example, Gordon et al. (1986) have created wire gaskets on the micron size scale. The area of the smallest triangle in their 1 |im^, and they have investigated many unusual properties microscopic gasket was 1.38d=0.0 of their superconductin g Sierpinski gasket network in a magnetic field. Because of gaskets ' dilation symmetry, statistical-mechanica l and transport problems are exactly solvable on these fractals - making them attractive candidate s as model systems .
For Further Reading (1) Barbe, A. (1996) Coarse-grainin g invariant orbits of one-dimensiona l Zp-linear cellular automata . Bifurcations and Chaos. 5: 2237-2297. (2) Barbe, A., Haeseler , F, Peitgen, H., and Skordev, G. (1995) Coarse-grainin g invariant patterns of one-dimensiona l two-state linear cellular automata . Bifurcation and Chaos 5: 1611-1631. (3) Brown, D. (1987) Competition of cellular automata rules. Complex Systems. 1: 169-180. (4) Codenotti, B. and Margara, L. (1996) Transitive cellular automata are sensitive. American Mathematical Monthly. January, 103: 58-62. (5) Conway, J., Berlekamp, E., Guy, R. (1982) Winning Ways for Your Mathematical Plays. Academic Press: New York. (6) Dixon, R. (1992) The pentasno w gasket and its fractal dimension. In Fivefold Symmetry, I., Hargittai, ed. World Scientific: River Edge, New Jersey. (7) Gaylord, R. and Nishidate, K. (1995) Traffic engineering with cellular automata , Mathematica in Education and Research 4: 35-39. (8) Gordon, J., Goldman, A., Maps, J. (1986) Superconducting-norma l phase boundary of a fractal network in a magnetic field. Physical Review Letters. 56: 2280-2283. (9) Gutowitz, H., ed. (1991) Cellular Automata: Theory and Experiment, MIT Press: Cambridge, Massachusetts . (10) Gutowitz, H. (1996) Cellular automata and the sciences of complexity, I and II, Complexity 1, 5: 16-22; 6: 29-35. (11) Haeseler , F, Peitgen, H., and Sokordev, G. (1992) Linear cellular automata , substitutions , hierarchical iterated function systems and attractors, pp. 2-23 in Fractal Geometry and Computer Graphics, J.L. Encamagao , H.-O. Peitgen, G. Sakas, and G. Englert, eds. Springer-Verlag : New York. (12) Holter, N, Lakhtakia, A., Varadan, V, Vasundara , V, and Messier, R. (1986) On a new class of planar fractals: the Pascal-Sierpinsk i gaskets . Journal of Physics A: Mathematics General 19: 1753-1759. (13) Kadanoff, L. (1986) Fractals: where's the physics? Physics Today February, 6-7. (14) Lakhtakia, A., Vasundara , V, Messier, R., and Varadan, V (1987) The generalize d Koch Curve. Journal of Physics. A: Mathematics General 20: 3537-3541. (15) Levy, S. (1985) The portable universe: getting to the heart of the matter with cellular automata . The Whole Earth Review Magazine. Winter issue, 42-48. (16) Maeder, D. (1987) The free energy concept in cellular automaton models of solid-solid phase transitions. Complex Systems. 1: 131-144. (17) Peterson , I. (1987) Forest fires, barnacles , and trickling oil. Science News. 132: 220-221. (18) Pickover, C. (1996) Fractal Horizons: The Future of Fractals. St. Martin's Press: New York. (19) Poundstone , W. (1985) The Recursive Universe. William Morrow and Company: New York.
147 (20) Reiter, C. (1997) The game of life on a hyperbolic domain. Computers and Graphics, 21(5): 673-683. (21) Schrandt, R., S. Ulam (1970) On recursively defined geometrica l objects and patterns of growth. In Essays on Cellular Automata, A. Burks, ed. Univ. of Illinoi s Press, Chicago. (22) Tamayo, R and Hartman, H. (1989) Cellular automata , reaction-diffusion systems and : New the origin of life, pp. 105-124, in Artificial Life, C. Langton, ed., Addison-Wesley York. (23) Wolfram, S. (1983) Statistical mechanics of cellular automata . Review of Modern Physics. 55: 601-644.
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
149
Chaos and Graphics
SENSITIVITY IN CELLULAR AUTOMATA : SOME EXAMPLES MICHAEL FRAME
Mathematics Department , Union College, Schenectady , NY 12308-231 1 Abstract—We study how thefinalpattern produced by particular one-dimensiona l cellular automata can s in the depend on the starting configuration of live and dead cells. In particular, we show that slight change initial state can lead to different universality classe s (in the sense of Wolfram) for thefinalstate. A peculiar . Finally, for two example automata we investigate anthropomorphi c pattern appear s in one of our experiments a small part of the initial condition space , a map of which initial conditions lead to which Wolfram classes .
One-dimensiona l cellular automata are simple to understand and easy to simulate, yet can produce interesting—eve n surprising—patterns . In this note we consider examples of how slight changes in the initial state of some automata can give rise to considerabl y different final states. Since it suffices for our examples , we restrict our attention to one-dimensional , binary automata with the neighborhood of a cell consisting of the two cells immediately on either side of it. The cell space is a line of boxes (the cells), and each cell is in one of two states ("hve" and "dead"). Often it is convenient to consider the cells as indexed by the integers. The dynamics of the automaton can be viewed by taking the initial arrangemen t of live and dead cells as the first generation , and then producing the second generation , determining the state of each cell from the states of its neighbors. In particular, some collection of neighborhoo d configurations, or templates, is specified and the automaton can be viewed as a reader, progressin g down the line of cells. At cell n, the automaton compares the ard rangemen t of live and dead cells in the neighborhoo of cell n (for our examples , this neighborhoo d is cells n — 2, n — \, n, n -\- 1, and « + 2) with the collection of templates . If the neighborhoo d configuration matches one of the templates , then cell n is alive in the next generation of the cell space, otherwise cell n is dead in the next generation . By the same process , , from we goft*om the second to the third generation the third to the fourth, and so on. The collection of templates is the rule for the automaton. A rule is called totalistic if the templates of a rule are determined by only the number of live cells in the neighborhood , not by their particular positions. Denoting live cells by 1 and dead cells by 0, the rule with templates (1,0,0,0,0), (0,1,0,0,0), (0,0,1,0,0), (0,0,0,1,0), and (0,0,0,0,1) is an example of a totalistic rule: any template with exactly one live cell gives rise to a live cell. Totalistic rules can specify any combination of zero through five live cells. Giving a special role to the central cell of the neighborhood, totalistic rules are augmente d to outer totalistic rules, the form of all our examples . Excluding the
central cell, a neighborhoo d consists of four cells. A rule is outer totalistic if it can be cast in this form: specify numbers of the four neighboring cells must be alive with the central cell dead, and specifying perhaps diflferent numbers of the four with the central cell alive. We express this type of rule by a 10-tuple: (do,dud2,d3,d4\ao,ai,a2,a3,a4). A 0 in location dt means if the central cell is dead and exactly / of the four neighbors are alive, then the central cell dies in the next generation ; a 1 in location di means if the central cell is dead and exactly / of the four neighbors is alive, then the central cell becomes alive in the next generation. The entries for at have the correspondin g interpretations when the central cell is alive. For example, the outer totalistic automaton (0,1,1,0,0; 0,0,1,0,0) gives a live cell in the next generation if the central cell is dead and exactly one or two of the four neighbors is alive, or if the central cell is alive and exactly two of the four neighbors is alive. Though cellular automata seem very simple—almos t transparent—th e number of rules is surprisingly large, so large that for the more general automata analysis by inspection is completely impossible. If there are k states per cell and m cells in a neighborhood , then there are k^ neighborhoo d configurations and hence /c^ rules. For binary automata withfivecell neighborhood s there are 2^' = 4,294,967,29 6 different rules. Of course, the outer totalistic automata are much more restrictive: there are only 1024 rules. On the other hand, binary automata with seven cell neighborhood s have 2^ = 340,282,366,920,938,463,463,374,607,431,768 , 211,456 different rules, clearly more than can be searche d case-by-case . In the face of these staggering numbers, are there any general conjectures about broad classes of automaton behavior? Stephen Wolfram has conjectured long-term behavior of automata is organized into just a few classes . For growth from a single live cell, there are only three possibilities: 1. the pattern becomes homogeneous ; 2. a pattern of fixed size evolves; 3. a pattern with boundary expanding at a fixed rate evolves.
Reprintedfrom Comput. & Graphics Vol 18, No. 5, pag. 733-737, 1994
150
M. FRAME
Type (3) can be subdivided further as (3a) the pattern inside the boundary is uniform; (3b) the pattern inside the boundary is fractal; (3c) the pattern inside the boundary is chaotic. Better-known, though not relevant to the examples we consider here, is Wolfram's classification for evolution from random initial configurations: I. the pattern becomes homogeneous ; II . the pattern evolves to a fixed periodic configuration; III. a chaotic pattern forms; IV. complex, localized structures form. Christopher Langton has proposed a parameter , X, for predicting the class into which an automaton falls. For binary automata , X is given by number of neighborhoo d configurations giving live cells total number of neighborhoo d configurations s from 0 to ^, the automaton behavior As X increase passe s from Class I to II, through IV, and finally to III . s to one with (Every automaton with X > ^ correspond 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 correspondenc e is subtle, however, but is more faithfully represente d in examples as the denominato r 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 considerabl y 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 e evolving from a single live cell. As usual, each successiv generation is plotted below its predecessor , so time increase s 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 appearanc e 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 generate d 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
n with rule (0,1,1,0,0;0,0,1,0,0). Top: from a Fig. 1. The pattern evolving for the outer totalistic automato single live cell. Bottom: from two adjacen t 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 appearanc e of yet another gasket.
From these three examples, we might be led to some hypothese s (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 automato n with rule (0,1,1,0,0;0,1,0,1,1) . Top: from a single live cell. Bottom: from three adjacen t 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 becaus e of a surprise: notice the "laughing skull," which has appeare d 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 appearanc e 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 observation s 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 backgroun d 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, separate d by a block of/c dead cells, for 1 < n, k < 20. Here black represent s 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 represen tation 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, separate d by a block of A: dead cells, for 1 < « , / :< 20. The results for Examples 2 and 3 are presente d in Fig. 6. Here black represent s 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 unrepresentativ e 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 suggeste d 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. I n the absence of an analytic formulation of automaton evolution, this type of graphical exploration, perhaps augmente d by automated initial condition selection and final state pattern recognition, is the best avenue for studying final state sensitivity in cellular automata.
wit h "edge cells" c[ 1], c [ 2 ], c[N -\- 4 ] , and c[N + 5] to accommodat e 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 representatio n 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] u Abstract—The Sierpinski triangle, carpet, and pyramid, along with the Menger sponge , are well known twoand three-dimensiona l fractals. The fact that these fractals are constructe d in a similar fashion is made t common evident by showing that discrete versions of these all arise using inner products involving greates . These construction s divisors and least common multiples on matrices involving base two and three addresses admit generalizatio n 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 constructe d from Pascal's triangle mod 2 and, hence, via one-dimensiona l finite automata . For further discussion and generalization s of Pascal's triangle see [2, 8, 9, 12, 15]. The discrete Sierpinski triangle has also been constructe d and generalize d 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 dimensiona l 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 consisten t with the two-dimensiona l case. Among these three-dimen sional generalization s are the Menger sponge and the Sierpinski tetrahedron . There are operators called ''inner products" defined in the programming language s APL, J, and Mathematica that generalize the usual matrix product. These are generalize d 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. Generalization s of the Sierpinski Triangle and other fractals using elementar y operations organized into an inner product of a matrix with its transpos e have been investigated [11]. While that work showed the Sierpinski triangle is constructe d 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 (greates t 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 representation s of the row addresse s is constructed . That is, the auxiliary matrix has rows that are the base-two representation s of 0, 1, 2, etc. The Sierpinski carpet arises from exactly the same computation but using base three addresse s in the auxiliary matrix. Using addresse s in other bases give generalization s of these fractals. Moreover, these GCD-LCM constructions can be extended to «-dimensiona l 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 mathematica l 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 us t a b le 0 1 1 2 0 C l + . / O 1 NB. GCD t a b le 0 1 1 1 0 C l * . / 0 1 NB. LCM t a b le 0 0 0 1 Next, we construct the auxiliary matrix whose rows are the base-two addresse s 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 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
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 representatio n 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 addresse s 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-thre e representation s 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-thre e 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-thre e 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 preponderanc e 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 representatio n of addresse s 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 addresse s are base four, the GCDs of the LCM s 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 CD of pairwise LCMs of the digits of the row and column addresse s of the position considered . There are multiple generalization s of this to 3 and higher dimensions. In three dimensions, there are 3 addresse s 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 addresse s in whatever base is desired. Below, base two is used. The expression (^ >@{@(# 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 representatio n 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-dimensiona l parent array s/ generate d 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 ) in 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 successo r 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 limi t 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 limi t Koch curve C^ (the ideal Koch curve) is the curve made by applying infinit e 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 pT = ^ 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 Ji • • • 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 ^ - • • Jn • • • 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 limi t Koch curve C^. 3. APPROXIMATED KOCH CURVE
In practice, we cannot apply an infinit e number of productions to obtain the limi t 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 limi t Koch curve Coo- For the approximated Koch curve Q , we must introduce some measure between the approximated Koch curve Q and the limi t Koch curve Coo • In this paper, we used the maximum distance between the approximated Koch curve Ck and the limi t 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 nd 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 separate d from the limi t 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 separate d from the limi t 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 predecesso r of the production P; (b) 5i * * * 52, production successo r 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 I n 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 separate d from the limi t 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 measure d automatically. So when the tolerable distance e is given, we can automatically determine the approximated Koch curve Ck not separate d from the limi t 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. Al l the points of the discretely approximated Koch curve must not be separate d from the limi t 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 limi t 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 limi t 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 limi t Koch curve C^ and all the generate d 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 generate d approximated Koch curve is less than one pixel length, we can draw the Koch curve only using the points in the limi t Koch curve Coo • Then all the drawn points are connected . Given a Koch system K= ( / , P ), we represen t 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 approximate d snowflake curve with tolerable distance 1.0; (b) Ce, the approximate d snowflake curve with tolerable distance 0.5; (c) The discretely approximate d 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 approximate d Koch curve is 1.0 (one pixel length), the approximate d curve C5 is not separate d from the limit Koch curve over the tolerable distance 1.0. Figure 4a describes the image of the approximate d snowflake curve C5 and Fig. 4b describes the image of the approximate d snowflake curve Ce when the tolerable distance is 0.5. Figure 4c describes the discretely approximate d 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
Discrete approximation of the Koch curve
197
(a)
(b)
(c)
Fig. 6. (a) C,6, the approximate d dragon curve with tolerable distance 4.0; (b) CM, the approximate d dragon curve with tolerable distance 1.0; (c) The discretely approximate d dragon curve.
511))}. The distance do between Co and Ci is 256. When the tolerable distance e is 4.0, Fig. 8a describes the approximate d curve is C-i. Figure 8b describes the approximated curve C9 with the tolerable distance £ = 1 . 0. Generalisatio n and randomisatio n of the plane Koch curve [10] can also be represente d by some initiators and productions. Figure 9 describe a generalisatio n 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. d and Figure 10 describe the images of the approximate the limit curves. Figure 11 describe a randomisatio n 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 approximate d 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 demonstrate d the approximate d Koch curve and the discretely approximated Koch curve that are not separate d from the limit Koch curve over predefined tolerable distances. We also proposed a termination condition for the generation of the approximate d 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 generahsatio n of the plane Koch curve with tolerable distance 4.0; (b) C5, the approximation of a generalisatio n of the plane Koch curve with tolerable distance 1.0; (c) The discrete approximation of a generalisatio n 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=X o + (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 randomisatio n of the plane Koch curve, (a) Initiator / = ({x\, y\), (xl, y2)); (b) Production r M i M 3 ^ 4 ( i n F i g . 9 ) - Pl or 7oT,r2T37475T6r7T 8 —P2
199
200
SAM CHUNG HWANG and HYUN SEUNG YAN G
(b)
(c)
Fig. 12. (a) C4, the approximation of a randomisatio n of the plane Koch curve with tolerable distance 4.0; (b) C5, the approximation of a randomisatio n of the plane Koch curve with tolerable distance 1.0; (c) The discrete approximation of a randomisatio n of the plane Koch curve.
REFERENCE S 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, Generalisation s and randomisatio n of the plane Koch curve, / Phys. A: Math. Gen. 20,3537-354 1 (1987).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
201 Chaos and Graphics
VISUALIZIN G 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;
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).
*) *) level-1); level-1);
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
end;
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)) *)
where
REFERENCES
/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).
This Page Intentionally Left Blank
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 Hanssle r Place, Peoria, IL 61604 Abstract—A lattice of octahedr a and tetrahedr a (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 co, a standar d algorithm for generatin g the values of various elements , and a ratio method ordinates of elements that is not dependen t on the calculation of previous levels are discussed . Thefiguresshow a bell curve in 3D, the associatio n of elements to primes and twin primes, and the values of elements mod(.x) through d that the largest factor of any element is less than the patterns arrange d in triangular plots. It is conjecture level index. 1. INTRODUCTION
A ooeo
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 tetrahedra l 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 represente d as dots. The pattern of dots representin g odd and even numbers in the 2D Pascal's triangle correspon d to the octahedra l and tetrahedra l sections of an "oct-tet lattice" (Figs. 1 and 2). The octahedro n faces of the lattice map to the even dots while the tetrahedro n faces map to the odd dots. If we construct a 3D Pascal's triangle, will the distribution of odd and even values for the elementsin the interior correspon d to the octahedra l and tetraFig. 2. Pattern of odd and even numbers in Pascal' s triangle. hedral component s of an oct-tet lattice? Elements with odd values are plotted as black circles. A Galton board [ 2 ] simulation, which rolls marbles through a triangular maze, generate s values that ap- pansion. At each fork in the maze, the marble has a proximate the values of coefficients of a binomial ex- 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-shape d 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.
0 4 6 4 0 0 0 10 10-00 0 6 0 20 0 6 0
00000000
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-face d pyramidal array of coefficients in the expansio n of the trinomial, {a^- b + c)\ such y placed that the coefficients of (a + ^ + c)^ are systematicall l triangle 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 observation s 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-tetrahedro n 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 interconnect edness 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, l nature of the Pasca l pyr". . . the three-dimensiona amid makes it awkward to use for hand calculating the trinomial coefficients." Staib and Staib[4] and Mueller[3] both use illustrations of pyramids cons betaining planes and levels with no interconnection , let alone a subtween levels. Drawing a tetrahedron divided tetrahedra l lattice, can be difficult. Without actual physical models, it can be daunting to visualize how tetrahedra in combination with octahedra might g the provide the needed paradigm for interconnectin pyramid's levels (see Figs. 3 and 4). Oct-tet lattices are also harderto picture in 2D figuresand illustrations becaus e 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 11 7 7 7 23 17 23 13 31 23 31 29 43 43 41 59 79 71 79 67 97 101 97 101 107 109 103 113 137 137 131 139 151 157 163 149 197 197 193 199 211 223 223 211 229 229 227 233 257 263 251 241 277 281 271 283 397 389 401 397 409 419 409 419 431 431 421 433 439 443 443 439 457 457 461 449 467 467 463 463 487 491 487 479 503 503 499 499 521 521 509 523 547 541 547 541 563 569 563 557 577 587 571 571 601 607 613 599 631 641 643 619 659 661 673 653 701 709 691 683 733 739 743 727 769 773 761 757 811 809 821 797 839 829 827 853 877 881 863 859 911 907 887 919 941 947 937 953 983 991 977 971 1009 1021 1013 1019 1049 1033 1051 1039 1063 1069 1087 1091 1109 1097 1103 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 tetrahedra l 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, Pomeranc e states: . . . factoring is hard. It has been estimate d conservativel y . . . 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 language s 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 generate d by representin g 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 octahedra l and tetrahedra l 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 tetrahedro n (see Fig. 2). For a tetrahedro n 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 elementsof this 3D analog of Pascal's triangle factor into many small primes, they are divisible by a high percentag e 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 language s for persona l 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 pseudoprime s to the base 2 among all the numbers smaller than 20 billion suggest s that any number that passe s the Fermat test e to base 2 is likely to be prime," according to Pomeranc [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 tetrahedra l 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 language s such as BASIC limit exploration of the 3D analog of Pascal's triangle to the first 18 levels. Brute force factoring methods also become unbearabl y 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 Littl e 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 l Charmichae l numbers.It will take more than a persona 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 tetrahedra l 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 statemen t 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 elementsaround it (Fig. 13). The value of any eleELSE IF X = 0 men t 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 denominato r and decrementin g ELSE the numerato r of the interva l 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 persona l 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 necessar y 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 dependen t on only one previous level it would also be different paths from the apex of the tetrahedro n 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-tetrahedro n lattice onto the standard x, y, z cubic coordinate system is wasteful of computer mem7. SUMMARY ory becaus e we can only store 5456 elementsin 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 tetrahedra l 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 (Decembe r 1966). 2. A. K. Dewdney, Five easy pieces for a do loop and random-number generato r (Computer Recreations) . Scientific American 22 (April 1985). 3. S. Mueller, Recursions associate d with Pascal's pyramid. Pi Mu EpsilonJ4{ 10), 417-422 (1969). 4. J. Staib and L. Staib, The Pasca l pyramid. Mathematics Teacher 505-560 (Septembe r 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 Pasca l 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 development s in primality testing. Math Intelligencer 3 97-105 (1981). 10. C. A. Pickover, On the aesthetic s 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).
This Page Intentionally Left Blank
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—Iteration s with logical operators are demonstrate d to create aestheti c patterns . Logical operators return a bit-wise result which is either true (nonzero) or false (zero). The following examples demonstrat e 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 Rl = 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 presente d (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 generate d 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
a„+i = {a„ + bn)/2, b„.
^^n
= a„ OR Z?„, bn^, = VflTAND ^ .
c mean iteration with OR and AND. Fig. 1. The arithmetic-geometri 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. e {pj} is defined uniquely if (yo, r, N) are iterations can be used, for example an+i = ia„-\- 3^„)/ The sequenc 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 rectangula r 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 gasketderived from prime numbers. Comput. & Graphics 13, 57-58 (1989). 2. M. Szyszkowicz , A simple gasketderived from the logistic parabola. Comput. & Graphics 14, 335-336 (1990).
PART IV MANDELBROT, JULIA SETS AND OTHER COMPLEX MAPS
This Page Intentionally Left Blank
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 encounter s 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 Feedbac k is a term we often hear today in a variety of settings; for example, amplifier feedback during rock concerts, biofeedbac k 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 represen t an iteration. The computationa l 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 mathematica l 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-increasin g progression : z^^z'^ + c. Gaston Julia (1893-1978) was one of the first mathematician s 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" representin g such iterative Julia calculations have only recently been explored in detail, due in part to advance s in computer graphics. B. Mandelbrot, H. Peitgen, O. Richter, and others have extended the theory and graphic presentatio n of iterated fiinctions as a special class of fractals. Since their simple graphical representation s in the 1980s, the Julia and Mandelbrot sets have emerged as two of the most scintillating stars in the universe of popular mathematic s and computer art. The sets often resemble spirals upon spirals, and they serves as an important example of how simple mathematica l 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 representatio n of a Julia set. Researcher s 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 represent s 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 understan d 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 represente d as different colors to indicate the rate of explosion. In a computer program, you need not use complex numbers, becaus e 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 correspon d to behavior that even mathematician s 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 discovere d 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 elementar y 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 computationa l 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 mathematica l 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 understan d 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 successivel y 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 becaus e 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 characte r goes insane after exploring the Mandelbrot set.)
223 (2) Brooks, R. and Matelski, J. (1981) The dynamics of 2-generato r 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 mathematica l 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 quadratique s 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 Researc h Corporation for Mathematics and Computer Science , FIRST Laboratory at the z 2, 1000 Berlin 12, West Germany Technical University of Berlin, Hardenbergplat t a tutorial of some technique s that can be used in order to calculate the Abstract—In this paper we presen popular Mandelbrot set more efficiently. Emphasize d is how to avoidfloating-pointcalculations and how . The divide and conquer method, which to suppres s them completely (using afixed-pointrepresentation) consists of recursively dividing the calculating region into subregions , is also described . Programmin g examples are given in a high level programming language , and black and white graphics are included. 1. INTRODUCTION
Even if a user does not know how the Mandelbrot set[3] is calculated, most have probably seen different views of it reproduce d in computer magazine s 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 mathematica l 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 mathematicall y simple Mandelbrot set be so expensive ? The most important reason is the way it is calculated: several floating-point operations must be repeate d within a loop. The loop counter often runs from one to a number between 30 and 1000, and this calculation has to be repeate d 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 purposeof this article is to show some ways in which the necessar y 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 necessar y 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-processo r 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.
2. THE MANDELBROT SET
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 successio n has trespasse d 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 recommend s 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 successio n 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 becaus e 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 successio n of points escape s 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 successio n (stationary at the origin). Because this successio n does not escape to infinity, the point (0, 0) belongs to the Mandelbrot set. To test if a point successio n escape s 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 successio n 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 successio n of points. We have to set a limit of say 100 iterations. If in 100 iterations the successio n has not surpasse d 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 successio n exceeds the circle before the iteration limi t is reached , then the point does not belong to the set and its escape time is the number of iterations in which the successio n escape d 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 necessar y 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 whetheror 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 deserve s 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 decrease s 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 meanswe can still look at details that are at least 3/256 units wide. Because of the exponentia l fall of the cross sections of the escape regions, it is impossible to get a very detailed picture of the neares t 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 consideration s 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
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 acceptabl e 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 increase d 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 remembe r that for each pixel its center is taken as a representativ e 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 passe d from 190 to 300 iterations. Some parts of the Fig. 5 become cleaner and more detailed, but some others pixel's lose their contours. In Figure 6 we merged both graphcenter ics (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. Nonethelessour 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 Fig. 3. A very thin branch could miss the center of all pixels can almost always iterate deeper. If the escape regions are colored with different tones, we can still get a very in a small region. In this case it would not be graphed .
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), becaus e 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, becaus e the turbulence of the stripes that result pays for the lost detail around the thinnest arms of the Mandelbrot set.
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); 5. THE ORDER OF CALCULATIONS r:=b2-\-b3; The third source of inefficiency found in many proWHIL E {{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
ALA N N O R T ON
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
ALA N NORTON
ficients we can use certain symmetries to reduce the dimension of the problem. Consider a three dimensional subspac e 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 dimensiona l Julia set intersects this three-dimensiona l 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 understan d such 4-dimensiona l Julia sets, we need only compute their intersection in one 3-dimensiona l space containing the complex plane. For example, we can use the space spanne d by 1, ij. Computing the 3D Julia set In theory these could be computed by the same simple algorithm we presente d 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 correspondin g 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 evaluatingevery 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 component s 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 component s of the basin of attraction to the four-cycle associate d with p{x) = jc^ + (0.2809 - 0.53/). By computing and viewing them separatel y 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-dimensiona l grid, a second computation is required to produce a two-dimensiona l 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-dimensiona l surface structure by noticing shadows and shading on the surfaces . Similar visual cues must be generate d by the computer if we are to perceive the surface structure. In the images presente d 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 component s (colored yellow) become interconnecte d in three dimensions , and others do not. We can alter the loop interconnectio n 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 mechanis m for obtaining a set with desired connections . To explain the interconnec tion patterns it is necessar y 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 represen t 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-dimensiona l 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 quaternion s 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-dimensiona l sphere, so that the action of the mapping is to collapse such spheres to points. This "collapse of 2-spheres " has consequence s 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-sphere s in the Julia set, if the Julia set crosses the set of quaternions with zero real part. The loops in the 3-dimensiona l shapes pictured here can be explained by this phenomenon . The 2-sphere s s (loops) in the in the Julia set correspon d to 1-sphere 3-dimensiona l 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 cascad e 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 interconnectio n 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 component s to be interconnecte d 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 component s 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 cascad e of interconnecte d loops are created by this process . Suppose for example that a componen t 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 connecte d 4-dimensiona l 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 interconnection s 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 componen t containing /, to become connecte d in the quaternions . By considering the preimages of this pair (these are necessaril y connecte d as well), it is not difficult to showthat all of the quaternionic basin of attraction becomes divided into just two connecte d components , illustrated in Figs. 13 and 14. The red componen t 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 presente d 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 placemen t 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 demonstrate s 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-degre e 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.
^ 3 4 5
Cn - Cn+1 Cn+1 - Cn+2 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
23
4.00000000003985789976446295084695921763677430746956084488204 4.00000000001049043311938054289697531184468438351487206318541
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
2 79
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-\
l H - m * ( - C o o)
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„-*o o l/a„ = 0. To see this linearization argument is sufficient, we
T he Mandelbrot set exhibits m a ny scalings. Milno r ^^^ others have generalize d the Feigenbau m 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 associate d in other natural ways. Presumably , many more sequences of this type are to be found in the quadratic and in the generalize d Mandelbrot sets. While our se-
would have to show that '-^^^^ becomes small as e„
^^^^^^ '' ^ manifestation of a much more elementar y feature than are the Feigenbaum a nd Milno r scalings.
xirri'i \
— c )'""' H
— I -^ ^n+1 / m*(-c
)'"~^ = m-l
(1)
280
M. FRAME, A. G. D. PHILIP, and A. ROBUCCI
Mathematics Departmen t of Union College, and with David Peak of the Physics Departmen t of Union College. Considerable support for the computations of this project was provided by Lance Spallholz of the Computer Science Departmen t of Union College. REFERENCE S 1. B. Branner, The Mandelbrot set. In Chaos and Fractals: The Mathematics Behind the Computer Graphics R. Devaney and L. Keen (Eds.), American Mathematica l 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 Fig. 6. The 85-cycle midget in our series, at a resolution of 260, 12-15 (June, 1989). 400 X 300. The magnification is 1.89 X 10 •^, the dwell is 5. A. Douady and J. Hubbard, On the dynamics of poly2000, and the center is on the real axis at -1.9999999999 9 nomial-like mappings. Ann. Sci. Ecole Norm. Sup. Paris 999999999999999999999999999999999999999010782 6 18,287-343(1985) . 120324153314550593225656554842749596528609948 3 6. J. Eckmann and H. Epstein, Scaling of Mandelbrot sets 24978. generate d 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 sequence s of bifurcations of period three. Russian Math. Surveys 38, 187-188 (1983). 10. M. Jakobson , Absolutely continuous invariant measure s for one-paramete r families of one-dimensiona l maps. Commun. Math. Phys. 81, 39-88 (1981). 11. O. Lanford, A computer-assiste d proof of the Feigenbau m conjectures . Bull. Amer. Math. Soc. 6, 427-434 (1982). 12. B. Mandelbrot. The Fractal Geometry ofNature, Freeman, New York (1983). Fig. 7. The 200-cycle midget in our series, at a resolution of 13. M. Metropolis, M. Stein and P. Stein, On finite limit sets 100 X 76. The magnification is 5.68 X 1 0 "^ the dwell is for transformation s ofthe unit interval. / Combinatorial 10000, and the center is on the real axis at -1.999999999 9 Theory (A) 15, 25-44 (1973). 999999999999999999999999999999999999999999999 9 14. J. Milnor, Self-similarity and hairiness in the Mandelbrot 999999999999999999999999999999999999999999999 9 set. In Computers in Geometry and Topology, M. Tangora 999999999999999942668574690370152486887341496 9 (ed.). Marcel Dekker, New York, 211-257 (1989). 921982795393910464951564378620882667385903299 1 15. J. Milnor, W. Thurston, Iterated maps ofthe interval. In 174195043408862370758555984601058292006584653 4 Dynamical Systems, Lecture Notes in Mathematics (vol. 438813818139373097636 . 1342), J. Alexander (ed.). Springer-Verlag , New York (1988). 16. M. Misiurewicz, Horseshoe s for mappings ofthe unit interval. Bull. Acad. Polon. Sci. Ser. Sci. Math. 27, 167we believe this and similar sequence s are useful tools 168(1979). for navigating at high magnifications around the Man17. A. G. D. Philip, An introduction to the Mandelbrot set. delbrot sets. In CCDs in Astronomy II, A. G. D. Philip, D. Hayes, S. Adelman (eds.), L. Davis Press, Schenectady , NY, 275286(1990). Acknowledgements—Throughout this project, the authors 18. A. G. D. Philip, A. Robucci, M. Frame, K. Philip. Mm., have benefitted from extremely helpful conversation s with L. Davis Press, Schenectady , NY (1991). K. W. Philip of the Institute for Arctic Biology of the Uni19. S. Sarkovskii, Coexistenc e of cycles of a continuous mapversity of Alaska at Fairbanks. Indeed, his picture of a midget ping ofthe line onto itself Ukrain. Mat. Z. 16, 61-71 at a magnification of 2 X 10^', first mentioned in [4], was (1964). the catalyst that began our work. 20. S. Ulam, J. von Neumann, On combinations of stochastic and deterministic processes . Bull. Amer. Math. Soc. 53, Some aspects of the mathematica l analysis were clarified 1120(1947). significantly through discussion s with Susan Niefield of the
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 Researc h Laboratory, Departmen t of Computer Science , University of Massachusett s at Lowell, 1 University Avenue, Lowell, MA 01854 Abstract—Algebrai c analysis of Halley transforms reveals the nature of the so-called director nodules that characteris e iteration maps.
and substituting this in the Halley transform we get:
1. INTRODUCTION
An earlier note [1] on features of Halley's method when applied to simple polynomials is here elaborate d 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 separator s «,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 preserve s 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 sequenc e 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 sequenc e of nodules along the separators , it must be 3. HALLEY TRANSFORM OF z" - 1 remembere d 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 ascertaine d that equating expressio n (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 discusse d 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, becaus e the denominato r is quadratic in z", giving two poles for each zero not at the origin. For values of n up to 4, the map is characterize d by parabolic separator s 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 separator s 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 separator s web over and join up, and the basin about the origin breaks up into a sequenc e 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 separate d on a circle centered at the origin, but are then separate d on a constant radius through the origin. In this sense , the separator s 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 correspon d 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 repeate d 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 correspondin 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 lik e in Fig. 1, then interactively prompting the user for Kc= {ze(P|Or+(z)+^ 00 } . The complemen t 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 superimpose d on the image. as ^(oo). Note that Jc is the boundary of ^(oo), deFigure 3 show s a single forward orbit for z E D'. In noted as d^(oo) as well as the boundary of Kc such d that dAioo) ^ Jc = dKc. Therefore, Fig. 1 is a visual- this case, however, the topology ofOr^ is demonstrate n ization of the final behavior of the forward orbits. It by connecting the forward iterates. This presentatio s not only do the iterates says nothing about the orbit itself What path in (P of the same data demonstrate 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 iteratesmake 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 ringsperimeter, ^ Presentl y 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. 1. INTRODUCTION
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, homeomorphi c 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 understandin g of the dynamics associate d with the Siegel disk morphology.
Reprinted from Comput. & Graphics Vol. 17, No. 3, pag. 321-324, 1993
298
G. T. MILLE R
Fig. 1. Filled-in Julia set K_o.39054-o.58679 i•
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
transcendenta l function such as e^, sin z, cos z are other candidates . In fact the dynamical system defined has been investigated by/(z) = X sin z where z,\^G 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 (convergenc e 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 understandin g of the phenomena being studied. REFERENCE S 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-Wesle y Reading, MA (1989). APPENDIX The C-style pseudo-cod e 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. MILLE R
} 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 unbounde d 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 congeste d 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 associate d with the orbit. Notice that lines 21,22 map the z-coordinate s of the orbit from the C plane to the screen coordinateswhere 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
IMAG E GENERATION BY BLASCHKE PRODUCTS IN THE UNIT DISK HOI SUB KIM, ^ HONG OH KIM ^ and SUNG YONG SHIN*
^Departmen t 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 representatio n of the mysterious Mandelbrot set in the late 1970s, computer graphics are contributing greatly to the representation s of natural phenomen a and structures of dynamical systems . In particular, the visual representatio n of the dynamics of a simple complex analytic map become s afieldof computer art. In this paper, the convergenc e patterns of sequence s of partial products of infinite Blaschke products are visualized and are exploited to generat e color graphics images. 1. INTRODUCTION the zero function on the unit disc [2,3]. Here is a short After the emergenc e of the fantastic computer-gener - and direct proof: If we note that x < e^~^ and ated images of the Mandelbrot set by B. Mandelbrot and the equally enticing mathematica l work of , _ ( 1 - \a„\^)(l - \z\') 1 - \b„(z)\' = Douady, Hubbard, and Sullivan in the late 1970s, re11 - a„z\ newed attention was once again drawn to the rich structure of dynamical systems in the complex plane then [4-6]. Computer graphics are contributing greatly to the generation of aesthesti c art and the visual representations of mathematica l functions and physical phenomen a [7, 8]. A (finite or infinite) Blaschke product / is an interesting function in itself and plays a very important ^expj,{\b„(z)\ -1) 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 : e x p - 2 ( I M z ) l ' - 1) Blaschke product B carrying all the zeros of / a nd another bounded analytic function^ without zeros having 1 ^ ( 1 - | a „ P ) ( l- \z\') = e x p ( -i the same superimum norm as/. In this paper, the con|1 -a„z\ vergence patterns of sequence s of partial products of infinite Blaschke products are visualized by color ^ e x p ^ - •--• - i ^ ' s d - K i ^ ) graphics images and are exploited to generate aesthetic + \z\ graphics. 1 1 - Ul 2. BLASCHKE PRODUCTS < exp 2 1 + |z| 2 ( 1- I Let D be the open unit disc in the complex plane and let {a„] be a sequenc e in D. Let Since S r (l - |«„|) = oo, \Bjs;{z)\ -^ 0 asTV^ oo. For more on Blaschke products, see [1-3]. \an\ an- z bniz) a„ 1 - dnZ 3. THE METHOD OF IMAGE GENERATION For a given sequenc e {an} inD, whetherit satisfies and let the Blaschke condition or not, the partial product Bi^(z) always converges for each point z in D SLS N ^^ oo. Bj,iz) = U^^ib„iz), N=U2, Therefore, if wefix z in D, then the successiv e difference B]^(z) — Bis!+i{z) tends to zero as TV grows. For fixed \an\ small positive e, we associat e the smallest natural We use the convention that 1 when an = 0. If number N^iz) to each point z in D so that | Bj^(z) — an g to the sequenc e {un} satisfies the Blaschke condition 2( 1 BN+I(Z)\ < e. If we assign a color correspondin - | as a finite set of grid [1-3]. This Umit function B(z) is called an infinite Blaschke product. But if {an} does not satisfy the points of mesh size h and use a finite number K of Blaschke condition, we know that BN(Z) converges to colors that can be displayed on the graphics terminal
\BAz)\ =n iwz)i
«J)j.
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 generatio n 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 correspondin g 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 sequenc e {a„] of complex numbers. First, we consider an = Tne'^" with
rn= 1
1
( «+ l ) ^
(«+ 1)^
«= 1,2,
The parameter s 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 limi t function is identically zero. We emphasiz e that eyes appear at z = ^„ becaus e 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\ d of for z near ajs/. Therefore, in a small neighborhoo 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„ e 6„ = ]l(n + 1. In Figs. tending to 1 for a fixed sequenc 1 and 2, the sequence s {a„} of zeros satisfy the Blaschke condition, and the images are generate d with small e the moduli go fast to one. number of eyes becaus 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„ approache s one, and thus the shape near the unit circle is complex becaus e 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 sequence s 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 generate s 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 generatin g fractals from the mapping z^>^ z~" -\- c and discusse s s and cycle periodicity show details of these fractals the structure of the resulting images.Lyapunov exponent that are obscure d by prior escape-tim e techniques . The resulting fractals are shown to have a hypocycloid shape.The associate d Julia sets can be classified into a variety of types. 1. INTRODUCTION
Several programs and papers have used escape-tim e methods to produce images of fractals based on the complex mapping Eq. (1), where exponent «is a positiv e 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, correspondin g 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 generate d from Eq. (1) using escape-time techniques , for example by Gujar and Bhavsar[l] and Glynn[2]. Figure 1 shows a c-plane escape-tim e fractal generate d 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-tim e 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 generate d by the same method as Fig. 1, but with a stopping s that much of radius of 10 instead of 3. This suggest 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 approximate d 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-tim e techniques . These regions correspond to areas that are mapped near infinity by Eq. (1), causing them to exceed the escape-tim e bound. Figure 3 is much less dense than Fig. 2; it has a lacelik e structure and numerous voids. Figure 3 probably shows the fundamenta l 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 generate d by z - • z"* + c. Presumabl y these arise becaus e 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-tim e fractal generate d from z -^ z~^ + c. The initial z value is c; the escap e condition is \z\ > 3. Dark points diverge quickly; white points are stable.
iterate the mapping and test if the resulting sequenc e of z values approache s 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 exponen t fractal generate d 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 mathematicall y determine the basic shape of the fractal. Consider the
s are 0.546 Fig. 2. Escape-tim e fractal generate d from z -^ z ^ + c. The Fig. 4. A very small detail of Fig. 4. The coordinate <x< 0.547, 0.620 10.
Investigation of fractals
309
second term correspond s to a fixed point; cancelling this term and dividing by zc yields z~' + zc = c~K Now, for stability | dldz{(z-^ + c)"^ + c)| < 1. This simplifies to | (z~' + zc)'^ \ < 2~^'^. Finally, combining the two equations yields \c\