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 <2-quadrant , sb in the /j-quadrant, etc. Conversely, any two points in the same quadrant must have the same last letter. Further, the notion of quadrant is recursive; each quadrant can be divided into quadrants , etc. Thus, in Fig. 2, "g" is plotted in the g-quadrant , and then "a" is plotted in the upper right subquadran t of the g-quadran t (the one with its upper right vertex at the center of the entire figure), or what might be called the "ga" subquadrant . Any point in the square would be mapped to this subquadrant . Thus, "a" produces a copy of the g-quadran t that is one-half the size (side length) of the g-quadrant , or one-fourth of the size of the entire picture. The next "a" then produces a one-half size copy of the "ga" subquadrant , the "gaa" sub-subquadrant , and then "t" produces a "gaat" subsub-subquadrant . Further, due again to fact that a base is plotted in its quadrant, the converse holds as well: If two points are within the same quadrant, they correspon d to sequences with the same last base; if they are in the same subquadrant , the sequence s have the same last two bases ; if they are in the same sub-subquadran t they have the same last three bases , etc. Thus, we have the following: THEOREM 2. In a CGR whose side is of length 1, two sequences with suffix of length k are contained within the square with side of length 2~^. Further, the center of the square is given by the following recursive definition:
terminate in the /c-long sequenc e given in the definition.) The resolution of most monitors or printers is such that the points for sequence s with identical suffixes of length over 10 (maximum) are superimposed . However, any portion of the CGR may be magnified to any degree, revealing finer structure of the CGR and therefore of the sequence . Thus, there is no limit on the length of subsequence s that may be displayed. 5. SIERPINSKI CARPETS
5.1. AC- and BD-deficient sequences Figure 5 shows the CGR of a 50,000-lette r sequenc e with all "ac" subsequence s removed. It is similar to a Sierpinski carpet[3]. We shall use this figure as examples and motivation for the discussion (in the following section) of finding the sets of subsequence s corresusing visual features of a CGR. The large empty square, of side length |, with its lower left corner at the center of the CGR, is the area in which all sequence s terminating in "ac" would be plotted. (It is empty because , of course, there are no such subsequence s in this sequence. ) The square of side length g, with its lower left comer at the upper right comer of the largest empty square, is represent s all "acc-"terminate d sequences . Similarly, the square of side ^ , next on the diagonal toward the c-corner, represent s all sequence s "accc"-terminate d subsequences , and so on. Figure 6 shows this set of subquad rants. It is very instmctive to examine another set of subquadrants , the set in the upper right subquadran t of the lower right quadrant (or, the c-subquadran t of the d-quadrant ) (see Fig. 7). In this subquadran t we see a ^ -size copy of the "ac-," "ace-," "accc-," etc. subquadrant s marked in Fig. 6. The largest of this set correspond s to all subsequence s terminating in "acd;" the next to all terminating in "accd," the next to "acccd," and so on. A similar set, each a 5 -size copy of the set in the c-quadrant , is found in the c-subquad rant of the b-quadran t and the c-quadran t of the aquadrant.
1. The center of the suffix ofO length is(^, ^) 2. If the center ofthe square containing sequences with suffix w is at (x, y), then (a) the center ofthe square containing sequences with suffix wa is {x/2,y/2)\ (b) the center of the square containing sequences with suffix wb is (x/2, {y + 1 )/2); (c) the center of the square containing sequences with suffix wc is at {{x 4- 1 )/2, (y + 1 )/2); (d) the center of the square containing sequences with suffix wd is at ((x + 1 )/2, y/2). (In the subsectio n below, "Arbitrary Subsequences, " we shall see that the converse holds as well: Each subquadran t of size \ ^ with center is given by the above definition correspond s exactly to those sequence s that
Fig. 5. Random sequenc e without "ac" subsequences .
Chaos game visualization / ac
Fig. 6. Empty square s and their correspondin g subsequences . In general, close examination of Fig. 5 reveals that in every subquadrant , of side length r^, /c = 1 , 2 , . . ., there is a complete copy of the entire CGR. The CGR of a random sequenc e with no "bd" subs of sequence s shows the same form, but the sequence empty area, in decreasin g size order, go up and to the left. 5.2. BC- and AD-deficient sequences The CGR of a sequenc e with no "be" or "ad" subsequence s (/.^., letters from the same side of the square) d in the has a similar set of empty areas as discusse above subsection . However, when the letters of the missing subsequenc e share a side of the square, the boundaries of the missing areas are colinear (as opposed to above case, when the boundaries share only the single corner point). As a result, although the same size areas are missing, the boundaries of the areas are fractal, and the attractor appears quite different from Fig. 5. Figure 8 shows the CGR for a 50,000 letter sequenc e with no "be" subsequences . Figure 9 is the same CGR, but with areas correspondin g to various missing subsequence s noted.
b
Fig. 8. Random sequenc e without "be" subsequences . 5.3. Arbitrary subsequences e s of interest. Let us Suppose we have a subsequenc call this the primary subsequence. (We might, for instance, be interested in whethers is more or less free than average. ) Define the "priquent in the sequenc mary image" (denoted by the symbol D) to be the square of size —^^ (where | s \ denotes the length of 5) •21given by the recursive definition of Theorem 2. If there are no subsequence s s in the sequence , the primary image is empty; if there are additional instances of 5, the primary image will be denser than average . If the center of the primary image is (x, y), and it has side length -^, we can define the a-image of the primary image to be the subquadran t whose center is (x/2, y/2), and whose side length is —j^. The b-, c-, and d-images have the same side length and are centered at (x/2, {y + l ) / 2 ), ({x + l)/2, (y + l ) / 2 ), and ((x + \)/2, y/2), respectively. Thus, there is a point in the a-image of the primary square if and only if there is a point in the primary image that is mapped into the a-image by the a-map.
. acd '{• accd
Fig. 7. Half-size copy of the square s marked in Fig. 6.
Fig. 9. Subsequence s correspondin g to empty areas of Fig. 8.
10
H. JOEL JEFFREY
This in turn can only occur if the subsequenc e sa occurs in the sequence . Thus, the points in the a-image of the primary image are the a-maps of all points in the primary image, and similariy for the b-, c-, and d-images of the primary square. Now let us consider a 2-letter extension of s, say sab. The subsequence s of this form in the sequenc e produce a set of points in the b-map of the a-map of the primary image, or 5(a (D)). Thus, ab produces an image of the primary image of size J of the primary image size, whose center is defined by Theorem 2. In general, every sequenc e t defines an image of the
/y ggaggagggqajag l9
c ^db
r'/ 1 X
.^^
cca cdca ddca bca aca dca a b d
/
primary image, of size -JTJ . If there are no instances of the primary sequenc e present in the sequence , then the primary image and all /-images of the primary image will be empty, for all sequence s /. For any sequenc e s of length greater than 1 we can therefore define a CGR in Cantor set-like fashion as follows:
Id
Fig. 11. Subquadrant-subsequenc e correspondence . quent than average ; we would like to be able to easily identify the subsequence s correspondin g to this feature.
6.1. Approximation of features Recall from the above section that the a-image of the primary square is the {pvbarp - Wa(^), for some q in the CGR, that the a-image is contained in the aquadrant, and similarly for the b-, c-, and d-images. The points in the a-quadran t correspon d to any subIt should be noted that if t is of the form xa, then sequenc e ending in "a," and conversely any subsethe /-image of the primary image is the a-image of the quence ending in "a" produces a point in the a-quadx-image of the primary image, and therefore the above rant. The a-quadran t is thus the a-image of the entire algorithm may be formulated recursively. CGR, and similarly for the b-, c-, and d-quadrants . Figure 11 illustrates the fundamenta l correspondenc e of string to subquadrant . 6. SUBSEQUENCES CORRESPONDING VISUAL FEATURES Let us denote by J the map correspondin g to a, and e s It is common, when using the CGR to investigate a similarly for 5, c, and d. Then any sequenc set of sequence s (e.g., a set of DNA sequence s for the ~ SiS2' • * s„ defines a map s„s„-i • • • Ji, such that if same protein in several species ) to find a feature of the the sequenc e / correspond s to point p of the CGR, the CGR and want to identify the sets of subsequence s sequenc e ts correspond s to sip) = s„s„-i • • - Si(p). that correspon d to the feature. Figure 10, for example, From the definition of the IFS maps, if the CGR is shows the CGR of 15 concatenate d coding sequence s based on the unit square, the square of side length 1, in the human globin region on chromosom e 11. (Not with lower left corner = (0,0) (as in Theorem 2), then all the DNA sequenc e actually codes for proteins.) An the center is at (^, ^), and centers of the a-, b-, c-, and easily identifiable feature is the roughly oval area d-quadrants are at ( i , | ) , ( i , | ), ( |, | ), a n d ( |, 1), marked on the figure in which the density of the points respectively. The center of the aa-subquadran t is then is several times that of the CGR as a whole. This in- at ( |, g), the ca-subquadran t (the upper-right, or c-, dicates a set of subsequence s several times more fre- subquadran t of the a-quadrant ) is at ( |, g), etc. Using binary representation , we have Table 4. The center of each subquadran t is represente d by two bit strings, the x- and ^-coordinates in binary with the binary point dropped. Since the corners of the CGR are at (0, 0), (I , 0), (1, I) , and (1, 0), only two operations are involved 1. Remove the 5-image of the unit square. This is the primary image. 2. For each A: > 0, For each string t of length /c, Remove the ^image of the primary image.
Table 4. Centers of quadrants , binary representation . Quadrant
d coding sequence s of HUMHBB. Fig. 10. Fifteen concatenate
a b c d aa ca
Center (.01, (.01, (.11, (.11, (.001, (.011,
.01) .11)
.11) .01) ,001) .011)
11
Chaos game visualization in finding a new point in the CGR, whether the center or comer of a subquadrant or any other point: multiplying by 5 and multiplying by 5 and then adding | . The5mapof(x, );)is(x/2, );/2 + \);cis{x/2 + ^, y/2 + ^); dis (x/l + ^, y/2). Multiplying by ^ is represented in binary by prefixing a 0, and if the leftmost bit of a number is 0, then adding 5 is represented by simply changing that 0 to 1. Therefore, the combination of multiplying by and adding 5 is represented by prefixing a 1. Therefore, if a location is given by bit strings x and y, we can describe the a, b, c, and J maps as shown in Table 4. Now let us consider the converse: Suppose we have a point p whose coordinates are given by bit-strings x and y (e.g., 101, 011). The left-most bits of jc and y are 1 and 0, respectively. Examining Table 5, we see that the only map that can produce this pair of leftmost bits is J, and thus p = J(01, 11). Continuing, if q is the preimage of/?, then the leftmost bits of ^ are 0 and 1, so ^ = b{ {,_ 1). Similarly, (1, 1) = c(0, 0). Thus, (101,011) = d{b{c((0,0)))), which means that (101, 011) is the point corresponding to subsequence "cbd." (Note the reversal as we go to the string from the composition of maps.) The correspondence of bit-pairs to maps is summarized in Table 6. 6.2. Algorithms Based on the above analysis, we can define algorithms for locating, resizing, and moving a box corresponding to any subquadrant of a CGR, as follows: 1. Define the initial subsequence to be "a." 2. To draw a box corresponding to a subsequence, find the corners of the box byfindingthe image of each of the comers of the CGR under the map corresponding to the sequence: If 5 = 51^2 • • • 5„, then 5((0, 0)) = s„s„-i • • • 5i((0, 0)), and similarly for (0, 1),(1, 1), and (1,0). 3. To move a box, (a) Convert the subsequence corresponding to the current box to the corresponding x and y bitstrings. (b) Add/subtract 1 to/from the x and/or y bitstrings: Up: Add 1 to the y bit-string Down: Subtract 1 from the y bit-string Left: Subtract 1 from the x bit-string Right: Add to the x bit-string. (c) Convert the new x and y bit strings to a sequence of letters. (d) Redraw the box. 4. To enlarge a box, delete the rightmost letter of the subsequence, and draw the box corresponding to the sequence.
Table 6. Map to bit-pair correspondence. Map
Bit pair
c h c d
0,0 0, 1 1,1 1,0
5. To shrink a box, append "a" to the subsequence and redraw the box corresponding to the sequence. (Any letter could have been used; "a" is an arbitrary choice.) These algorithms only allow boxes to be defined and moved in units of quadrants, subquadrants, subsubquadrants, etc. In other words, one cannot use them to define a box of side length 5 centered at the point (5, 5). Such a box would not correspond to a single subsequence; the sequences that correspond to this box are the four subquadrants corresponding to subsequences "ag," "ct," "ga," and "tc" (Fig. 12). The above algorithms allow the definition of a set of subquadrants of any size, each corresponding to a set of subsequences with afixedsuffix, that approximate any area (or combination of areas) of a CGR as closely as desired. In essence, the feature of interest is covered with a set of squares of varying sizes, approximating the feature as desired. 6.3. Description ofprogram The above algorithms have been implemented in a working program for analyzing CGRs. The program is approximately 1,600 lines of Turbo Pascal 5.0, running on an IBM AT or PS/2 with EGA or VGA monitor. The program produces a CGR from a user-specified sequence file and then allows the user to define and move a box on the CGR. The eight outer keys of the keypad permit movement of the box in any direction (including diagonals). A user may at any point elect to retain a box; it is redrawn in another color and the subsequence defining the box is added to an on-
Table 5. CGR maps in binary. a{x, y) = (Qjc, 0>') b{x, y) = (01, \y) c{x,y) = i\x, \y) d{xy) = {lx,Oy)
Fig. 12. Square not corresponding to a single subsequence.
12
H. JOEL JEFFREY
screen list. This on-scree n list may be edited, and deleted sequence s (and their correspondin g boxes) are removed. s the use of the CGR analysis Figure 13 demonstrate program to find the subsequence s that define features of a CGR. In lower-left quadrant of the CGR of the human alpha-1 antitrypsin gene (HUMAIATP ) is an irregularly shaped figure that is visibly sparser . The figure shows that the area is approximate d by the subquadrant s for six different sequences , from four to six bases in length. (Most of the figures in this paper were produced with this program.) It would be very difficult to recognize such a set of sequence s via ordinary statistical analysis methods, for the area does not correspond to a single comparatively rare subsequenc e (such as a single tetranucleotide , for example). Rather, it correspond s to a set of comparatively rare sequences , of different lengths. Finding such sets might be possible in principle, by examining or otherwise processin g sets of frequency counts, but some of the sets are large enough to effectively preclude effective human pattern recognition. (The whole point of the CGR, and other visualization techniques , is to avoid long sequence s of data.) For example, there are 4^ = 1,024 sequence s of length 5, and 4^ = 4,096 of length 6. Further, the "tgatca"-squar e is part of the sparse area. It is difficult to see how such a set of sequenc e characteristic s might be discovered by examining these large sets of frequency counts other than via CGR analysis. Figure 14 is a good example of using the CGR, together the CGR approximation algorithm, to recognize and analyze features of a sequenc e that in all likelihood would not occur without it. Figure 14 is the CGR of the amino acids of the bacteriophag e PT7. Note the somewhat star-shape d region approximately one quarter of a side length from the right edge. This region results from the absenc e of a somewha t complex set of subsequence s of amino acids missing from the DNA sequence . Traditional statistical analysis would be unlikely to reveal such a feature, as it produces statistics on the relative frequency of subsequence s (usually of a single length), and the star shape results from the absence of several subsequence s of several lengths.
k' \iC
\
I
cgaa aatca tatca attca cggaa tgatca
la
.*/ • y-r''^' *-^ ^''.v"/ " .;; , " ^ '-,/:
'•,\l
X^: '<:
ag>
:;^, ,;-,
^. 'L
• ' ./ '* ' "''
.., /.
, ^ - ? " *
\
* -'',\^* 1 '
~
1
'
'
Fig. 13. Approximating an irregular feature of HUMAIATP.
Fig. 14. CGR of bacteriophag e PT7 (using amino acids). 7. RELATED WORK
Symbolic dynamics[2], a topic in dynamical systems theory, associate s strings of symbols with orbits of a dynamical system. It is a powerful tool for analyzing the orbits. It would be interesting to find out whether this approach can be reversed , finding dynamical systems whose behavior is represente d by a given sequence . To date we have relied solely on visual character ization of the patterns found in CGRs, both as to recognizing features and judging similarity of features. An objective, mathematica l measure is needed . The pattern recognition literature reveals littl e in the way of a formal definition or characterizatio n of "pattern" that is directly applicable. However, digital image enhancemen t techniques are clearly applicable. The Hausdorff distance[l] has been used to formalize similarity of patterns, and may prove useful in defining similarity of CGRs. To our knowledge CGR is the first attempt to use particular sequence s of numbers (or symbols) to control the chaos game, and thereby analyze/characteriz e the sequence s themselves . Since the approach is new, so far as we know, we conclude with some open questions and extensions of the technique, most of which have been barely, if at all, explored. (We invite the reader to take this list as provocative, in the spirit of initiating a brain-storming session , rather than in any way complete or exhaustive. ) 8. EXTENSIONS AND OPEN QUESTIONS
8.1. Pattern recognition and similarity To date, all work with CGRs has relied on using them as an aid to human intuition, presenting a great deal of information visually. We do not view this as a fault, as visualization of scientific information is, in our view, a valuable and growing field. However, there is no reason to limit CGRs to this use. Specifically, the great body of image enhancemen t and pattern recognition work can be applied to CGRs. These approache s may well improve the usefulnes s of the CGR as a visualization method, and provide the obvious possibilities of standard feature extraction. The above-mentione d Hausdorff distance as a measure of similarity of CGRs is a formalization related to these development s that seems quite useful. For ex-
13
Chaos game visualization ample, it may be that one can find CGRs that are representative of groups of DNA sequences , and the Hausdorff distance from an unknown DNA sequenc e to the representativ e CGRs provides information as to what the unknown sequenc e codes for. In some applications this may be a necessar y step in applying CGRs to a large body of sequences . For example, biologists typically believe this step is necessary. We feel a cautionary note is in order, however: human visual processin g is far superior to any currently known technology, so there well be human-recogniz able characteristic s of CGRs that are resistant to current technology. 8.2. Sequences over larger alphabets The CGR technique presente d in this paper works only for sequence s over an alphabet of four letters. For larger alphabets of size « > 4, one might think of defining the CGR on a regular «-gon. Although this can be done, it does not provide a good visualization of the sequence , becaus e a random sequenc e on an ngon does not produce a filled-in polygon. The following approach does work: Divide the unit square (as with the standard CGR) into n equal nonoverlapping portions covering the square {i.e., a tiling of the square). This tiling defines n maps of an IFS code in which map k defines the mapping of the unit square onto tile k. A random input sequenc e then produces afilled-in unit square, as with the standard CGR, and so any nonuniformity in the input sequenc e produces a nonuniformity in the density of areas of the CGR, and vice versa. We therefore have the same conditions that permit the standard CGR to represen t a sequenc e on four letters. We have experimente d with this approach in DNA sequences . In a DNA sequenc e three bases (letters) define one amino acid; such ordered triples are known as codons. Each codon defines one amino acid (the building blocks of proteins), although there are only 20 amino acids; several codons code for the same amino acid. In addition, there are three "stop codons" and a particular "start" codon which control cellular machinery that produces the protein based on the DNA sequence , so a total of 24 equivalence classes of codons are present. We have produced a CGR in which the unit square is divided into 24 (4 by 6) squares , and the CGR is produced by 24 mappings onto these squares . If two codons code for the same protein, the
same map is used. The result is a CGR with identifiable areas of greater or lesser density. We have also produced a CGR using only the codons for the 20 amino acids, with a 4 X 5 tiling of the square. The usefulnes s of this approach to biological investigations remains unknown. 8.3. Natural language representation The input sequenc e for a CGR can be any sequence . The CGR analysis program discusse d above ignores any input letters not in the four-element alphabet. English text files can, and in fact have been used produce CGRs with visual features. (As illustrated in [4], such CGRs are unUke those of DNA sequences. ) An application in which this might prove useful is in establishing authorship of texts. One part of such work depends on syntactic and stylistic characteristic s of texts, rather than semantics or historical references . It is conceivable the CGRs of works of various authors, or bodies of texts, may show distinctive characteristics . The standard CGR is in certain respects poorly suited to this application, as it is based on only four letters, but the extension to larger alphabets discusse d above addresse s this difficulty. A somewha t different extension would be to very large sets of maps, perhaps 100 (10 X 10 tiling) or 10,000 (100 X 100 tiUng). This would allow plotting of points correspondin g to words, and the result would be a visualization of the sequence s of words used. Since in some sense a grammar of defines the possible legitimate sequence s of words of the language , this graphical representatio n of text may prove useful in natural language processin g in general, as well as authorship analysis. REFERENCES
1. M. F. Barnsley, Fractals Everywhere, Springer-Verlag , New York (1988). 2. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, Addison Wesley Publishing, Redwood City, CA (1989). 3. J. Feder, Fractals, Plenum Press, New York (1988). 4. H. J. Jeffrey, Chaos game representatio n of genetic sequences . Nucleic Acids Research 18(8), 2163-2170 (1990). 5. P. G. Ossorio, "What Actually Happens"—The Representation ofReal World Phenomena, University of South Carolina Press, Columbia, SC (1978). 6. S. K. Park and K. W. Miller, Random number generators : Good ones are hard to find. Com. of the ACM, 31( 10), 1192-1201(1988) .
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
15 Chaos and Graphics
TUMOR GROWTH SIMULATION WERNER DCCHTING
University of Siegen,Dept. of Electrical Engineering , Holderlinstr. 3, D-5900 Siegen, West Germany Abstract—This paper gives a survey of the author's work on systems analysis, control theory, cellular automata , and computer science applied to complex biological systems . Mathematicians have long been interested in cellular automata theory and the game 'iife"[l] . However, only recently have physicians been able to look, via 2D- and 3D-computer graphics, directly at normal and malignant cells in a three-dimensiona l tissue. This recent developmen t makes it possible to simulate different kinds of tumor treatment and to look to the pathological state of cells in the surrounding tissue. In medicine, one characteristi c feature of malignant tumors is uncontrolled proliferation[2], Therefore, from the viewpoint of control theory, a main question is: How is the growth of normal and malignant cells regulated? This question can be studied at different levels: (i) molecular biology level (genes and oncogenes), (ii ) cellular level (cell-cycle processes) , and (iii ) organ level. At present, the experimenta l data about the control mechanism s at the first level are still very diffuse. For this reason we have focused on constructing feedback control models which describe the cell division of normal and tumor cells at the cellular level. This work led to the hypothesis postulated in 1968[3]: Cancer may be interpreted as a structurally unstable closed-loop control circuit. At that early time, we mainly studied the dynamic behavior and the stability conditions in the time domain by applying block-oriented simulation languages [4]. With the increasing progress in computer science, we extendedour first approache s and developed models which additionally describe the spatial behavior of tumor growth. Some of the oversimplifying assumption s underlying the following approache s are: constant volume of a cubic cell, constant cell phase duration, only horizontal and vertical communication between neighboring cells, a limited tissue volume, and neglect of side-effects , metastases , and immunologic reactions. The design philosophy for constructing a computer model of tumor growth requires modular-structure d subsystems[5]: (i) feedback control models which describe the cell division of normal and tumor cells including experimentally gained data of cell-cycle phase durations, (ii) heuristic cell-production and interaction rules describing the cell-to-cell communication , for instance distance-dependen t cell division rules, and (iii ) transport equations for simulating cell movement. Details of the simulation strategy are as follows: • the cell-cycle phase durations of cells are generate d by a pseudorando m number generator ;
• the knowledge base of cell production rules comprises the following observations: • a normal cell can only divide if there is an empty position in its neighborhood ; furthermore, its division is limited to a distinct number of cell cycles; • a tumor cell can divide even if there is no empty space available for a daughter cell; this rule is restricted by a distant-dependen t statemen t as follows: For in vitro tumor growth, if the distance between the dividing tumor cell and the nutrient medium is more than three cell layers, the tumor cell will transfer to the resting (dormant) state GO and later on into the phase of necrosis (cell death). These statement s have been transformed into algorithms, and we have written modular-structure d subprograms in FORTRAN IV. The simulation run can be considere d as a row-to-row computation of the cell algorithm for each individual cell. The input data for a simulation run are: • initial configuration of normal and malignant cells • cell-cycle phase durations of normal and malignant cells • information of cell loss rate • information about the structure of the capillary network • treatment scheme s including dose rate and treatment intervals. As for the first example, we fed the computer model with the experimentally gained data of the cell-cycle phase durations of the adenocarcinom a of a mouse. The division of a cell is going on along this series of phases : Gl in which proteins and ribonucleic acid are synthesized , S in which DNA is duplicated, G2 in which the cell synthesize s RNA and protein molecules required for transit through this phase, M leading to cell division, GO in which the cell is resting, and N in which the cell is dying. The simulation run starts by inoculating a single tumor cell living in the state of mitosis (M) into the center of the cell space of a nutrient medium. According to the cell-interaction and production rules, the tumor continuously grows to become a tumor spheroid [ 6 ]. Figs. 1 a and 1 b only show the tumor configuration in the steady state at T = 300 units of time. It is very important to know in which phase of the cell cycle a tumor cell is residing becaus e the sensitivity of tumor cells differs from cell phase to cell phase. This is a decisive fact for tumor treatment
Reprinted from Comput. & Graphics Vol 14, Nos. 3/4, pag. 505-508, 1990
16
WERNER DOCHTING
Fig. la. Tumor spheroid at T = 300 units of time.
Fig. lb. Cross-section of the tumor spheroid at T = 300 units of time. (Symbols: O = N Phase, ^ = GO Phase, ^ = M Phase, Of = G1, S and G2 Phases.)
Fig. 2a. Initial configuration of a single tumor cell placed in a tissue segment (cortex) at T = 1 unit of time.
Fig. 2b. Spread oftumor cells and capillaries at T= 120 units of time.
Tumor growth simulation
17
tions to the model developed so far. Then, in the in vivo model of a segment of the brain of a rat (Fig. 2a) we have introduced a single tumor cell which will divide according to the cell-division rules of a tumor cell. The simulation result (Fig. 2b) impressively demonstrates the spread of tumor cells at T = 120 units of time. Furthermore, it can be clearly seen in Fig. 2b that new capillaries have been formed to supply the tumor with oxygen and glucose. This process is called neovascularization. Thus, further rapid tumor growth is possible. The aim of our work is not only to predict spatial tumor growth but also to simulate and to optimize different kinds of tumor treatment (surgery, radiation and chemotherapy). Thus, algorithms describin^cancer treatment had to be developed [ 8 ], for example by introducing a "Linear Quadratic Model" for computing the number of lethally hit tumor cells as a function of radiation dose rate. In this way it is possible to test different clinical treatment schemes (standard and nonstandard schedules) on in vitro tumor spheroids Fig. 3a. Cross-section of an irradiated tumor spheroid at T by computer experiments. Fig. 3a illustrates the slice = 350 units of time. (Symbols: ® = N Phase, O = GO Phase, of a tumor spheroid which has been irradiated. A com* = M Phase, <* = Gl, S and G2 Phases.) parison between Fig. lb and Fig. 3a shows that radiation mainly has killed the proliferating tumor cells of because radiation therapy and chemotherapeutic drugs the outer margin of the tumor spheroid. Furthermore, if we apply clinical treatment schedare killing tumor cells only during distinct cell-cycle phases. Therefore, Fig. lb indicates the actual cell-cycle ules of radiation therapy to in vitro tumor spheroids, phase in which each tumor cell is residing. It should computer simulation may also give an answer to critical be stressed that in our computer model the reference questions concerning optimal treatment schemes such input signal in terms of control theory is the constant as: Is a multifractionated irradiation (Fig. 3b) more thickness of the outside proliferating margin of the tu- effective than a radiation treatment with one high single mor spheroid, which is in balance with the necrotic dose per week? This work is being done in [ 8 ]. It leads to the surprising preliminary result that in both cases, cells of the inner area of the spheroid (see Fig. lb). To get results closer to the biological reality (in vivo), with the same overall dose after five weeks, the number the nutrient medium of the in vitro model was sub- of tumor cells has decreased to about the same level. In the long run, the objective of our approach is to stituted by a capillary network. For this purpose we have simulated the formation of blood vessels during optimize treatment strategies and schedules in vitro the evolution of a tissue segment of a normal brain of and in vivo by computer simulation prior to clinical a rate[7] by additionally introducing transport equa- therapy. NUMBER OF TUMOR CELLS
10000
8000
6000
1
4000
1
2000
0 I I r n 0
48
I I I I I I I I '"I "1 "'I "'I "'I I I '"I '"I '"I '"I '"I I I "'i '"I '"i '"I '"i I I '"I '"i '"I '"i '"I I ^
96 144 192 240 288 336 384 432 480 528'576 524 672 720 768 816 864 912 960 TIME/h
Fig. 3b, Number of tumor cells of a multifractionated radiation treatment of a tumor spheroid.
18
WERNER DOCHTING
REFERENCE S 1. M. Gardner, On cellular automata , self-reproduction , the Garden of Eden and the game life. Scientific American 224, 112-117(1971) . 2. I. F. Tannock and R. P. Hill (Eds.), The Basic Science of Oncology, Pergamo n Press, New York (1987). 3. W. Diichting, Krebs, ein instabiler Regelkreis, Versuch einer Systemanalyse . Kybernetik 5, 70-77 (1968). 4. W. Diichting, Computer simulation of abnormal erythropoiesis—a n example of cell-revewal regulating systems . Biomed. Technik 21, 34-43 (1976). 5. W. Duchting, Computer models applied to cancer re-
search. In Modeling and Control ofSystems, A. Blaquiere (Ed.), Springer-Verlag , Berlin, 397-411 (1989). 6. W. Duchting, Recent progress in modeling and simulation of three-dimensiona l tumor growth and treatment. J?/osystems\%,19-9\ (1985). 7. T. Vogelsaenger , Modellbildung und Simulation von Regelungsmechanisme n wachsende r BlutgefaGstrukture n in normalen Geweben und malignen Tumoren, Dissertation Siegen(1986) . 8. W. Duchting, R. Lehrig, G. Radermacher , and W. Ulmer, Computer simulation of clinical irradiation scheme s applied to in-vitro tumor spheroids . Strahlentherapie und Onkologie 165, 873-878 (1989).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
19 Chaos and Graphics
COMPUTER SIMULATION OF THE MORPHOLOGY AND DEVELOPMENT OF SEVERAL SPECIES OF SEAWEED USING LINDENMAYE R SYSTEMS JOHN D . CORBIT and DAVI D J. GARBARY
Departmen t of Biology, St. Francis Xavier University, Antigonish, Nova Scotia, Canada , B2G ICO Abstract—Lindenmaye r systems (L-systems ) are used to model the structure and developmen t of severa l species of seaweed . The agreemen t between the images produced by the models and the actual plants is very good. Two species exhibit the fractal property of self-similarity to at least four levels of recursion. The m is noted. possibiHty of a relation between the L-systems coding and the biological coding mechanis 1. INTRODUCTION
L-systems, named for their originator, Astrid Lindenmayer [ 1, 2 ], are string rewriting systems with a graphical interpretation. Each L-system consists of an axiom and a set of production rules. On each iteration the production rules are applied to all of the character s in the starting string. Simple bracketed OL-systems are used here. Such systems use of the following set of symbols: F, f, +, —, [, and ]. The graphical interpretation of these symbols results in movements of a LOGO-like turtle in the plane. Thus, " F" gives a forward movement of 1 unit with pen down, "f" is a forward movement of 1 unit without drawing, " + " is a turn to the left by a preset angle increment, " - " is a right turn by the angle increment, " [" is push the current state of the turtle to a pushdown stack, and " ] " is pop a turtle state up from the stack. A formal mathematica l definition of L-systems and a classification of different types of Lsystems are given in the literature[ 1, 2, 3, 4]. The Lsystems algorithm is available both as detailed pseudocode [ 5 ] and as a complete L-systems program written in the C language [ 3 ]. L-systems, i.e., an axiom and a set of production rules, provide an elegant shorthand way to capture the rules embodied in various structures . They have been used to model numerous geometric fractal types and a variety of plants [ 1, 2, 3, 4, 6 ]. In this paper we use L-systems to model the morphology and developmen t of several species of seawee d in the Division Rhodophyta (red algae). We chose the red algal genus, Antithamnion, becaus e species in this group are filamentous,i.e., they consist of strings of cells. Different species within this genus are character ised by different branching patterns. The advantag e of using filamentousplants is that the symbol " F" of the L-system is identified with a single cell of the plant. Here we analyse the branching patterns and write Lsystems for three species of Antithamnion. These Lsystems successfull y capture not only the adult forms of these plants, but also their ontogeny.
change of name to A. densum], and A. tenuissimum (Hauck) Schiffner[l 1], were analysed to identify the distinctive features of their structures . The structures were coded as L-systems. The data, i.e., angles (5), axiom (co), and production rules {pi, Pi, - - -, Pn) for each system, were entered into an L-systems computer program. The program was run for successiv e iterations and the resulting images were displayed on the computer screen. The computer was an Apple Macintosh II. The software was a program called L-System' written by Paul Bourke of the Architecture School, University of Auckland, Auckland, New Zealand. This program has a very convenient user interface. It implements contextfree bracketed L-systems, context-sensitiv e L-systems, and stochastic L-systems. Simple bracketed L-systems were used here. 3. RESULTS AND DISCUSSION
2. METHOD
The L-systems for three plants are presente d in Table 1. For each plant the data in the table consist of (1) the angle increment (6 in degrees ) equated with the symbols " + " and "—," (2) the axiom (co), which is the initial state of the system, and (3) the list of production rules (pi, P2, •'', Pn)- For clarity blocks of rules that are involved in the same structural or functional component s of the plant are set off by headings inserted in the table. The structural component s are the main axis, left and right branches , branchlets , and the functional component s are cell elongation and delayed cell elongation. In writing the L-systems individual cells of the coded plants were separate d by the symbol "f" The resulting in white "space" separation s between cells made it possible to easily distinguish single cells in the graphic images. Such "spaces " correspond to the presenc e of translucen t cell walls between adjacent pigmented cells. Images resulting from these L-systems are shown in Figs. 1,2, and 3. These images are in good visual agreement with published photograph s and drawings of the three plants that they represent , Antithamnion pterocladellum[l], Antithamnion densum[S, 9 both as A. defectum], and Antithamnion tenuissimum[\\].
Published photograph s and drawings of three species o^Antithamnion, A.pterocladellum Norris[1],A. densum (Suhr) Howe [8, 9 as ^. defectum; see [10] for
' The program, L-System, is available from Intellimation, P.O. Box 1530, Santa Barbara, CA 93116.
Reprintedfrom Comput. & Graphics Vol. 17, No. 1, pag. 85-88, 1993
20
JOHN D . CORBIT and DAVI D J. GARBARY
Table 1. L-Systems for three species of seawee d {Antihamnion). A.
A.
pterocladellum
densum
A.
tenuissimum
k 10"
k 12°
6:20°
Main axis oo: abF p ,: a - • FFf
Main axis co: a bF Pi: a - * Ff
Main axis (o: abF A : a - » - Ff P2: b - ^ c P3: c - • F F F Q [ + + + + A ][ —IjFFf d IJFFfe A : d -^ + F F F Q [ + + + + A ] [— Ps. e-»• F F F Q [ + + + + A ][ —IlFFf g p^: g -> - 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
tv ^ ^ ^
/ <» // // ///>'
\ \ \ ^--<« I ^^ X.
^C'A
"---^J
N
» ' I 'AC
N VN \ \
N N
*
f t f O
I I I
^Jc C^\ N N \
Xv ^ ^ ^ ^^ ^ vN N N N N
1^^
photograoh of a specimen of ^. tenuissimum (Fig. 5) with the computer simulation of ^4. tenuissimum shows that the visual agreemen t is quite good. A similar degree of agreemen t is obtained when comparing the simulations to the actual structures of the other two species studied here, A. pterocladellum and A. densum. The simulations presente d here are not merely simulations of the overall appearanc e of a given plant. Instead, as illustrated in Fig. 4, these L-systems simulate the actual developmenta l sequenc e whereby the plant, beginning from an initial apical cell, through a series of iterations with cell divisions, becomes the maturing plant. A fractal plant model, namely, one with recursive calls to an alias of the apical cell of the main axis, gives images that agree very well with the structure of specimens of the real plants. Therefore, to this extent the fractal property of self-similarity has been demonstrated in two species of real plants. Finally, it is of interest to speculate whether or not a correspondenc e exists between the production rules of the L-systems and actual developmenta l control mechanism s operating at the cellular level in these species of red algae.
"
////<, / / / /^^ / / / />*"
tv ^ ^ ^ I/ /! >/'>- - '" '
/ / 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 -
+ hrm)P
-OVrnik^
dVs
" 9 1 ^ ^ ^
Psf
(1)
Ifk^zJr
/
(2)
- _- = 1 - Ok^Zi - Zi
dx dy
1
/ p f C pf
pCpTc
(3)
V ^in N
Pf /
\
pCp^in
[MW]^
2. UNCONTROLLED SYSTEM
Consider a practical example of a chaotic system from chemical engineering, namely the solution polymerization of vinyl acetate in a full-scale industrial reactor. Vinyl acetate monomer, dissolved in solvent and in the presence of an initiator.
oc(UA) , pCpqir
(y-
, yamh) -
(4)
P = ^ Author for correspondence . Reprinted from Comput. & Graphics Vol. 19, No. S, pag. 455-466, 1995
Ohi ,^ , , ^ j.rr. (^mVm + ^ X s) pC^VT,
Ifkdzjf: kt
(5)
36
H. Qammar and A. Venkatesan
i
J
1^
Pp
Pm
PidTj-
(6)
Also included is the concentration of free-radicals, P, and the change in the volumetric flow rates between the feed, ^in, and the reactor output, ^out, because of the density changes resulting from the polymerization reaction. The temperature dependence for some of the model parameters are listed in Table 1. In the interest of brevity and because we assume most readers will be unfamiliar with even the standard chemical engineering notation we will omit a discussion of the specific terms in this system. Details about the model can be found in ref. [9]. Teymour and Ray uncovered a wide variety of nonlinear behavior exhibited by this model including Table 1. Temperature dependent model parameters Kinetic parameters kp = 4.899 X 10^ e^ Mrm •
:1.42x 10-2e^A:p
Physical properties p ^ = 0.9584-1.3276 X IQ-^T p, = 1.211-8.496 X 10-^ r 74.12 ^^ "60.21+0.116(r+273) CP = 0.3453 + 9.55 x IQ-^T- 25)
multiplicity, period-doubling, and chaos. We are interested in one scenario where chaos and a stable steady state coexist. (This multipHcity depends on starting the reactor with polymer in it; an impractical but physically possible condition.) All of the reactor conditions are as stated in refs [9-11] unless otherwise noted. The uncontrolled system was integrated using LSODA [12] with a step-size of 0.05 time units. An example of the multiphcity is shown in Fig. 1 and the basin boundary is given in Fig. 2(a). Note that in this case the boundary appears to be smooth. 3. CONTROLLED SYSTEM
The role of the controller is simply to force the reactor to operate at the stable steady state for the uncontrolled system, i.e. y* = Fss- We have chosen this control objective because our purpose is to show the effect on the system manifolds when a small change, such as adding a controller, is made to the dynamical system. Note for all points starting in the basin of the steady state, if we do nothing (i.e. no control) the reactor will eventually go to the desired temperature, y*. We designed a simple proportional feedback controller (Eq. 7) which measures the error between the actual reactor temperature, y, and the desired temperature, y*, and manipulates the temperature of the feed, yr.
yr=yr
+ Kc{y-
•
/
)
•
(V)
The value for the controller parameter, Ac, also called the proportional gain, can be chosen to optimize the controller performance. When Kc is non-zero we have a new dynamical system with the same state-space dimension but different non-
100
Fig. 1. Co-existing chaotic attractor and stable steady state for system of Eqs (l)-(6).
37
Manifolds and control of chaotic systems (b) 1.05
0.25 0.3 MONOMER FRACTION
0.35
1.01
0.2
(c)
< cc 1.03 UJ " ' ^ ^
a.
LU 1.02
0.35
(d)
1.05
Sl.04
0.25 0.3 MONOMER FRACTION
1.04
* •• r*i:i*':li:
I
iiitii.iatlti.t* it.iiitititt 2.1. • • *a
lllif
**'
•i; ti.....
PMliiil!!i!l|
J"::: •:!Hi«ili
1.01 u-l—•« ti ts t Hl"il 0.2 0.25 0.3 0.35 0.25 0.3 0.35 MONOMER FRACTION MONOMER FRACTION Fig. 2. Effect offcpon basin of attraction for steady state. Initial conditions: zi = 1.0 and Vs = 0.6. Steady state: v„, = 0.331, y = 1.019. (a) IQ = 0.0, (b) Kc = 0.5, (c) ^ = 1.5, (d) Ac = 2.0.
Fig. 3. Convergence time to steady state in uncontrolled system.
38
H. Qammar and A. Venkatesan Table 2. M-file for displaying convergence linearities from the system defined by Eqs (l)-(6)- In times using MATLAB this paper we view Ac as a measure of how much we clear are changing the underlying dynamical system. nn=fopen('lorbas.dat') Figure 2 shows the basin of attraction for the a=fscanf (nn, '%g %g %g%g', [4,inf ] ) ; stable steady state for four values of Ac. For Ac = 0.5 fclose(nn); t=a(l,:); we have enhanced the region of successful control yl=a(2,:); since some of the points originally in the chaos basin y2=a(3,:); y3=a(4,:); are now attracted to the desired steady state. As we x=2:0.1:12.; increase Ac, and thus increase the amount of change y=2:0.2:12.; to the underlying system, some points which were ll=length(t); fori=l:ll originally in the steady state basin are no longer in=(yl(i)-2.)/0.1+l; stable. We believe all of these points lead to chaos n=(y2(i)-2,)/0.1+l; based on numerous simulations. Note that the basin time(m.n)=t(i); end boundary between the stable steady state and the pause chaotic attractor is no longer smooth and may be s=[120 45] ; exhibiting a fractal nature typical of chaotic systems. surfl(y,x,timers) shading interp ; One explanation for this change in the boundary is colormap copper; that the homoclinic tangle associated with the chaotic axis ([2,0 12, 0. 15. 20 80]) attractors is now very close to the stable steady state. view(15,30); xlabel 'X'; For each of the initial conditions in Fig. 2(a) we ylabel 'Y': calculated the amount of time needed to reach the zlabel ' CONVERGENCE TIME ' ; title 'CONVERGENCE TIME FORLORENZ SYSTEM' steady state to within 0.1%. The convergence times set(get(gca,'Title'),'FontName', are plotted using MATLAB version 4.2 on a 'Palatino','FontWeight','bold', SPARCstation and are shown in Fig. 3. An example 'FontSize',14) end of the MATLAB graphics code is given in Table 2. Points not in the steady state basin are shown as zero convergence time. The 3-D view depicts a curved, smooth manifold of the stable steady state which of the initial condition. For the case when Ac = 2.0 we can see that for only a very small region near the causes the abrupt, crevice-like shape in Fig. 3. Figure 4 shows the convergence times to the steady steady state would a linear approximation be valid. state for the same initial conditions as in Fig. 3 for The manifolds associated with the steady state of Fig. three values of Ac. The viewpoint differs from Fig. 3 4(c) must be highly nonlinear and bear httle so that we can more clearly visualize the changes to resemblance to those yielding the structure seen in the manifold. For small values of Ac, for example Fig. 3. Ac = 0.5, there is less modification of the underlying dynamical system and the stable manifold is quite 4. CONCLUSIONS obvious. As Ac increases, and thus the magnitude of In this paper we have tried to show some of the the feedback increases, the manifold is less obvious difficulties of designing effective and robust controland the convergence time is a complicated function lers for chaotic systems. When a controller is designed
1,04
0.2
TEMPERATURE Fig. 4. (a)—legend opposite.
MONOMER FRACTION
Manifolds and control of chaotic systems
39
Fig. 4. Convergence time to steady state in the controlled system, (a) Kc = 0.5, (b) Ac = 15, (c) Kc = 2.0.
Fig. 5. Schematic of some of the manifolds in the Lorenz system.
so that a chaotic signal is fed back, the result may be fractal basins and highly nonlinear manifolds for the desired stable reference state [2]. Perhaps the ideal controller would be one that modifies the chaotic system by causing a crisis. In this case a stable manifold of the reference state would intersect with the chaotic attractor causing any trajectory on the attractor to quickly converge to the desired state. In this work a manifold associated with a stable steady state was highlighted by using a convergence time plot. We feel that such plots may be very useful in introducing the concept of manifolds to students. Consider a schematic of the manifolds (Fig. 5) associated with the three steady states of the Lorenz system when (7=10.0, 6 = 8/3 and r = 20 [13].
40
H. Qammar and A. Venkatesa n
Fig. 6. Convergenc e time showing a stable manifold for a steady state in the Lorenz system.
Figure 6 shows a convergence time plot for one of the symmetric stable steady states which more clearly shows the fast spiral nature of the manifold. REFERENCES
1. E. Ott, C. Grebogi, and J. A. York, Controlling chaos. Phys. Rev. Lett. 64, 1196-1199 (1990). 2. H. Qammar, F. Mossayebi, and T. Hartley, Indirect adaptive control of a chaotic system. Chem. Engng Commun. 110, 99 (1991). 3. B. Peng, V. Petrov, and K. Showalter, Controlling chemical chaos. J. Phys. Chem. 95, 4957-4959 (1991). 4. G. Chen and X. Dong, From chaos to order— perspective s and methodologie s in controlling chaotic nonlinear dynamical systems . Int. J. Bif. Chaos^ in press (1995). 5. K. Pyragas and A. Tamasevicius , Experimenta l control of chaos by delayed self-controlling feedback. Phys. Lett. A 180, 99-102 (1993).
6. P. Parmananda , P. Sherard, R. W. Rollins, and H. D. Dewald, Control of chaos in an electrochemica l cell. Phys. Rev. EAly R3003-3006 (1993). 7. T. Kapitaniak, L. J. Kocarev, and L. O. Chua, Controlling chaos without feedback and control signals. Int. J. Big. Chaos 3, 459-468 (1993). 8. Y. Liu and J. R. Rios Leite, Control of Lorenz chaos. Phys. Lett. A 185, 35-37 (1994). 9. F. Teymour, Ph.D. Dissertation, University of Wisconsin (1989). 10. F. Teymour and W. H. Ray, The dynamic behavior of continuous solution polymerization reactors—IV. Chem. Engng Sci. 44, 1967-1982 (1989). 11. F. Teymour and W. H. Ray, The dynamic behavior of continuous solution polymerization reactions—^VI. Chem. Engng Sci. 41, 4133-4140 (1992). 12. L. Petzold, Automatic selection of methods for solving stiff and nonstiff systems of ordinary differential equation. SI AM J. Sci. Stat. Comput. 4,136-148 (1983). 13. E. N. Lorenz, Deterministic nonperiodic flow. J. Atmos. Sci. 20, 130-141 (1963).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
41 Chaos and Graphics
A VACATION ON MARS—AN ARTIST'S JOURNEY IN A COMPUTER GRAPHICS WORLD CLIFFORD A. PICKOVER
IBM Thomas J. Watson Researc h Center, Visualization Systems Group, Yorktown Heights, NY 10598 Abstract—This note provides severa l artistic examples of landscape s produced on a graphics supercomputer . d using lighting and shading facilities The shape s were created using a single graphics primitive, and rendere d graphics standard . In order to encourag e reader of 3-D extension s to X-windows and the PHIGS+ propose involvement, this informal article also provides severa l simple numerical recipes for computing the forms in the paper. The heaven s call to you, and circle about you, displaying to you their eternal splendors , and your eye gazes only to earth. Dante 1. INTRODUCTION
The idea that nature and mathematic s are inextricably linked is not new—and neither is the application of that idea in computer graphics. What is new is the use of rich software tools and powerful new hardware to visualize artistic and mathematica l models of nature. The purpose of this paper is threefold: (a) to present a gallery of artistically interesting landscape s resembhn g extraterrestria l terrain, (b) to emphasiz e the role of simple graphical primitives and the simplest of C-coded algorithms in generating complicated aesthetic structures, and (c) to indicate the degree to which such studies are facilitated with the emergenc e of a new class of graphics supercomputers . Reader involvement is encourage d by giving numerical recipes for the various forms. Informally speaking, the landscape s in this paper are fractals—rough-edge d objects which continue to exhibit structural details upon increasing magnification. These complicated objects have been studiedextensively by B. Mandelbrot, who coined the word "fractal" (in 1975) to describe such irregular shapes , and who originated the idea of fractal landscape s in computer graphics[l, 2]. Various methods have been used in the past to generate terrain, and many of these methods have used Brownian (or Brownian-like) noise functions (described later) to create an irregular surface. In order to generate these noisy surfaces , the methods sometimes involve the addition of randomly placed and randomly oriented faults in a plane, or the use of fast Fourier transform filtering, or the displacement of points on a grid (for a review see [3]). The reader is directed to The Fractal Geometry ofNature[ 1 ] and reference [ 2 ] for details of this work in "Brownian and fractional Brownian surfaces, " and more information on fractals. Voss[3, 4] used fractal concepts to create very convincing forgeries of natures.New terrain synthesis methods have since been proposed by Musgrave [ 5 ], Fouriner [ 6 ], and Lewis [ 7 ]. These and other experiments provide continuing incentive for more researc h on the rapid generation of natural and
artistic landscapes . For readers interested in additional background material in this area, a directed reading fist is provided in the Reference section [8-14]. The method I have used involves the circular disks which are randomly moved on a plane in order to approximate a Brownian surface. I have not seen this approach published in the scientific literature, but considering the simplicity of the method, I expect others have used similar techniques . The main purpose is to show the reader how to create pretty landscape s using simple methods. Although the approach here sacrifices both the mathematica l purity and graphic detail of traditional fractals, the process is conceptually simple and easy to implement—an d attractive pictures result. 2. NUMERICAL COMPUTATION
The algorithms and hardware described in this article permit the entire computation and full graphics rendering of artistically interesting terrains in approximately 1 to 2 minutes using a Stellar GSIOOO computer. The terrains shown in the figures were generate d using a Brownian distribution of filled circles. To produce this distribution, have your computer take a circular disk of height 1 unit and randomly walk the disk over a plane. Have the moving circle leave behind an irregular trail of circles. After the walk continues for a long time, a bumpy pile of disks finally result. The mountains were generate d by viewing (with the aid of a graphics supercomputer ) the "bumpy pile" from an angle specified by the user. Red lights were used to illuminate the terrain. Of course, most readers will not have access to a graphics supercomputer , but even if sophisticate d graphics computers are unavailable, the resulting Brownian intensity profiles look quite marvelous if the pile height is represente d as color in a 2-D representation . A C program (Table 1) was written which computes a Brownian distribution of filled circular disks, sums the intensities, and writes an image array to a file on disk. The circle radius was 25, and the array size was 512X512. The Brownian walk step-size was 2, giving a large overlap between successiv e circles. Notice that since a constant radius of 25 was used for the circle size, these landscape s will not show detail at small size scales. However, the simple numerical methods used
Reprintedfrom Comput. & Graphics Vol. 16, No. 1, pag. 9-13, 1992
42
CLIFFORD A. PICKOVER
Table 1. C code to generate raw data for landscapes. ysq = SQR ((float) j - centery); if ((xsq + ysq) < = radius sq) screen [i][j] = screen [i][j] + lift;
#include <Jstdio.h) #include (fcntl.h) #define SQR(x) ((x)*(x)); #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b))
} }
\ /* k repetition loop */ char ProgramName[128]; mainO { int screen[512][512]; char PixelData [1048576]; /* 512*512*4 */ char filename [128]; int seed = 12345; int 1, i, j, k, m, stat; long ii; int width, height; int botx, boty, topx, topy; float scale, lift, xsq, ysq, sumx, centerx, sumy, centery, radius, radius sq; int numiter, maxpix, fd, div; float stepx, stepy; int iseed; float ran2 (); width = 512; height = 512; srand (3234569); strcpy (FrogramName, "circleg"); /* Initialize Image Array for(i = 0;i<512;i++){ for(j = 0;j<512;j++){ screen [i][j] = 0;
*/
} }
/*-- Input and Initialize Several Parameters --*/ lift = 1; centerx = 250; centery = 250; printf ("number of iterations (e.g. 1000)"); scanf ("%d", &numiter); printf ("radius (e.g. 20) "); scanf ("%r', &radius); radius sq = radius*radius; printf (*'%d %f\n'*, numiter, radius); /* Main Loop */ for (k = 1; k < = numiter; k++) { /* CaU Random Number Generator */ stepx = (float) rand()/32767.; if (stepx > .5) stepx = 2; else stepx = - 2 ; stepy = (float) rand()/32767.; if (stepy > .5) stepy = 2; else stepy = - 2 ; /* Move the Circle */ centerx = centerx + stepx; centery = centery + stepy; /* Reset Position */ if (centerx > = 512.) centerx = 250.; if (centery > = 512.) centery = 250.; if (centerx < = 0.) centerx = 250.; if (centery < = 0.) centery = 250.; botx = max( 1, centerx - radius); topx = min(512, centerx + radius); boty = max( 1, centery - radius); topy = min(512, centery + radius); /* Fin in Circles --*/ for (i = botx; i < = topx; i++) { for (j = boty; j < = topy; j++) { xsq = SQR ((float) i - centerx);
/*
Find Maximum Intensity and Scale -V maxpix = -10000; for(i = 0;i<512;i++){ for(j = 0;j<512;j++){ if (screen [i][j] > maxpix) maxpix = screen [i][j]; scale = 100./(float) maxpix; printf ("%d\n", maxpix); for(i = 0;i<512;i++){ for(j = 0 ; j < 5 l 2 ; j + + ) { screen [i][j] = screen [i][j]*scale; }
/* Dump an Image to Disk */ /* Each Pixel is Represented as a Character-*/ /*Here, the output file happens to repeat each /•intensity value 4 times for later graphics routines, but the user may create any format at this point which is useful.
*/ printf ("before image conversion\n"); /•Convert from integer to char*/ k = 0; for(i = 0;i<5l2;i+-l-){ for(j = 0 ; j < 5 1 2 ; j + + ) { for (m = 0; m < = 3; m++){ PixelData[k] = (char) screen [i][j]; k = k + 1; } } } printf ("after image converstion\n"); /* Open Output File and Write */ strcpy (filename, "fractal"); printf ("opening file\n"); fd = open (filename, 0_WRONLY | 0__CREAT, 0666); if (fd == - 1 ) die ("can't open output file"); printf ("%d", width); printf ("%d", height); stat = write (fd, &width, sizeof (width)); if (stat != sizeof (width)) die ("bad write: width"); stat = write (fd, &height, sizeof (height)); if (stat != sizeof (height)) die ("bad write: height"); stat = write (fd, PixelData, width*height*sizeof (unsigned long)); fprintf (stderr, "%s: Finished writing %s (%d x %d)/n" ProgramName, filename, width, height); close (fd); }/*end of main*/ die (mess) char *mess; { fprintf (stderr, "%s error: %s\nexiting\n", ProgramName, mess); exit(l); }
A vacation on Mars
43
Table 2. Computation time (seconds ) for various coriiputing machines . CPU AIX 370 on IBM 3090 Stellar GSIOOO with vector optimization Silicon Graphics IRIS 4D/120GTX, optimization 3 Silicon Graphics IRIS 4D/120GTX, optimization 0 SUN4/280 SUN4/110 Diskless Stellar GSIOOO, optimization 0 AT&T 6386e with Weitak 1167 coprocessor IBM 4381 AT&T 6386e without Weitak 1167 coprocessor
Elapsed
(2, (5,
11) 7)
(8,
13)
(13, (13, (17, (29,
18) 29) 28) 32)
(31, (62,
43) 105)
(122,
131).
Table 2 lists approximate computer times (CPU time, elapse d time), in seconds . Some of the systems , such as AIX 370, had multiple users which affects the elapse d time number. in this paper are not intended to create realistic models of earthly terrain, which have been rendered so skillfully in the past[l], but to teach the reader about a simple means for generating artistically interesting panoramas . It would be scientifically interesting to identify the computationa l efficiently of this technique relative to others, but this is beyond the scope of this article. The mountains were generate d by viewing the accumulated intensity profile from an angle specified by the user. This graphical process is described in the next section. For each scene,approximately 35,000 circular disks were used. (As an interesting aside, it was relatively easy to detect certain bad random number generators by observing the mountain shapes. ) Atmo-
Fig. 2. A snapsho t taken somewher e between the polar regions (Fig. I) and the warmer regions (Fig. 3).
spheric effects were generate d by using a Gaussia n random distribution of circular disks. To create this distribution, simply sum about 10 random numbers and divide the sum by 10. Do this twice to obtain an Xand y position for a circle of height 1 unit. As with the random-walk methods for the mountains, sum the accumulate d intensities of the circles, but instead of viewing the profile from the side, view it from above. By coloring the intensity distribution with interesting color lookup tables, a variety of artistic atmospheri c effects can be achieved. Ogden[9] mentions the use of circle summation for simulating natural looking clouds.
n sky. The mountains' , Fig. 3. Terrain with deformed Gaussia Fig. 1. Like Mars, this imaginary planet is a scarred landscape with beautiful white winter polar regions. The sky is produced rust color is achieved by shining two reddish lights upon the surface. using a Gaussia n distribution of circular disks.
44
CLIFFORD A. PICKOVER
Fig. 4. Terrain with red, hazy atmosphere.
It is interesting to compare the performance of this numerically intensive graphics computation across various computing machines. The C program in Table 1 may be representative of many realistic texture generators which are based on statistical processes (for example, see [15]). Such programs would have both numerically intensive computation and image output. Table 2 is a list of approximate computer times for various computing machines tested. One thousand circles were used for this test. Note that the C-program does no graphic rendering, but simply creates a 3-D Brownian profile, which can subsequently be rendered. 3. GRAPHICS COMPUTATION
Interestingly, only a single graphic primitive was used for the foreground terrain in each figure, namely a "polytriangle" {i.e., n shaded triangular facets at specified 3-D coordinates). The polytriangle is one of several 3-D primitives in the extended X-windows and PHIGS+ standard provided by the Stellar GSIOOO graphics supercomputer, f PHIGS+, itself, is an extension to the PHIGSt graphics standard (ISO 9592), and it addresses the lighting and shading of three-dimensional data[16]. The position of each of the triangular facets is determined by the height of the circular
Fig. 5. View of a nearby planet. To produce the planet, a white distribution of circular disks is mapped to the surface of a sphere, and an orange-red color lookup table is used.
disk profile, and the facets are Gouraud shaded to produce the final, smooth shaded structure. Lighting of the shapes in the figures was applied on a primitive by primitive basis; that is, no interactions between objects such as shadows or reflections were defined. The reflectance calculation is conceptually applied at points on the facet being lit and shaded, and produces color at these points. Input to the reflectance calculation includes the position on the primitive at which the reflectance equation is being applied, the reflectance normal, diffuse color at that position, the set of light source representations, and the eye point (see, for example, [17]). For the figures, two lights were used. Light colors and directions are specified in
t Stellar and GSIOOO are trademarks of Stardent Computer Inc., 521 Virginia Road, Concord, MA. The Stellar machine contains four high-speedfloating'-pointengines configured to work separately or in tandem. The rendering processor performs special computations such as per-pixel arithmetic for hidden-surface elimination, depth-cueing, and shading. The floating point performance is 40 MFLOPS, single or double precision. The polygon rendering rate is 150K Gouraud shaded, Z-buffered triangles per second. Since this article was written, the terrain software also runs on an IBM RISC System/ 6000 using the GL graphics language. X PHIGS (the Programmer's Hierarchical Interactive Graphics System) goes beyond the older CORE and GKS standards to provide 3-D primitives such as polyline and fill Fig. 6. Terrain with texture-mapped water and deformed Gaussian sky. area, as well as hierarchical data structures.
45
A vacation on Mars a convenient input file, and the terrain can be magnified, rotated, and translated in real-time. The resolution of the triangular mesh which makes up the terrain can be changed interactively. Background atmospheric effects were added by merging the terrain image with a background image using IBM's software package lAX (see SB 11-8415, "The IBM Image Access executive—Program Description and Operations Manual"). If desired, specular reflections can be used to produce highlights on shiny surfaces. As is traditional, the intensity of specular reflections, unlike diffuse reflections, is highly dependant on the viewing angle of the observer. The specular exponent [17] used to control the shininess was about 10. 4. GRAPHICS GALLERY
Perhaps an angel of the Lord surveyed an endless sea of chaos, then troubled it gently with his finger. In this tiny and temporary swirl of equations, our cosmos took shape. Martin Gardner Like Mars, this imaginary planet is a scarred landscape, with beautiful white winter polar regions (Fig. 1). The pigment that gives Mars its rust-red hue is actually rust or iron oxide. The rust color in Fig. 2 was achieved by shining two reddish lights with (red, green, blue) mixture of about (1, .1, .1) and (1, .2, .2). On a scale from 0 to 1, the ambient, diffuse, and specular lights' intensities were about 0.2, 0.7, and 0.5, respectively. The Gaussian skys in Figs. 1-4 are identical except for different color lookup tables and stretching deformations. In Fig. 5, a white distribution of circular discs is mapped to the surface of a sphere, and an orange-red color lookup table is used. Figure 6 shows the same sky as in Figs. 3 and 4 using a different color look-up-table. 5. SUMMARY
It is indeed fascinating that complicated and artistic mountainscapes can be fully computed and rendered in under 2 minutes using the new class of graphics supercomputers which have become readily available in 1989. This new breed of computer can typically plot much more than 50,000 shaded triangular facets in a second. (For a review of such kinds of computers, see [19]). This speed may make such hardware and software systems of interest to both artists and computer graphics scientists. A variety of artistic effects can be achieved by adjusting the circle radius, using a changing circle radius, and using a different number of circles. Even if sophisticated graphics computers are unavailable, the resulting Brownian intensity profiles produced
by the C code can be used to create a variety of graphically interesting textures [ 18 ] . A report such as this can only be viewed as introductory; however, it is hoped that the techniques, equations, and systems will provide useful tools and stimulate future studies in the graphic characterization of morphologically rich landscapes produced by the simplest of generating formulas. REFERENCES
1. B. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, San Francisco (1982). 2. B. Mandelbrot, Stochastic models for the earth's relief, the shape and the fractal dimension of coastlines, and the number-area rule for islands. Proc. Natl. Acad. Sci. 72, 3825-3828(1975). 3. R. Voss, Fractals in nature: from characterization to simulation. In The Science of Fractal Images, H. Peitgen, and D. Saupe (Eds.). Springer-Verlag, New York (1988). 4. R. Voss, Random fractal forgeries. In Fundamental Algorithms in Computer Graphics, R. Earnsha w (Ed.), Springer-Verlag, Berlin, 30-45 (1985). 5. K. Musgrave, The synthesis and rendering of eroded fractal terrains. Computer Graphics (ACM-SIGGRAPH) 23(3), 41-50 (July 1989). 6. A. Foamier, D. Fussel, and L. Carpenter, Computer rendering of stochastic models. Commun. ACM 25, 371378(1982). 7. J. Lewis, Generalized stochastic subdivision. ACM Trans. Graph. 6(3), 167-190 (July 1987). 8. D. Saupe, Algorithms for random fractals. In The Science of Fractal Images, H. Peitgen, and D. Saupe (Eds.). Springer-Verlag, New York, 71-113 (1988). 9. J. Ogden, E. Adelson, J. Bergen, and P. Burt, Pyramidbased computer graphics. RCA Engineer 30(5), 4-15 (Sept./Oct. 1985). (Describes the synthesis of clouds, galaxies, waves, and woodgrains.) 10. C. Yessios, Computer drafting of stones, wood, plant and ground materials. SIGGRAPHAugust '79 Proc, Chicago 13(2), 190(1979). 11. G. Miller, The definition and rendering of terrain maps. Computer Graphics 20(4), 39-48 (1986). 12. S. Loveyjoy, and B. Mandelbrot, Fractal properties of rain, and a fractal model. Tellus 37A, 209-232 (1985). 13. A. Pentland, Fractal-based description of natural scenes. IEEE Trans. Pattern Anal. Machine Intelligence PAMl6(4), 661-674 (November 1984). 14. M. Panne, 3-D Fractals, Creative Computing, 78-81 (July 1985). 15. K. Perlin, Hypertexture. Computer Graphics {ACMSIGGRAPH) 23(3), 253-262 (July 1989). 16. A. van Dam, PHIGS+ functional description, revision 3.0. Computer Graphics {ACM SIGGRAPH), 22(3) (entire volume) (July 1988). 17. J. Foley and A. van Dam, Fundamentals of Interactive Computer Graphics, Addison-Wesley, Massachusetts (1984). 18. C. Pickover, Computers and the Imagination, St. Martin's Press, New York (1991); C. Pickover, Computers, Pattern, Chaos, and Beauty, St. Martin's Press, New York (1990). 19. See for example any recent issue of Computer Graphics World, One Technology Park Drive, POB 987, Westford MA 01886.
This Page Intentionally Left Blank
PART II ATTRACTORS
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 II. Attractors
In this section we have several fascinating demonstration s of chaotic attractors and intricate dynamical systems , by leading researcher s in the chaos field. I'm sure that the computer graphics experiments in this section were inspired by a number of researchers ' work over the past few decades . The early days of modern dynamics span half a century, starting with French mathematicia n Jules Henri Poincare and Russian mathematicia n Alexander Mikhailovich Lyapunov in the early 1900s. The geometry of chaotic dynamical systems was firmly establishe d in 1892 by Poincare in his researc h in celestial mechanics . George BirkhofF's 1932 paper on remarkable curves was one of the first papers in the mathematica l literature to discuss chaotic attractors. After undergoing a relatively quiet period, the study of dynamics was revived between 1961 and 1971, partly as a result of the increasing use of computer graphics strategies of doing mathematics . In fact, digital simulations of the properties of periodic motions in nonlinear oscillations have become increasingly important, especially since chaos in real physical systems were clearly demonstrate d in 1963 by MI T scientist Edward Lorenz, an atmospheri c scientist who proposed a simple model for atmospheri c convection that displayed unpredictable behavior. Douglas Hofstadter in his book Metamagical Themas gives a detailed and quite readable description of various problems in nonlinear iteration, bifurcation theory, and strange attractors. He also mentions some of the scientists and mathematician s who have studied, discovered , and popularized many of the important features inherent in phenomen a exhibiting bifiircating behavior. (These scientists include: Ulam, Eckmann, Myrberg, Stein, Collet, Koch, Feigenbaum , May, Ruelle, Duffing, Van der Pol, Levinson, Cartwright and Littlewood, Lorenz, Stein, Ulam, Smale, Rossler, Ueda, Shaw, and Farmer - just to name a few.) The discovery of the recursive regularity of bifiircation maps, first made by Mitchell Feigenbau m using a littl e calculator, was one of the major recent advance s in the chaos field. Readers may also be interested in a lively 1989 article by M. Hirsch titled "Chaos, Rigor, and Hype" which appeare d in the Mathematical Intelligencer. Hirsch notes that many important chaotic systems were first identified and explored not by computer simulation but by mathematica l proof, and he cites the work of Poincare, BirkhofF, Levinson, Smale, Anosov, Kolmogorov, Arnold, and Moser as examples. Students and other readers fairly new to the chaos field may want to review some of the fiindamental chaos concepts to better appreciate the papers in this section. For example, you should have some familiarity with dynamical systems which provide a deep reservoir for striking images. Dynamical systems are models containing the rules describing the way some quantity undergoe s a change through time. 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. Generally, portraits of dynamical systems track the behavior of mathematica l expression s called differential equations. Think of a differential equation as a machine that takes in values for all the variables and then generate s the new values at some later time. Just as one can track the path of a jet by the smoke path it leaves behind, computer graphics provides a way to follow paths of particles whose motion is determined by simple differential equations . The practical side of dynamical systems is that they can sometimes be used to describe the behavior of real-world things such as planetary motion, fluid flow, and engine vibration. A chaotic attractor is represente d by an unpredictable trajectory where a minute difference 49
50 in starting positions of two initially adjacent points leads to totally uncorrelate d positions later in time or in the mathematica l iteration. Predictable attractors represen t the behavior to which a system settles down or is "attracted" (for example, a point or a looping closed cycle). An example of a fixed point attractor is a mass at the end of a spring, with friction. The mass eventually arrives at an equilibrium point and stops moving. {A fixed point is a point that is invariant under the mapping (i.e., Xt =Xt+\). An invariant curve is a generalizatio n of a fixed point and is also invariant under the map or flow.) A limit cycle can be exemplified by a metronome. The metronome wil l tick-tock back and forth - its motion always periodic and regular, in contrast to a strange attractor with its irregular, unpredictable behavior. Its behavior can still be graphed, but the graph is much more complicated. With "tame" attractors, initially close points stay together as they approach the attractor. With strange attractors, initially adjacent points eventually follow widely divergent trajectories. Like leaves in a turbulent stream, it is impossible to predict where the leaves will end up given their initial positions. To best understan d the Markus and Hess paper in this section, the reader should have some familiarity with the Lyapunov exponent A that quantifies the average stability of the oscillatory modes. This exponent is a good tool for diagnosing whether or not a system is chaotic. This can be computed with the aid of a computer for data that comes from numerical simulation or from a physical experiment. As an example, this exponent is fairly easy to compute for one dimensional maps jc„+i =/(x„) . (A number of natural phenomen a can be described by onedimensional maps of this kind.) One-dimensiona l maps are characterize d by a single Lyapunov exponent which is positive for chaos, zero for a marginally stable orbit, and negative for a periodic orbit: A < 0,
the orbit is stable,
A = 0,
the orbit is neutrally stable,
A > 0,
the orbit is locally unstable and chaotic.
Any system containing at least one positive Lyapunov exponent is defined to be chaotic, with the magnitude of the exponent reflecting the time scale on which the system's dynamics become unpredictable . As an example, consider the equation Y
-
^ '
[\+Xtf' where ^ is a constant, and A is the usual bifurcation parameter . This equation has been used to fit a considerabl e amount of data on insect populations, and high-resolution bifurcation maps of this equation are presente d in my book Computers, Pattern, Chaos, and Beauty. We can compute the exponent by
A = lim — y^ In N-.00 N
^-^ n= 1
dx,n+\ AXn
X =/(A, beta).
where dx:„+i/dx:„ = A[-JC/?(1 +xy^~^ +(1 +x)~^] in this special case. You will find that for certain values of A and ji the map is chaotic with a positive exponent, while for others the map is periodic.
For Further Reading (1) Abraham, R., Shaw, C. (1985) Dynamics - The Geometry of Behavior, Part 3: Global Behavior. Aerial Press: California. (Actually, the entire book collection of Aerial Press, including the Visual Math Series, is an educationa l wonderland).
51 (2) Abraham, R., Shaw, C. (1983) Dynamics - The Geometry of Behavior, Part 2: Chaotic Behavior. Aerial Press: California. (3) Aronson, D., Chory, M., Hall, G. and McGehee, R. (1980) A discrete dynamical system with subtly wil d behavior. In New Approaches to Nonlinear Problems in Dynamics, RJ. Holmes, ed. Society for Industry and Applied Mathematics. (4) Berge, R, Pomeau , Y., Vidal, C. (1984) Order Within Chaos, Wiley: New York. (5) Campbell, D., Crutchfield, J., Farmer, D., Jen, E. (1985) Experimenta l mathematics : the role of computation in nonlinear science. Communications of the ACM. 28: 374—389. (6) Crutchfield, J., Farmer, J., Packard, N. (1986) Chaos. Scientific American. 255: 46-57. (7) Chossat , P. and Golubitsky, M. (1988) Symmetry-increasin g bifurcations of chaotic attractors. Physica D. 32, 4 2 3 ^ 2 6. (8) R. Devaney (1989) An Introduction to Chaotic Dynamical Systems. Addison-Wesley . (9) Feigenbaum , M. (1979) The universal metric properties of nonlinear transformations . Journal of Statistical Physics. 21: 669-706. (10) Feigenbaum , M. (1981) Universal behavior in nonlinear systems . Los Alamos Science. 1: 4-27. (11) Gleick, J. (1987) Chaos: Making a New Science. Viking: New York. (12) Grebogi, C, Ott, E., and Yorke, J. (1985) Chaos, strange attractors, and fractal basin boundaries in nonlinear dynamics. Science 238: 632-637. (A great overview, with definitions of terms used in the chaos literature.) (13) Grebogi, C, Ott, E., and Yorke, J. (1985) Attractors on an N-Torus: quasiperiodicity versus chaos, Physica 15D: 354-373. (Contains some gorgeous diagrams of dynamical systems). (14) Hirsch, M. (1989) Chaos, rigor, and hype, Mathematical Intelligencer 11(3): 6-9. (Pages 8 and 9 include James Gleick's respons e to the article.) (15) Moon, F. (1987) Chaotic Vibrations. John Wiley and Sons, New York. (Moon gives many practical examples of chaos in real physical systems. ) (16) Pickover, C. (1990) Computers, Pattern, Chaos and Beauty. St. Martin's Press: New York. (17) Stewart, I. (1989) Does God Play Dice? (The Mathematics of Chaos). Basil Blackwell: New York. (18) "Symmetries and Asymmetries" (1985) Mosaic Volume 16, Number 1, January/February . (An entire issue on the subject of fractals, symmetry and chaos. Mosaic is published six times a year as a source of information for scientific and educationa l communities served by the National Science Foundation, Washington DC 20550). (19) Shaw, A. (1984) The Dripping Faucet as a Model Chaotic System. Aerial Press: California.
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
53 Chaos and Graphics
AUTOMATI C GENERATION OF STRANGE ATTRACTORS J. C. SPROTT
Departmen t of Physics,University of Wisconsin, Madison, WI 53706 Abstract—A pair of coupled quadratic difference equations with randomly chosen coefficients is repeatedl y iterated by computer to produce a two-dimensiona l map. The map is tested for stability and sensitivity to initial conditions. The process is repeate d until a chaotic solution is found. In this way a computer can generate a large collection of strange attractors that are all different, and most of which have considerabl e aesthetic appeal. A simple computer program and examples of its output are provided. Many of the attractors have been systematicall y evaluate d for visual appeal, and a correlation is found with the Lyapunov exponen t and correlation dimension. 1. INTRODUCTION Art and music derive much of their aesthetic appeal from a juxtaposition of order and unpredictability. In recent years it has come to be widely understoo d that simple mathematica l equations can have solutions that, over the long term, are for all practical purposes unpredictable. And yet the simplicity of the equations ensures that the unpredictability is accompanie d by a degree of determinism and order. Such equations are said to exhibit chaos[l], and their solutions usually form a strange attractor[2]. A strange attractor is an l object of nonexample of a fractal [ 3 ], a geometrica integer dimension and structure on all size scales, although the structure in general is not self-similar. Strange attractors are thus powerful generator s of new visual new art forms[4]. A single equation with different coefficients can produce an almost endless variety of strange attractors, most of which have considerabl e beauty. Even simple personal computers can easily generate these patterns. The difficulty is that no one knows how to predict the conditions under which chaos will result, and thus the same standard examples are generally exhibited. Whereas most previous work in the production of strange attractors starts with a system known to be chaotic, this paper proposes a way for a computer to search a large class of potentially chaotic equations for visually interesting solutions. The visual appeal of the resulting patterns is shown to correlate with mathematical quantities that characteriz e the attractors,suggesting that it might be possible to refine further the automatic selection of patterns with strong visual appeal. 2. TWO-DIMENSIONAL QUADRATIC MAPS For a system to exhibit chaos, the governing equations must be nonlinear. A quadratic equation is perhaps the simplest such example. However, a single equation in a single variable has solutions that lie along segments of a curve and thus tend to be rather uninteresting. The graph of a quadratic equation is a parabola. With a pair of equations involving two variables x and y, the solutions are more interesting and are well suited for display on a computer monitor or sheet of
paper. The simplest such example is the two-dimensional quadratic map given in its most general form by Xn+\ = fli + a2Xn + a^xl + a^Xnyn + asyn + a^yl y„+i = ay ~\- UgXn + agxl + awXnyn + «iiy« + anyl The characte r of the solution is determined by the values of the twelve coefficients fli through an and the initial values XQ and yo. With some initial value of XQ and y© at « = 0, sucy cessive values of X and y are determined by repeatedl iterating the above equations . The iteratesare plotted as points on a two-dimensiona l surface. After a number of iterations, the solution will do one of four things: (a) It will converge to a single fixed point; (b) it will take on a successio n of values that eventually repeat, producing a limit cycle; (c) it will be unstable and diverge to infinity; (d) it will exhibit chaos and gradually fill in some often complicated but bounded region of the x-y plane. The visually interesting solutions are the chaotic ones. Most of these solutions are strange attractors in that a range of starting values of x and y, within the basin of attraction, yield the same eventual solution. The first few iterates should be discarded , since they almost certainly lie off the attractor. Occasionally solutions are chaotic and visually appealing but are not attractors since each pair of initial values produces a different shape.The boundary of the basin of attraction of a strange attractor may itself be a fractal. 3. SENSITIVITY TO INITIAL CONDITIONS To search automatically for chaotic solutions, it is necessar y to have a criterion for detecting chaos. One such criterion is the sensitivity to initial conditions. Imagine iterating the two-dimensiona l quadratic map described above with two initial conditions that differ by a small amount. If successiv e iterates approach a fixed point or limit cycle, the difference between the two solutions will on average grow smaller with each iteration. If the solution is unstable or chaotic, the difference will tend to grow larger with each iteration. Unstable solutions can be eliminated by discarding
Reprintedfrom Comput. & Graphics Vol. 17, No. 3, pag. 325-232, 1993
EAMTMNQQXUYGA
F = 1.27
L = 0.10
ECVQKGHQTPHTE
F = 1 . 79
w^^^^cr^"5L-^i-^''
^
j
^
L =
0 . 14
? ]':
^^9^^^^-"'-•^liJ'
(b) EFIRCDERRPVLD
37
L - 0.05
EGIIETPIQRRUL
F - 1.77
L - 0.12
EGXQSNSKEECTX
F =
1.
r>^ 1 Irs (c) EGLXOESFTTPSV
F
^^(E
{IB
(f) EILIBVPKJWGRR
(h)
Fig. 1. Examples of strange attractors produced by two-dimensiona l iterated quadratic maps.
54
1.42
"^"^ -. %
-^i^
(g)
-
^.-y
r fa
L - 0.10
ELUFBBFISGJYS
F = 1.59
/jr* •
EMCRBIPOPHTBN
F = 1.39
L - 0
F
L
^\i
^
mi -t//
'^^^7M
L - 0.18
//
(J)
(i) EMDVAIDOYHYEA
EODGQCNXODNYA
- 1,31
- 0.07
. /^ /
V^" fll? J&^^^
7/7 /1 Pw|.
WAj / - / '-^^^S^^SBHIB^^
^^m ;S
^ K J ' .^ •
\
JH^;-^' mK^/"'^
^jaig=^^' **^
¥/ (I) EUWACXDQIGKHF
EVBWNBDELYHUL
F = 1.47
i^^^Sk
*^^ :f"QP
'
W-iP^'feppn^fe
/^^ ^>l! fjh^-~~
-~
L =
F = 1.69
0.13
P^^
ZJlr^ | H ^ 7 >#
f^
^ijl (o)
(P) Fig. 1. (cont'd.)
55
L = O.IS
56
J. C. SPROTT
cases in which xory grow beyondsome arbitrary large value such as 10^. The difference between the two solutions initially grows on average at an exponentia l rate for a chaotic system. The rate of divergence is characterize d by the Lyapunov exponent [ 5 ], which can be thought of as the power of 2 by which the separatio n increase s on average for each iteration. Thus, if the separatio n doubles with each iteration, the Lyapunov exponent is 1 bit per iteration. The Lyapunov exponent can be thought of as the rate at which information about the initial condition is lost, or, equivalently, the rate at which the accuracy of a prediction declines as one projects farther into the future. A two-dimensiona l map actually has two Lyapunov exponents , since a cluster of nearby initial points may expand in one direction and contract in another, stretching out like a cigar. The more positive one is the one that signifies chaos, and it is the one that dominates after a few iterations using the above procedure [6]. It has been conjectured [ 7 ] that the fractal dimension F is related to the two Lyapunov exponents through the relation
4. COMPUTER SEARCH PROCEDURE
The procedure for implementing a computer search for strange attractors is straightforward. Choose the 12 coefficients ai through an randomly over some interval, choose initial conditions XQ and yo, iterate the equations for the map while calculating the Lyapunov exponent and checking for divergence , and keep only those solutions that are bounded and have a positive Lyapunov exponent. A computer program"* that repetitively performs these operations is listed in the Appendix. It is written in a primitive version of BASIC so as to be widely accessibl e and easily understood . The program should run without modification under Microsoft BASICA, GW-BASIC, QBASIC, QuickBASIC, or Visual BASIC for DOS, Borland International Turbo BASIC, and Spectra Publishing PowerBASIC on IBM PC or compatibles.It assume s VGA (640 X 480 pixel) graphics. If the hardware or BASIC compiler do not support this graphics mode, change the SCREEN 12 command line 130 to a lower number (i.e., SCREEN 2 for CGA mode). A compiled BASIC and a computer with a math coprocesso r are strongly recommended . The coefficients are chosen in increments of 0.1 over the range —1.2 to 1.2 (25 possible values) in line 320. F= 1 -LJL2 Smaller coefficients result in missing many chaotic solutions, and larger coefficients produce mostly unstable where Li is the more positive of the two exponents . solutions. The increment was chosen so that each atA further difficulty is that the two solutions even- tractor is visibly different and coefficients can be coded tually get far apart, on the order of the size of the at- into letters of the alphabet A through YiA = —\.2,B tractor, and the growth saturates . This problem can be = —1.1, etc.) for easy reference and replication. Thus remedied if after each iteration the points are moved each attractor is uniquely identified by a 12-letter name. back to their original separatio n along the direction of The number of possible cases is thus 25 ^^ or about 6 the separation . The Lyapunov exponent is then deter- X 10^^. Of these, approximately 1.6% are chaotic or mined by the average of the distance they must be about 10 '^ cases [ 8 ]. Viewing them all at a rate of one moved for each iteration in order to maintain a con- per second would require over 30 million years! Thus stant separation . If the two cases are separate d by a it is very unlikely that any patterns produced by the n program will ever have been seen before, and like distance d„ after the «th iteration and the separatio after the next iteration isd„+i, the Lyapunov exponent snowflakes, nearly all of them are different. is determined from Initial conditions are set arbitrarily to x = y = 0.05 in line 310. Other small initial values produce the same L= i:\og2idn^i/d„)/N result for most cases as expected for an attractor. The Lyapunov exponent is calculated using an initial cond by 10"^ (line 310). The where the sum is taken over all iterations from n = 0 dition in which x is increase to n = N — 1. After each iteration, the value of one of program performs 100 iterations before considering the iterates is changed to make d„+i = d„. For the cases the Lyapunov exponent (line 640). After 100 iterations, the program begins keeping track of the minihere, d„ is taken equal to 10"^. Calculation of the Lyapunov exponent is only one mum and maximum values ofx and y (lines 520-550) possible way to identify chaotic attractors. One could so that after 1000 iterations the screen can be cleared also visually inspect all the stable solutions or look for and resized to allow a 10% border around the attractor cases with non-integer fractal dimension. Visual in- (line 560). If 11,000 iterations are reached with a posspection is inefficient since only about 7% of the stable itiv e Lyapunov exponent and a bounded solution, the d to be a strange attractor (line 620). solutions of the two-dimensiona l quadratic maps are result is assume chaotic. Calculation of the fractal dimension is rela- The search immediately resumes after each attractor tively time-consuming , typically requiring several thousand iterations. The Lyapunov dimension calcu* An IBM DOS disk containing the BASIC source code in lation is very fast and reliable. The exponentia l growth the Appendix, an executabl e version of the code, and a more of the separatio n ensures that for most cases only a versatile menu-driven strange attractor program with 3-D few iterations are required to determine the sign of the glasse s are available for $30 postpaidft-omthe author. Specify 3.5 or 5.25-inch disk. largest exponent.
Automatic generatio n of strange attractors is confirmed and continues until a key is presse d (line 650). The search procedure is surprisingly fast. On a 33 MHz 80486 computer running QuickBASIC 4.5, the program finds about 1200 strange attractors per hour. The listing in the Appendix only displays the attractors on the screen. A more versatile program would call a subroutine from line 620 to print the attractors, perhaps after user confirmation or evaluation, or would save the coded coefficients in a disk file for later analysis.
57
6. AESTHETIC EVALUATIO N
A collection of about 7500 such attractors was systematically examined by the author and seven volunteers, including two graduate art students , a former art history major, three physics graduate students , and a former mathematic s major. All evaluators were born and raised in the United States. The evaluations were done by choosing attractors randomly from a collection of about 18,000 and displaying them sequentially on the computer screen without any indication of the quantities that characteriz e them. The volunteers were asked to evaluate each case on a scale of one to five 5. SAMPLE STRANGE ATTRACTORS Figure 1 shows samples of the shapes that arise from according to its aesthetic appeal. It only took a few the iteration of such two-dimensiona l quadratic maps. seconds for each evaluation. At the end of the session a graph similar to Fig. 2 These cases are all strange attractors and were selected for their beauty and diversity from a much larger col- was produced in which the average rating is displayed lection. However, they are by no means atypical, and using a gray scale on a plot in which the largest Lyathere are many others that would have served equally punov exponent (L) and correlation dimension (F) s with well. It is remarkable that such a diversity of shapes are the axes. The darkness of each box increase comes from the same simple set of equations with only the average rating of those attractors whose values of L and F fall within the box. Figure 2 shows a summary different numerical values of the coefficients. , although the cases examined by The cases shown were produced on a laser printer of all the evaluations with 300 dots per inch resolution on an 8.5 X 11-inch the various individuals show a similar trend. In parpage after about 500,000 iterations. Of course, the pro- ticular, all evaluators tended to prefer attractors with gram needs modification to output the plots to a printer a dimension between about 1.1 and 1.5 and a Lyaat high resolution. However, satisfactory results can be punov exponent between zero and about 0.3. Some of obtained by any of the various utilities that allow one the most interesting cases have Lyapunov exponents below about 0.1. to print a screen image. The dimension preference is perhaps not surprising d Also shown on eachfigureis the code name precede by the letter E to denote a two-dimensiona l quadratic since many natural objects have dimensions in this map, the Lyapunov exponent L (in bits per iteration) range. The Lyapunov exponent preference is harder , but it suggest s that strongly chaotic sysand the fractal dimension F. F is actually the corre- to understand d to be appealing. For the 443 lation dimension[9] and is somewha t ill-defined be- tems are too unstructure , the cause the dimension of a strange attractor varies some- cases that were rated five (best) by the evaluators what with scale. The dimension is taken here at a scale average correlation dimension was F = 1.30 ± 0.20, and the average Lyapunov exponent was L = 0.21 of about 1% of the largest diameter of the attractor. t Normally, correlation dimension calculations are ±0.13 bits per iteration, where the errors represen very slow becaus e they involve determining the spatial plus or minus one standard deviation. About 28% of separation between every pair of points that constitute the cases evaluated fall within the error bars. the attractor. A much faster technique that entails only a slight loss in accuracy was used here. The method requires that the coordinates of the last N iteratesbe retained. A value of A^ = 500 is generally sufficient. With each new iteration, one of the previous A/^ points is chosen randomly, and its separatio n from the new point is calculated. A count is kept of those cases for which the separatio n is less than each of two values, which differ by a factor of 10, and whose geometric mean is the size scale for which the dimension is to be calculated. If the respective counts are Ni (for the smaller value) anxi N2 (for the larger value), the correlation dimension is given by i^ = logio(iV2/iVi ) With littl e computationa l penalty, the value of F can be updated whenever N\ or A^2 is incremented . The accuracy of the dimension estimate is of
Fig. 2. Results of evaluating 7500 strange attractors , showing that the most visually appealing cases are those with small Lyapunov exponent s (L) and with correlation dimensions (F) somewha t greater than one.
58
J. C. SPROTT
I€M|R¥miS»)Qia§l»UIM«IU^»IRy(lll
luuuuzirraivvEraDLBNETxsyyxcxji
P = 1.99
L = 8.28
Fig. 3. Examples of strange attractors produced by three-dimensiona l iterated quadratic maps in which the color is determined by one of the variables. 7. SUGGESTIONS FOR FURTHER WORK
The method described above can be easily extended in a number of ways [ 10]. There is nothing special about two-dimensiona l quadratic maps, other than perhaps simplicity and consequen t computationa l speed. There's an infinity of other nonlinear maps and flows. For example, Pickover has produced nice twodimensional sculptures using trigonometric maps [11]. It is straightforward to add cubic and higher order terms to the equations . More complicated nonlinearities do not significantly enhance the occurrence of chaotic solutions, but they do somewha t increase the variety of
patterns. The number of coefficients increase s rapidly with the order of the polynomial, and the variety of cases becomes even larger. Having found a visually appealing attractor, one can make small variations of the coefficients to optimize even further its appearance . The attractors can be animated by producing a successio n of frames, each with a slightly different value of one or more of the parameters. Adding a third dimension (x, y, and z) increase s the number of coefficients to 30 for quadratic maps. It also raises interesting possibilities for new display
59
Automatic generatio n of strange attractors modes. The simplest case is to plot x and y, but to ignore z, which is equivalent to viewing the projection (or shadow) of the attractor on the x-y plane. Alternately, the attractor can be projected onto the x-z or y-z plane or rotated through an arbitrary angle. A gray scale can be used to represen t the number of iterates that fall within a given rectangle on the screen [12]. Another possibility is to code the third dimension in color. Examples of three-dimensiona l quadratic maps using 16 colors are shown in Fig. 3. These figures were produced directly from VGA screen images using a color ink-jet printer. Some computer language s allow one to cycle through a variety of color palettes to find the most pleasing combination of colors or to produce a kind of animated color display. Modern versions of BASIC have such a PALETTE command. It is also possible to produce an anaglyph[13] in which each x-y value is plotted twice, once in red and once in cyan, displaced horizontally by a distance proportional to z so as to produce a three-dimensiona l monochrome image when viewed through red/blue glasses . Color three-dimensiona l images can be produced by plotting the two colored views side-by-side and either viewing them cross-eye d or through an inexpensive prism stereoscope. ^ These techniques can also be applied to two- and even one-dimensiona l maps by using a previous value of one of the variables as the third variable. The attractors can be rotated to provide a view from the most pleasing angle or animated with successivel y rotated images. Chaotic maps can also be used to produce a crude kind of computer music. For a two-dimensiona l map, X might be used to control the pitch and y the duration of each note. The result is a not-displeasin g though alien-sounding form of music that might appeal to those with exotic musical tastes. The method described above can also be applied to systems of nonlinear ordinary differential equations whose solutions are continuous flows rather than discrete maps. In such a case, chaos requires at least three equations and three variables. Differential equations can be solved approximately on a digital computer by reducing them to appropriate finite difference equations[14]. Long computing times are required for high accuracy, which fortunately is not essentia l in this application. Plots of the basin of attraction for strange attractors are sometimes very beautiful, especially when multiple nearby attractors compete and produce a fractal boundary. The popular Mandelbrot and Julia sets are basins of attraction. It is traditional to plot in different colors the number of iterations required for each unstable initial condition to reach some large value. Such plots require a large amount of computer time, however.
^ Stereoscope s and other 3-D supplies are available from Reel 3-D, P.O. Box 2368, Culver City, CA 90231.
Much more could be done with correlating the aesthetic appeal of the attractors with the various numerical quantities that characteriz e them. The Lyapunov exponent and correlation dimension are only two such quantities; there are infinitely many others[15]. One could determine if there are discernible differences between the preference s of scientists and artists. Preliminary indications sugges t that complexity might appeal more to artists than to scientists, who tend to see beauty in simplicity. There may be discernible cultural differences. One could determine whether the results are the same for more complicated systems of equations and for different methods of displaying the results, such as color versus monochrome . If such correlations exist, then it should be possible to program the computer to be even more selective and to become a critic of its own art [16]. Like the infinite number of monkeys with an infinite number of typewriters who will eventually reproduce all the works of Shakespeare , so too the computer starting with random numbers might evolve into something of an artist with unparalleled stamina and productivity. Acknowledgments—Mary Lou Herman, Mark Johnston , Kathy Ley, Earle Scime, Matt Stoneking,Christophe r Watts, . Cliff Pickover and Debora Wood assiste d with the evaluations . I am indebted to George made a number of useful suggestions Rowlands for introducing me to chaos and fractals and to Edward Pope for assuring me that these patterns would be interesting to those whose artistic tastes are more refined than my own. REFERENCES
1. J. Gleick, Chaos: Making a New Science, Viking, New York (1987). 2. A. K. Dewdney, Probing the strange attractors of chaos, Sci.Am. 235,90-93(1976) . 3. B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman , New York (1982). 4. H. O. Peitgen and P. H. Richter, The Beauty of Fractals: Images of Complex Dynamical Systems, Springer-Verlag, New York (1986). 5. H. G. Schuster , Deterministic Chaos, Springer-Verlag , New York (1984). 6. A. Wolf, J. B. Swift, H. L. Swinney, and J. A. Vastano, Determining Lyapunov exponent s from a time series, Physica 16D, 285-317 (1985). 7. J. Kaplan and J. A. Yorke, Functional differential equations and the approximation of fixed points. Springer Lecture Notes in Mathematics 730, 228 (1978). 8. J. C. Sprott, How common is chaos? Phys. Lett. A 173, 21(1993). 9. P. Grassberge r and I. Procaccia , Characterizatio n of strange attractors , Phys. Rev. Lett. 50, 346-349 (1983). 10. J. C. Sprott, Strange Attractors: Creating Patterns in Chaos, M & T Books, San Mateo, CA (1993). W. C. Pickover, Million-point sculptures , Comp. Graph. Forum 10, 333 (1991). 12. C. Pickover, A note on rendering 3-D strange-attractors , Comp. & Graph. 12, 263 (1988). 13. J. C. Sprott, Simple programs produce 3D images, Comp. Phys. 6, 132(1992). 14. H. Gould and J. Tobochnik, An Introduction to Computer Simulation Methods, Addison-Wesley , Reading, MA (1988). 15. J. D. Farmer, E. Ott, and J. A. Yorke, The dimension of chaotic attractors , Physica 7D, 153 (1983). 16. H. W. Franke, Computer Graphics, Computer Art, Springer-Veriag , New York (1985).
60
J. C. SPROTT APPENDIX
110 DEFDBL A-Z: DIM A (12) 120 RANDOMIZE TIMER 130 SCREEN 12 140 GOSUB 300 150 GOSUB 400 160 GOSUB 500 170 GOSUB 600 180 ON T% GOTO 130, 140, 150 190 END
'Resee d random number generato r 'Assume VGA graphics 'Set parameter s 'Iterate equations 'Display results 'Test results
300 310 320 330 340 390
REM Set parameter s X = .05: Y = .05: XE = X + .000001: YE = Y For 1% = 1 to 12: A(I%) = .1 * (INT(25 * RND) - 12): NEXT 1% T% = 3: LSUM = 0: N = 0 XMI N = 1000000#: XMA X = -XMIN : YMI N = XMIN : YMA X RETURN
400 410 420 430 490
REM Iterate equations XNEW = A(l ) + X * (A(2) -f A(3) * X + A (4) * Y) + Y * (A(5) + A(6) * Y) YNEW = A(7) + X * (A(8) + A(9) * X + A(10) * Y) + Y * (A(l 1) + A(12) * Y) N= N + 1 RETURN
500 510 520 530 540 550 560 570 590
REM Display results IF N < 100 or N > 1000 THEN GOTO 560 IF X < 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
Fig. 2. Lyapunov exponent for the parameter sequence {r„} = {BBABABA BBABABA ...]. Abscissa: 2.759
217-226 (1987); and C. A. Pickover, A note on rendering 3-D strange-attractors. Comp. & Graphics 12(2), 263267(1988). B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman and Co., New York (1982).
12. H. O. Peitgen and P. H. Richter, The Beauty oj Fractals, Springer-Verlag, Beriin (1986). 13. M. Markus and B. Hess, Transitions between oscillatory modes in- a glycolytic model system. Proc. Natl. Acad. Sci. USA 81, 4393-4398 (1984).
76
MARIO MARKUS and BENNO HESS
a67-
3.543.45
3.61
Fig. 3. Distorted "swallow"-pair appearing for the parameter sequence {r„} = {BBABA BBABA}.
3.46-1 3.65 Fig. 4. Lyapunov exponent for the parameter sequence {r„} = {B^A^ B^A^ . . . } .
77
Lyapunov exponents of the logistic map
3.6-
3.2-
1.27 Fig. 5. Lyapunov exponent for the paramete r sequenc e {r„} = {y^^'BA^'B...} .
3.59 -
3.24 i Fig. 6. Lyapunov exponent for the paramete r sequenc e {r„} = {A^'B A^^B}. In contrast to Figs. I to 5, the shading changes continuously at X = 0.
78
MARIO MARKUS and BENNO HESS
2.84^3.44 Fig. 7. Lyapunov exponent for the parameter sequence {r„} = {B^A^ B^A^ . . . } , with continuous grey shading change at X = 0 and with clockwise rotation of the graphical coordinates with respect to the parameter coordinates by 61°.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
79 Chaos and Graphics
TOWARD A BETTER UNDERSTANDING OF FRACTALITY IN NATURE M I C H A E L K L E I N and O T TO E. ROSSLER
Institute for Physical and Theoretical Chemistry, University of Tubingen, 7400 Tubingen, FRG J C R G EN P A R I S I* and J O A C H IM P E I N KE
Physical Institute, University of Tubingen, 7400 Tubingen, FRG G E R O LD BAIE R
Institute for Chemical Plant Physiology, University of Tubingen, 7400 Tubingen, FRG CLAU S KAHLER T
Electronics Researc h Laboratory, University of California, Berkeley, CA 94720 and J O HN L . H U D S ON
Departmen t of Chemical Engineering, University of Virginia, Charlottesville, VA 22901 Abstract—Boundarie s of coexisting attractor basins are a common source of fractal structures in discrete maps. Chaotic attractors in continuous systems of ordinary differentiable equations also have a fractal microstructure. A generation mechanis m for self-similar fractal boundaries is proposed , which gives a closer connection between "chaos" and "fractals." We discuss the role of analyticity, critical points, chaotic forcing, and bistability as some of the elements neede d to answer the major, still unresolve d question of whether nature is fractal because , or in spite of, the existence of differentiable systems . 1. INTRODUCTION
Seldom have scientific ideas enjoyed such a widespread interest in so many different fields as "nonlinear science" does."Chaos" and "fractals" seem to bridge the gap between physics and philosophy, mathematic s and nature, and computer and art. The Fractal Geometry of Nature [1], Fractals Everywhere [2], The Beauty of Fractals [3], or Does God Play Dice? [4] are only some of the very promising current book titles. One reason for the succes s of Chaos—Making a New Science [ 5 ] is the fact that it deals with a classical theory. There is an easily understandabl e geometric and visual approach to most of the phenomen a of dynamical systems theory. But one must be careful. The terms "chaos" and "fractals" are frequently used interchangeably , and there exist as many definitions as interpretations , although the mathematica l relationship is far from obvious. Fractals were originally invented as pure mathematica l structures generate d as graphical computer outputs. The question "Fractals: Where's the physics?"[6] means that the Unk between fractal objects and physical experiments or natural structures has yet to be found. Several different approache s to answering this question can be distinguished . If one adopts a topological and measure-theoretica l approach, the comparison of graphically generate d fractals and experimentally gained data suggest s a common source[7]. This source might be a "chaotic dynamics of a special flavor and character " [2]. Another approach is "diffusion-limited aggregation, " which uses stochastic dynamics as a generation mechanism for artificial as well as natural dendritic forms, * To whom correspondenc e should be addressed .
as found in the growth of crystals or in electric breakdown [8]. The method of "iterated function systems" [9], based on a combination of fundamenta l mathematica l set theory and affine transformation s involving dilation, translation, rotation, and contraction, became another construction principle for the deterministic construction of a fractal geometry. In this study, we discuss the connection between continuous dynamical systems and discrete mappings to find a generation mechanis m of nontrivial fractal boundaries . Fractal boundaries arise in nonlinear dynamical systems as borderUnes separatin g coexisting attractor basins. Attractor basins are defined as the domain within which all continuous trajectories or discrete orbits tend to the same limit set as time proceeds . Self-similar, nondifferentiable structures have, for a long time, resisted reproduction in generic continuous systems which form the main class of dynamical systems that are of appUcationa l interest. On the one hand, one knows that all chaotic hmit sets (chaotic attractors) arising in differentiable dynamical systems have fractal aspects becaus e they posses s fuzzy and nested (boxwithin-a-box) [ 10 ] Cantor set structures in some crosssections. On the other hand, all of the more spectacula r fractal structures (self-similar, etc.) are found within complex analytic maps (see [2, 11]). 2. TOP-DOWN STAIRCASE FROM PHYSICAL MODELS TO MAPS
Classical physics tries to find a one-to-one mapping between reality, as represente d by physical experiments , and mathematica l models (Fig. 1). Simulating ideal models should lead to insight into natural phenomena . Since the invention of the differential calculus in the late 17th century, differential equations became the
Reprinted from Comput. & Graphics Vol. 15, No. 4, pag. 583-596, 1991
80
MICHAEL KLEIN et al.
strange—meanin g chaotic and hyperchaotic—generi c attractors are found to be common in nonlinear ODEs that model, for example, chemical reactions [16] or physical experiments[17] . Nevertheless , the solution of continuous nonlinear equations with the help of numerical integration is time consuming, and the computer-graphica l representatio n is limited to, at l systems . Poincare's idea[18] Fig. 1. The motivation for physical modeUng.A good classica l most, three-dimensiona theory ideally gives one a one-to-one mapping between nature of looking at an (« - 1)-dimensiona l cross-sectio n and model. through an «-dimensiona l flow (for an example, see Fig. 2) gives one the possibility to replace a continuous ODE system by a time-discrete mapping. The "same" dominating tool to model nature and simulate dy- dynamical behavior is then accessibl e with the simple namical behavior. Besides classical Hamiltonian me- iteration scheme of a discrete map, cf. Fig. 2. chanics, which describe energy-conservin g dynamical So far, the top-down idea has led to the connection processes , the study of attractive states in dissipative, between discrete systems and continuous models. But nonenergy-conservin g systems yields insight into the there is an important constraint. All flows of ODEs relation between model and reality on the level of mi- and their Poincare cross-section s are invertible in time. croscopic multiparticle systems [12]. Therefore, the correspondin g return maps have to be When looking for mathematica l models of complex diffeomorphisms (or at least homeomorphism s that natural systems , one is first led to partial differential are almost everywhere diffeomorphic). Mathematically equations. These are complicated both in analysis and speaking, these maps are differentiable to a sufficient in simulation. But with the concept of the center man- degree, and their Jacobian determinan t should be ifold[13], it became evident that the dominating dy- monotonic and nowhere equal to zero (see [20] for namical behavior of virtually any system can be mod- more mathematica l details). eled with systems of ordinary differential equations 3. BOTTOM-UP FACTS FOR FRACTAL MAPS (ODEs). Dynamical behavior is, thus, governed by The most astonishing geometric structures in maps flows or trajectories in an n-dimensiona l state space. Many fundamenta l physical models are represente d are found as borderline of two or more coexisting atby linear and, therefore, analytically solvable ODEs. tractor basins in complex analytic maps. Julia sets[21 ] Today, more exciting types of dynamical behavior are and the Mandelbrot set [22] of the complex quadratic found in nonlinear ODEs. Formerly littl e known dy- map (see Fig. 3), and related sets of complex polynamical properties, like deterministic chaos [14a], or nomials as well as rational [23 ] or transcendenta l [24] even hyperchaos[14b] , extendedthe hierarchy of at- functions, tend to be self-similar fractal structures that tractive dynamical states[15].Multiple fixed-point and are nowhere differentiable. periodic as well as quasiperiodic attractors are already Curiously enough, these aestheticall y appealing to be found in the classical (near-linear) paradigms , boundaries seem to be restricted to the complex anawhereby the intuition gained with two-dimensiona l lytic case. All of the well-studied nonlinear complex systems sufficed. With three and more dimensions , analytic maps are endomorphisms , however. They have
f^^''^^y:^'r^':i j^]:\
' - ' ' • • " ' "
j*^"fA -'
>
- :-:<^'.,-^f.,.'
Mj'i/
' - •
' '•
~*'-"'l;:,f ' & ; • •
w'
.'
'•
>
'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 )„+!= arctan
rl sin 20„ + C2 r^ cos 2
(16)
(with 0 < 0„ < 27r, r„, Ci, C2 E i?). The Julia set of the basin of attraction of a cycle of period 11 (Fig. 5a) now becomes Fig. 15a in the (>, r) plane. In the limiting case of both real parameter s C\, C2 being equal to zero, this two-dimensiona l map separate s into two independent one-dimensiona l maps: the bistable quadratic map of the radius variable (with one attractor at zero and the second at infinity separate d by r = 1) and the wellknown modulomap generating the chaotic dynamics of the Bernoulli shift: '*«+! — 1" n
Fig. 13. Deformed Mandelbrot-like set of eq. (15) (for technical details, see Table 1 in Appendix).
Fig. 14. Julia-like sets of eq. (15) (for technical details, see Table 2 in Appendix), (a) Total view of a Julia set with parameter s chosen on the right of Fig. 13. (b) Close-up of the center of (a), (c) Total view of a Julia set with parameter s chosen on the left of the main body of Fig. 13. (d) Close-up of the spiral of Fig. (c).
(17)
88
MICHAEL KLEIN et al.
Fig. 15. Julia sets in the (0, r) plane (for technical details, see Table 2 in Appendix), (a) Julia set of eq. (16) in the (), r) plane, (b) Julia set of eq. (18) in the (>, r) plane.
8. SIMILARITIES IN DISCRETE (with 0 < 0„ < 27r, !•„ E i?). After a further transform, AND CONTINUOUS SYSTEMS the underlying mechanism of the map, eq. (16), with After now having obtained a better understanding parameters (ci, C2) not equal to zero, can be seen somewhat more clearly. The substitution r = -\-\r\ cf) of one possible mechanism for the emergence of nontrivial fractal basin boundaries, more realistic systems = 072 into eq. (16) yields can be studied[32]. Rossler etal\3t'^] described a fourr'n+i = r'^ 4- 2r'„(ci cos >'„ +C2 sin 0^) -\- c\ -\- cl variable ODE system that was originally designed to illustrate chaos generation via the reinjection principle[15]: )„+, = 2 arctan -; -—— . (18) r„cos0„ + Cx X = w{-y - c) -f (1 - w){z + c) (with 0 < 0'„ < 27r, r'„, Ci, C2 E i?). When restricted y=w{x-\-a-l)-\-y{\w)(z -f- c)/ix + ^ - 1) to nonnegative values, this automorphic nonlinear transformation does not destroy the qualitative dyi = wz{-y - c)/(x - b) -\- {\ - w){a - x) namical structure of the map (though making it nonanalytic). The new map, eq. (18), reveals the proposed w= ( l / 0 ( w ( l - w){w- 1 + x ) - 5 ( w - 0 . 5 ) ) (20) mechanism (compare Fig. 15a and b which are obviously diffeomorphically related). The complicated coupling between the bistable radius variable, r\ and (with X, y, z, w, a, b, c, e, 6 G R). This system gives the chaos-generating angle variable, 4>', is accomplished rise to a hyperchaotic attractor which has two directions of exponential divergence, respectively, two positive in a transparent way via the two parameters Ci, C2. In order to test the idea, we replace the quadratic Lyapunov exponents. With larger values of the control bistability in eq. (16) by a cubic expression F(r),
yF(r„y + 2Fir„)ic, cos 2(f>„ + C2 sin 20„) + d + d F{r„)sm 2(f)„-\- C2 <j)n+\ - arctan F{rn) cos 2(/)„ + Ci where i^(r„) = (1 - fl)r„ + arl and (0 < 0„ < lir, r„, tz, Ci, C2 E i?). With the parameters Ci = C2 = 0 and a <• 1, it is easy to see that there is once more no finite critical point present. Nevertheless, we again find the shadow of the Mandelbrot set (Fig. 16).
(19)
parameter b(b>2),the attractor becomes unstable with two diverging directions, thus producing a doubledrained region. The underlying dynamics (basic set) of this region is still chaotic. Analyzing the region of
89
Fractality in nature
Fig. 16. Mandelbrot-like set of eq. (18) (for technicaldetails, see Table 1 in Appendix).
Fig. 18. Self-similar basin boundary in eq. (21), compare with Fig. 17 (for technical details, see Table 3 in Appendix).
interest with the help of a two-dimensiona l set of initial conditions in the four-dimensiona l state space reveals a Sierpinsky-type fractal boundary separatin g the two directions of divergency (Fig. 17) (for more details see [33]). This system is of special interest, becaus e the corresponding Poincare return map can be modeled explicitl y by coupling two logistic maps into a three-dimensional invertible map [ 34 ]: Xrt+i = ax„(l - x „ ) + bz„
tractor (folded-towel attractor[15]) explodes in two directions as in the case of the ODE of eq. (20). Analysis of the bistable region shows a self-similar boundary of the two intertwined basins (Fig. 18) of the same type as Fig. 17.
yn+i = ay„i\ - y „ ) + bx„ Zn + l = yn
(21)
(with x„, yn, z„, a, bG R). In case the paramete r a is larger than 4.0, the correspondin g hyperchaotic at-
Fig. 17. A scan of initial conditions in the {y, z) plane of eq. (20) (for technical details, see Table 2 in Appendix).
9. CONCLUSIONS
Are there self-similar or even nowhere difFerentiable structures in continuous systems ? Starting with wellknown discrete complex analytic maps, we found that analyticity of a map—even though important for a mathematica l treatment—is not a necessar y condition for generating bifractal structures . The same seems to hold true for critical points which, for arbitrary maps, do not play the same decisive role as for complex analytic examples . One possible generating mechanis m for bifractal boundaries consists in letting a chaotic forcing act on a bistable subsystem , so that a boundary between two coexisting basins of attraction (or regions of divergence , respectively) is formed [35]. A closer look on the existing examples , nevertheless , still reveals some open questions . "Typical fractals are not pretty" (see [2], p. 108). What is the essenc e of those aesthetically appealing, infinitely complex, though highly ordered, sets known as the Mandelbrot set and the correspondin g Julia sets of the complex analytic quadratic map? We are confident that the underlying, specially organized chaotic dynamics and the internal geometry of the Riemannian sphere will give the answer eventually. The study of ordinary maps on closed spaces (like the sphere or the torus), presently in preparation, may also contribute to further narrowing the gap that still exists between models of nature and fractal maps. Acknowledgements—We thank Brigitte Rohricht, Wolfgang Metzler, and Michael Michelitsch for their fruitful collaboration.
90
MICHAEL KLEI N et al.
REFERENCE S 1. B. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, San Francisco (1982). 2. M. F. Bamsley, Fractals Everywhere, Academic Press, Boston (1988). 3. H. -O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer-Verlag , Beriin (1986). 4. I. Stewart, Does God Play Dice?, Basil Blackwell-Penguin , Oxford (1989). 5. J. Gleick, Chaos—Making a New Science, Viking-Penguin, New York (1987). 6. L. P. KadanofF, Fractals: Where's the physics? Physics Today (FehmsLvy 1986). 7. G. Mayer-Kress (Ed.), Dimensions and Entropies in Chaotic Systems, Springer-Veriag , Beriin (1986). 8. T. A. Witten and L. M. Sander, Diffusion-limited aggregation. Physical Rev. B27, 5686-5697 (1983). 9. M. F. Bamsley and S. Demko, Iterated function systems and the global construction of fractals. Proc. Roy. Soc. London A399, 243-275 (1985). 10. C. Mira, Chaotic Dynamics, World Scientific, Singapore (1987). 11. H. -O. Peitgen and D. Saupe (Eds.), The Science ofFractal Images, Springer-Verlag , Berlin (1988). 12. G. Nicolis and I. Prigogine, Self-Organization in Nonequilibrium Systems, Wiley, New York (1977). 13. H. Haken, Advanced Synergetics, Springer-Verlag , Berlin (1983). 14a.T. Li and J. A. Yorke, Period three implies chaos. Am. Math. Mon. 82, 985-992 (1975). 14b.O. E. Rossler, An equation for hyperchaos . Phys. Lett. 71A, 155-157(1979) . 15. O. E. Rossler, The chaotic hierarchy. Z Naturforsch. 38a, 788-801 (1983), reprinted in: A Chaotic Hierarcy, G. Bair and M. Klein (Eds.), World Scientific, Singapore (1991). 16. J. L. Hudson, O. E. Rossler, and H. Killory , A four-variable chaotic chemical reaction. Chem. Eng. Comm. 46, 159-166(1986) . 17. B. Rohricht, J. Parisi, J. Peinke, and O. E. Rossler, A simple morphogeneti c reaction-diffusion model describing nonlinear transport phenomen a in semiconductors . Z. P/z);5. 653,259-266(1986) . 18a.H. Poincare, Sur les courbes definies par des equations difierentielles. /. Math. PureetAppl. 1, 167-224 (1885). 18b.H. Poincare, Les Methodes Nouvelles de la Mechanique Celeste, Guthier-Villas, Paris (1892). 19. O. E. Rossler, An equation for continuous chaos. Phys. Lett. 51A,397-39S (1976). 20. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, Benjamin/Cummings , Menlo Park, CA (1986). 21. G. Julia, Sur iteration des fonctions rationnelles. / Math. Pure et Appl. 4, 47-245 (1918). 22. B. B. Mandelbrot, Fractal aspects of the iteration of z -»' X( 1 - z) for complex X, z. Ann. NY Acad Sci. 357, 249259(1980). 23. R. Mane, P. Sad, and D. Sullivan, On the dynamics of rational maps. Ann. Sci. Ec. Norm. 16(suppl.), 193-217 (1983). 24. R. L. Devaney, Julia sets and bifurcation diagrams for exponential maps. Bull. Am. Math. Soc. 11, 167-171 (1984). 25. S. W. McDonald, C. Grebogi, E. Ott, and J. A. Yorke, Fractal basin boundaries , Physica 17D, 125-153 (1985). 26. C. Kahlert and O. E. Rossler, Analogues to a Julia boundary away from analyticity, Z Naturforsch. 42a, 324-328(1987) . 27a.J. Peinke, J. Parisi, B. Rohricht, and O. E. Rossler, Instability of the Mandelbrot set. Z Naturforsch. 42a, 263266(1987). 27b.J. Peinke, J. Parisi, B. Rohricht, O. E. Rossler, and W. Metzler, Smooth decompositio n of generalize d Fatou set
explains smooth structure in generalize d Mandelbrot set. Z Naturforsch. 43a, 14-16 (1988). 27c.J. Peinke, J. Parisi, B. Rohricht, O. E. Rossler, and W. Metzler, Non-differentiable structure in the generalize d Mandelbrot set. Z Naturforsch. 43a, 287-288 (1988). 28. B. Rohricht, W. Metzler, J. Parisi, J. Peinke, W. Beau, and O. E. Rossler, The classes of fractals. In The Physics ofStructure Formation: Theory and Simulation, W. Guttinger and G. Dangelmayr (Eds.), Springer-Verlag , Beriin, 275-281(1987) . 29. M. Klein, Mandelbrot set in a non-analytic map, Z Naturforsch. 43a, 819-820 (1988). 30. C. Kahlert and M. Klein, On the role of transformation s destroying analyticity, Z Naturforsch. 43a, 1091-1093 (1988). 31. B. Branner, The paramete r space for complex cubic polynomials, Proc. of the Conference on Chaotic Dynamics, Georgia Tech, Atlanta, GA (1985). 32. O. E. Rossler, J. L. Hudson, and M. Klein, Chaotic forcing generate s wrinkled boundary, /. Phys. Chem. 93, 28582860(1989). 33. O. E. Rossler, J. L. Hudson, M. Klein, and C. Mira, Selfsimilar basin boundaries in a continuous system. In Nonlinear Dynamics in Engineering, W. Schiehlen (Ed.) Springer-Veriag , Beriin (1989). 34a.O. E. Rossler, C. Kahlert, J. Parisi, J. Peinke, and B. Rohricht, Hyperchaos and Julia sets, Z Naturforsch. 41a, 819-822(1986) . 34b.O. E. Rossler, J. L. Hudson, M. Klein, and R. Wais, Selfsimilar basin boundary in an invertible system (foldedtowel map). In Dynamics Patterns in Complex Systems, A. S. Kelso et al. (Eds.), World Scientific, Singapore , 209218(1988). 35. F. Peinke, M. Klein, A. Kittel, G. Baier, F. Parisi, R. Stoop, F. L. Hudson, and O. E. Rossler, Nowhere Differentiable Boundaries in Differentiable Systems— A Propose d Explanation, Europhys. Lett. 14, 615-620 (1991). APPENDIX
The Mandelbrot sets and Mandelbrot-like sets are the collection of all paramete r states which have nonexploding iterative orbits. A grid of 400 X 400 initial points is iterated. Attractive states are plotted black, diverging states are plotted white. The applied criterion for divergence is x^ -^ y^ '^ 100 or x^ + y'^ + z^ ^ 10(K), respectively. The maximum number of iteration steps per point was set to 100. The triangles in Fig. 8a and b) mark the area of the successiv e close-ups . The lines in Fig. 12a show the position of the slices of Fig. 12b-f. The filled-in Julia sets and Julia-like sets are basins of attraction in variable space. A grid of 400 X 400 initial points is iterated. Attractive states are plotted black, diverging states are plotted white. The applied criterion for divergence is x^ + y^ ^ 100 or x^ + >'^ + z^ ^ 1000, respectively. In case of attractive states, the maximum number of iteration steps per point differed between 100 and 5000, depending on whether or not picture stabilization is obtained. The triangles mark the position of close-ups of the following figures. In Fig. 18, a different criterion for coloring is used. Initial points that explode (y^ + z^ ^ 10,000) with y :^ z are plotted white, those which explode with y^zart plotted black. The ODEs are calculated with a one-step Runge-KuttaFehlberg numerical integration method of 7th order with autonomous stepsize control. The allowed local error was set to 10'^. The Poincare cross-section s of Fig. 2b and c are calculated with a backward integration algorithm using the same integration method. The cross-sectio n is set to be at z = -0.15. Fig. 17 shows a scan of initial conditions in the (y, z) plane of eq. (20), while, initially, x = 0.0 and w = 0.01. The criterion used for coloring was: black, when y{t) > 0.2 while w{t) ^ 0.8 and x(t)< 0.2; white, when z{t)> 0.2 while w{t) < 0.2 and x ( / ) > 0 . 8.
91
Fractality in nature Table Al . Technical details of the paramete r space figures.
Fig^ 3a
E g. ( 2)
8a
( 4)
8b
( 4)
8c
( 4)
10a 1 0b
(5a) (5b)
12a
(14)
1 2b
(14)
12c
(14)
12d
(14)
12e
(14)
12f
(14)
13
(15)
16
(18)
Initial conditions Xo = 0.0 yo = 0.0 xb = 0.0 >'o = 0.0 ;cb = 0.0 yo = 0.0 Xo = 0.0 yo = 0.0 Xo - 0.0 yo = 0.0 xb = 0.0 yo = 0.0 Xo = yo = 0.0 zo = 0.0 Xo = yo = 0.0 Zo = 0.0 Xo = yo = 0.0 Zo = 0.0 •^0 = yo = 0.0 Zo = 0.0 xo = yo = 0.0 Zo = 0.0 Xo = yo = 0.0 Zo = 0.0 xb = yo = 0.0 Zo = 0.0 00 = 0.0 ro = 0.001
Special parameters
Abscissa ordinate
—
Cl
Ci
fl = 0.3
C\ C2
fl = 0.3
Cl
Cl
a = 0.3
C\ Cl
— — — —
C\ Cl Cl
Cl
C3 = 0 . 0
Cl
c, = 0 . 31
Cl
Cl
C3
c, = 0.375
Cl Ci
C3 = 0.1
Cl
Cl
Ci = 0.25
C\ Cl
C3 = 0.55
C\
a = 0.01 b = 0.99 a = 0.95
Cl
Cl Cl C\ Cl
Maximum value
Miminu m value - 2 .0 - 1 . 25 - 2 .0 - 1 . 25 - 0 . 0 35 0.745 - 0 . 0 2 87 0.75145 - 2 .0 - 2 .0 - 2 .0 - 1 .5 - 2 .0 - 1 . 25 - 1 . 25 - 1 . 25 - 0 . 65 - 0 . 65 - 2 .0 - 1 . 25 - 2 .0 - 1 . 25 - 2 .0 - 1 . 25 - 1 . 25 - 1 . 25 - 2 .0 - 1 . 25
0 .5
1.25 0 .5
1.25 - 0 . 0 25 0.755 - 0 . 0 2 86 0.75155 1.0 1.0 1.0 1.5 0 .5
1.25 1.25 1.25 0.65 0.65 0 .5
1.25 0 .5
1.25 0.5
1.25 1.25 1.25 0 .5
1.25
Table A2. Technical details of the variable space figures. Fig.
E g.
3b
( 2)
4a
( 8)
4b
( 8)
4c
( 8)
5a
( 4)
5b
( 4)
5c
( 4)
5d
( 4)
5e
( 4)
5f
( 4)
6a
( 4)
6b
( 4)
6c
( 4)
7a
( 4)
7b
( 4)
7c
( 4)
Special parameter s Cl = 0.32 Cl = 0.043 fl= 1.4 b = - 0 .3 fl= 1.4 b = - 0 .3 fl= 1.4 b = - 0 .3 c, = 0.32, a = 0.0 Cl = 0.043 c, = 0.32, a = - 0 . 01 Cl = 0.043 c, = 0.32, a = - 0 . 05 Cl = 0.043 Cl = 0.32, a = - 0 . 25 Cl = 0.043 Cl = 0 . 3 2, fl = - 1 . 25 Cl = 0.043 Cl = 0 . 3 2, fl = - 1 . 57 Cl = 0.043 c, = 0.32, a = - 0 . 01 Cl = 0.043 c, = 0 . 3 2, a = - 0 . 01 Cl = 0.043 c, = 0 . 3 2, fl = - 0 . 01 Cl = 0.043 c, = 0 . 3 2 , fl = - 1 . 57 Cl = 0.043 c, = 0.32, fl = - 1 . 57 Cl = 0.043 Cl = 0 . 3 2, a = - 1 . 57 Cl = 0.043
Abscissa ordinate Xn yn
x„ yn Xn y« Xn
yn Xn yn Xn yn Xn yn Xn yn Xn y» Xn yn Xn yn Xn yn Xn yn Xn
yn Xn yn Xn yn
M i n i m u m value - 1 .2 - 1 .2 - 4 .0 - 3 .0 - 2 .0 - 2 .5 - 0 .5 - 2 .5 - 1 .2 - 1 .2 - 1 .2 - 1 .2 - 1 .2 - 1 .2 - 1 .2 - 1 .2 - 1 .5 - 2 .0 - 1 .5 - 2 .0 - 0 . 5 55 0.27575 - 0 . 5 5 4 0 84 0.2767458 -0.5540837848 5 0.27674642833 3 1.4448 0.3394 1.445726 0.3397765 1.44572652 0.339777176
Maximum value 1.2 1.2 4 .0
17.0 0 .0 1.5 0 .0
- 1 .5 1.2 1.2 1.2 1.2 1.2 1.2 1.2 1.2 2 .5 2 .0 2.5 2 .0
- 0 . 5 54 0.27675 - 0 . 5 5 4 0 83 0.2767468 -0.5540837838 5 0.27674642933 3 1.4458 0.3404 1.445727 0.3397775 1.44572653 0.339777186
92
MICHAEL KLEIN et al.
Table A2. Fig.
Eg.
Special parameter s
9
(4)
11a
(7)
cx = - 0 . 0 3, a = 0.3 C2 = 0.75 c, = - 0 . 3 2, C2 = 0.043 /7, = 1.4,/72 = 0.3 P3 = 0.3,/74 = 0.143 c, = - 0 . 3 2, C2 = 0.043 Pi = 1.4,/72 = 0.3 /73 = 0.3,/74 = 0.143 Ci = - 0 . 3 2, C2 = 0.043 /7, = 1.4,/72 = 0.3 ;73 = 0.3, A = 0.143 c, = 1.095,^ = 0.01 C2 = 0.01, Z7== 0.99 c, = 1.095,^ = 0.01 C2 = 0 . 0 1 ,^ = 0.99 c, = - 0 . 6 4, a = 0.01 C2 = 0.0\,b = 0.99 c, = - 0 . 6 4, a = 0.01 C2 = 0.01,/? = 0.99 c, = 0.32 C2 = 0.043 c, = 0.32 C2 = 0.043 fl = 4.1,z„ = 0.0 b = 0.001
lib
(7)
lie
(7)
14a
(15)
14b
(15)
14c
(15)
14d
(15)
15a
(16)
15b
(18)
18
(21)
{Continued).
Abscissa ordinate
Maximum value
Minimum value
yn
-1.5 -1.5 -4.0 -2.0
1.5 1.5 4.0 18.0
x„ yn
0.3 -0.9
1.1 1.1
x„ yn Xn
'
x„ yn
0.896 0.55
0.936 0.65
x„ yn
-1.5 -1.5 -0.5 -0.5 -1.3 -1.0 -0.4863 0.22 0.0 0.001 0.0 0.001 -0.1 -0.1
1.5 1.5 0.5 0.5 1.2 1.0 -0.3384 0.33
Xn
yn Xn
yn Xn
yn n
r„ n
r'n x„ yn
IT
1.5 4ir 1.5 1.1 1.1
Table A3. Technical details of the ODE figures.
Fig.
Eq.
2a
See fig. caption
2b
2c
17
See fig. caption
See fig. caption
(20)
Initial conditions xo = 5.0 yo = 5.0 Zo = 0.1 JCo = 5.0 yo = 5.0 Zo = 0.1 Xo = 5.0 y^ = 5.0 Zo = 0.1 Xo = 0.0 Wo = 0.01
Special parameters
Abscissa ordinate
a = 0.275 b = 0.2
X
a = 0.275 b = 0.2
X
a = 0.275 ^ = 0.2
X
a = 0.5, b = 1.55 c= 1.3,5 = € = 0.005
y
y z y
y
2
Minimum value
Maximum value
-1.5 -0.8 -1.7 -1.41 -0.45
1.9 0.7 1.9 -0.86 0.65
-1.0 0.568
-0.85 0.593
-1.0 -2.28
0.1 0.1
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
93 Chaos and Graphics
ON THE DYNAMIC S OF REAL POLYNOMIALS ON THE PLANE A R T U R O. LOPES* t
Institute for Physical Science and Technology, University of Maryland, College Park, MD 20742 Abstract—We analyze the dynamics of the map/(z) = z^ - 5z where 5 E C is a constan t and z E C is a variable. For some values of 5, we can have invariant measure s of density with respec t to the two-dimensiona l . For other values of 5 we can have fractal repellers or the X-trange attractor. This problem Lebesgu e measure is related to a Triple Point Phase Transition Model (Potts Model). 1. INTRODUCTION
We will analyze computer experiments and present several conjectures on the dynamics of real polynomials on the plane of the form f{x, y) = (x^ - y^ — ax — by, 2xy - bx -\- ay), where a BR and ^ E R are constants . In a compact form /can be written as/(z) = z^ — sz, where z G C and s = a-\- bi. Some strange attractors appear for some values of the paramete r s. In one of these cases , the attractor has the geometrica l shape of the letter X. For other values of the parameters, there exist an invariant measure with density with respect to the two-dimensiona l Lebesgue measure . We use the computer to analyze the bifurcation set of parameters and the dynamics of these maps. The physical motivation for analyzing such classes of maps is related to a dynamical system model recently introduced for understandin g an old problem: triple point phase transition (Potts Model). In our case the model applies to a semi-infinite one dimensiona l spin s in each site of the lattice 1^ with four spin component lattice. The Yang-Lee zeros are part of a very important area of study of concrete physical problems related to sudden magnetizatio n of ferromagnetic systems . In the dynamical system model we consider here, we will exhibit the locus of points of the set that is the analog of the set of Yang-Lee zeros. This is relevant for the phenomena of triple point phase transitions where it is useful to know for each values of s whetherthe maps fs are expanding or not.
For the paramete r s = 2,the dynamic of this map is very well understood . This map was first considere d by M. E. Hofman and W. D. Withers in [ 8 ] and [ 15 ], and is also known as the Generalize d Chebyshe v Polynomial on the plane (see also [12]). In this case the map /has an invariant measure , absolutely continuous with respect to the 2-dimensiona l Lebesgue measure . This measure is the measure of maximal entropy. The support of this invariant measure is the interior of the deltoid curve given by 4(z^ + z^) - (zz)^ - 18zz + 27 = 0. The picture of the deltoid region is shown in Fig. 1 (a). The analytical expressio n of the density is
; ( 4 ( Z ^ + Z 3) - (ZZ)^ -
\^ZZ +
11)-"^.
All these results are presente d in [8] and [15]. We refer the reader to these two papers for other interesting properties of such map. The real polynomial on the real fine g{x) = x^ -2x also has an invariant measure absolutely continuous with respect to the one-dimensiona l Lebesgue measure . This map is conjugated with the map 1 — 2x^. The family of real polynomials gdx) = 1 - cx^ was analyzed by several authors (see [2] for references) . There exists a value a such that the set A of parameters c such that the family gc has an absolutely in2. REAL POLYNOMIALS IN THE PLANE , is contained in (a, 2). The value a In this note we will consider the family of real poly- variant measure is known as the Feigenbau m point[5]. nomials on the plane of the form M. Yakobson showed that the set A has positive Lebesgue measure in the set of real parameters[9] . fix, y) = (x^ - y^ — ax ~ by, Ixy — bx -\- ay), For values of c larger than 2, the critical point goes /> E IR. to 00 under iterations ofgc. In this case the map gc is a^U, expanding, and the nonwanderin g set has a Cantor set In complex coordinates such map can be written in structure (see [2]). the form It is conjectured that the set of parameter s values c, where gc is expanding is dense in (A, 2). An important result about the bifurcation set of the family gc was / ( z) = z^ - sz, where s = a-\- bi. obtained by Feigenbau m [ 5 ]. The analysi s of the family/(z) = z^ - 5z on the * Partially supporte d by AFOSR. d t Permanen t address : Intituto de Matematica UFRGS, Av. plane is a natural extension of the problem considere above for the family gc on the real line. Another natural Bento Goncalves 9500, 91500-Port o Alegre-RS, Brazil. Reprintedfrom Comput. & Graphics Vol. 16, No. 1, pag. 15-23, 1992
94
ARTUR O. LOPES
1(a)
s=2
1(c)
1(e)
Deltoid
1(b)
Cardioid
s=C.5
1(d)
s=0.5
s=0.5
1(f)
s=0.5
Fig. 1. Portraits of dynamics, (a) 5 = 2 Deltoid, (b) Cardioid, (c) s = 0.5, (d) s = 0.5, (e) s = 0.5, (f) s = 0.5.
extension for the plane of the family gc is the family of maps of the form Vciz) ••
+ c,
cEC.
In this case the bifurcation set is also known as the Mandelbrot set [13]. In recent years several papers on the dynamics of polynomials on the plane appeare d in the literature, [1] and [6] . Most of these papers are related to the Henon map[7]. We became interested in the dynamics and the bifurcation set of the familyX(z) = z^ - 5z becaus e this is related to a model associate d with a triple point phase
transition and Yang-Lee zeros. In this model the value s = 2 correspond s to the point of triple point phase d to diftransition. Other values of 5 should correspon ferent external magnetic fields. We will explain more carefully now the physical problem to which our mathematica l model is related. It is well known that certain materials present magnetic properties at low temperatures . In first order transition, the transition from nonmagneti c state to the magnetic state is noncontinuous . In fact, there exist a certain transition value of the paramete r temperatur e where suddenly the magnetizatio n occurs. For the physics literature on this subject, we refer the reader to [9]. Note that the free energy (or pressure ) is continuous with the temperatur e /. For each t there exist
95
Dynamics of real polynomials an equilibrium state (sometimes more than one) also known as Gibbs State. Suppose now we decrease the temperature t of a ferromagnetic material. Until we reach a certain transition value to, equilibrium states are unique. For this value to, there exist more than one equilibrium state. This means a discontinuity (in the set of probabilities) of the equilibrium state with the variation of M n the Ising Model, two equilibrium measures can coexist in the transition temperature (double point transition). In the Potts Model, three equilibrium measures can coexist in the transition temperature (triple point transition). In [ 11 ] we present a mathematical model for double transition and in [12] we show that/(z) = z^ - 2f represents a model for triple transition. Suppose now we also want to change the magneticfieldand not only the temperature around the bifurcation point of triple transition. The Yang-Lee zeros appears in the concrete physical problem as the locus of points where coming from very large values of a ''complex'' magnetic field, there exist transition from one equilibrium state to more than one equilibrium state[13]. It is well known that for expanding systems equilibrium states are unique [10, 11]. The existence of more than one equilibrium state in "thermodynamic formalism" terms (see [11]) is related with nonexpansive maps. This happens, for in-
2(a)
s=1.68
2(c)
s«-6
stance, for/(z) = z^ - 2z where for a certain value of the external parameter t, three equilibrium states coexist. We will explain now in a more rigorous way what we mean by equilibrium state. Consider a certain fixed map /and Af( / ) the set of invariant probabilities for / . Consider now t an external parameter {t plays the role of temperature) and for each t we will be interested infindingthe probability nt that attains the supremum for the following variational problem: sup {h(v)-t
f log|det(/)/(z))|t/t;(z)}.
We will call the probabilities that attain such supremum of equilibrium states. The term h(v) isthe entropy oft; (the kinetic energy term) and the term J log # det I Z)(/(z)) Ifi?t;(z),is the Liapunov number of the probability v (the potential energy term). For expanding systems such equilibrium states are unique for every t. Suppose now we decrease the value nn a continuous fashion. For some nonexpanding systems as, for example,/(z) = z^ - 2z (see [12]), there exist a unique equilibrium state nt, until we reach a transition value of parameter t = to where there exist three equilibrium states. This is the phenomena of triple point transition.
2(b)
2(d)
5=1.68
s=1.68
Fig. 2. (a) s = 1.68, (b) s = 1.68, (c) s = -6, (d) s = 1.68.
96
ARTUR O. LOPES
Now we have to analyze the other parameter 5 E C and consider the maps^ and the equilibrium probabilities Ht associated with each of these maps j^(z) = z^ - sz for s close to 2. In a neighbourhood of 2, some of the s are such that fs is expanding and for other values of s the map fs is not expanding. In the first case, equilibrium states nt are unique for all t, and in the second case, perhaps for some values of ^ equilibrium states are not unique (see [12]). The natural question is the following: Is there, in the parameter space, 5 E C, an analytical curve representing the locus of points where there exist the transition from one case (one equilibrium state for every /) to the other case (more than one equilibrium state for some value of 0? In this case we think that different values of s represent different values of ''complex^' magnetic fields. Using the computer we were able to obtain the cardioid curve shown in Fig. 1 (b) as the natural candidate to be the Yang-Lee zeros set related to our model. For values of s close to 2 and outside the cardioid
curve, the system seems to be expanding. The reason is that the critical set goes to infinity (and also geometrical aspects observed in the pictures). We refer the reader to [10-12 ] for references related to the Ising and Potts model of statistical mechanics. Another justification for the study of polynomial and rational maps on the variable z and z is related to convergent algorithms of the Newton type [14]. We will present here several pictures obtained in the computer that we believe are worthwhile for a better understanding of the topological dynamics of such maps. We hope these pictures can stimulate other people for a rigorous mathematical analysis of the problem. We will present several open questions. The family of such maps presents a very rich dynamics and a certain analogy with real quadratic polynomials in the line. The critical set of fs is, by definition, the set of points of the plane where the determinant Jacobian of X is zero. This set is the circle of center zero and radius -— . For values of s such that \\s\\ < 1, the point (0,
..'" Hillll
-3H'*
3(a)
3(b)
s = -1.4
>
V
Ills....
s=-1.3
[ii
^|ri««««.««««j.r
-.r
,./
iillK
V
Y--..-:
3(c)
3(d)
S=-l
s=-0.9
i!
!!,. Ill* !iin!l
3(e)
5=0.2
3(f)
s=0. H
Fig. 3. (a) s = -1.4, (b) s = -1.3, (c) 5 = -1, (d) 5 = -0.9, (e) s = 0.2, (f) s = 0.4.
97
Dynamics of real polynomials 0) is attracting. For all other values of 5, the point (0, 0) is repelling. For values of 5 with large modulus, the critical set goes to oo under iterations of^. The nonwanderin g set in this case has a Cantor set structure as shown in Fig. 4(g) and 4(h). The set of bifurcation points in the 5-paramete r space (coming from oo) is the cardioid with extremes in - 6 an 2, shown in Fig. 1 (b). For values of 5 outside the interior of the cardioid the critical set goes to oo. For values of 5 inside the cardioid, some critical points may not go to 00 under iterations of j ^ . In Fig. 2(c) we show the picture for s = -6 of the critical set (a small circle), the image of the critical set (a deltoid shape figure) and part of the second image of the critical set (the three curves that are outside the deltoid). This situation is a limit one, for s < -6 the
image of the critical set will not intersect the second image, and for s> -6 the oppositewill happen. The filled-in set offs is, by definition, the set of points z that does not go to oo under iterations offs. In the pictures presente d here the filled-in set is always shown with a uniform pattern of dots. The evolution of the filled-in set is shown in the sequenc e of pictures shown in Fig. 3. For values of 5 larger than 0.3, the filled-in set looks like a delta-wing airplane (see Fig. 1(c)). The boundary of the filled-in set seems to have a fractal nature, but for the value s = 0.5, a closer and closer look shows that this property perhaps is not true. The pictures 1 (d) to 1 (f) show closer and closer views of part of the left side of the "wing." Open-Problem. Is the boundary of the filled-in set a fractal for values of 5 G R different from 0 and 2?
^>
KJ^^-^:
f:-'. 4(a)
s=1.5
4(b)
s=1.6
^^
4(c)
4(e)
s=1.61
4(d) s=1.64
s=1.68
4(g)
4(f)
s=2.2
n=3
4(h)
s=1.93
s=2.2
n=4
Fig. 4. (a) 5 = 1.5, (b) 5 = 1.6, (c) 5 = 1.61, (d) 5 = 1.64, (e) s - 1.68, (f) s = 1.93, (g) 5 = 2.2, « = 3, (h) 5 = 2.2, « = 4.
98
ARTUR O. LOPES
For small values of s (close to zero), the filled-in set is a topological disk. All points in the filled-in set seems to converge to zero. This situation looks similar to the one presented for the complex polynomial family £s{z) = z2-5z[3]. In Fig. 3, we show the evolution of the filled-in set with the changing of the parameter s. For values of 5 with modulus larger than one, a nontrivial attractor appears in the filled-in set. For values of s close to 2, it seems to exist an open region attracting all points of thefilled-inset. For 5 = 2, the attractor is equal to the filled-in set. In Fig. 2(a), we show that for 5 = 1.68, the attracting region is strictly contained in thefilled-inset. Attractors here will be shown with a random pattern of dots. Figure 2(b) shows a closer look of the upper-left side of
Fig. 2(a). In Fig. 2(d), we show the critical set, the first and second images of the critical set, and also the filled-in set. Conjecture. For a set of positive measure of real values of s close to 2, there exist an invariant-measure absolutely continuous with respect to the two-dimensional Lebesgue measure. For values of s between 1 and 1.641, it seems to exist nontrivial attractors with two-dimensional Lebesgue measure zero. Conjecture. For values of 5 between 1.4 and 1.61, the attractor set has dimension 1. The evolution of the attractor with the changing of the parameter s is shown in Fig. 4(a) to 4(f). The evolution of part of the attractor for values of 5 between 1.4 and 1.6 is shown in Fig. 6.
€•'••
r-^-irA
i^
r.>^
5(a)
s=1 + 0.178 i
5(b)
5(c) s=1.7 +0.178 1
S'1 -t^ 0.178 1
5(d)
s=1 + i
'•>>,
V
«*" */•>
5(e) s«1.3 +0.178 i
5(f)
^?rz.
s « 1.6
Fig. 5. (a) 5 = 1 + 0.178/, (b) 5 = 1 + 0.178/, (c) 5 = 1.7 + 0.178/, (d) 5 = 1 + /, (e) 5 = 1.3 + 0.178/, (f)5=1.6.
99
Dynamics of real polynomials First the attractor can be a point, but around 5=1.5 looks like a curve that turns out in a distorted hypotrocoid. For larger value of 5 « 1.6, it seems to exist distorted circles that attract the points of the filled-in set. The pictures of Fig. 6 are produced by magnifying part of the attractor. In fact, some of these curves are in an orbit of period 2 (see Fig. 5(f)). For values of s larger than two, the nonwanderin g set seems to have a fractal nature and a Cantor-se t structure. For s = 2.2 the nonwanderin g set has an appolonian packingshape (see [4]). In Fig. 4(g) and 4(h) the shaded areas show the points that remain in a square centered in (0, 0) with size 8 after 3 and 4 iterates, respectively. Conjecture. For values of s close to 2 and outside g set the cardioid shown in Fig. 1 (b) the nonwanderin is expanding. Note that Fig. 4(g) and 4(h) seems to indicate the existence of a Cantor set with expanding dynamics. The above question is related with the triple
point phase transition and Yang-Lee zeros problem mentioned in [12]. Suppose now that s - a -\- bi with b different from zero. For small values of ^ a similar pattern of the case ^ = 0 seems to happen. We followed the evolution of a, with a fixed value oi b = 0.178. For values of a around 1, it seems to exist three points that attract the all filled-in set. It seems to exist invariant curves connecting such points. The attracting periodic points are shown in the points of accumulation of dots in Fig. 5(b). The curves connecting these points are shown in the accumulation of dots in Fig. 5(a). We believe there exist three other saddle periodic points such that the unstable manifolds of such points are the curves mentioned above. For larger values of A, a similar situation like the one shown in Fig. 6 happens . For values of a around 1.7 the attractor has dimension two. The heavy dotline areas in Fig. 5(c) show a much larger frequency
zf i
"v.
..J
6(a)
s = 1.4
6(b)
s= 1.5
1
J -^ .J
1^ 'i
*• 1
6(c)
s=1.55
;••. \»
^
1
1
6(d)
6(e)
.
=
s=1.58
• :
.
'"^
'*'
s=1.59
6( f )
s= 1.6
Fig. 6. (a) s = 1.4, (b) S = 1.5, (c) S = 1.55, (d) S = 1.58, (e) S = 1.59, (f) S = 1.6.
1
100
A R T U R O . LOPES
of iterates in some parts of the attractor of the initial point chosen in thefiUed-inset. We also show the attractor for 5 = 1 + / in Fig. 5(d). The area without dots is probably related with stable manifolds of saddle periodic points mentioned before. It seems to exist a relation of the attractors with the position of the iterates of the critical set. In Fig. 7(b), we show the critical set, thefirstand second iterates of the critical set, thefiUed-inset, and some attractors (of the kind in Fig. 6(c)) presented for the value 5 = 1.5 + 0.178/. Figure 7(a) shows thefiUed-inset, the critical set, the image of the critical set, the attractor, and the position of the four periodicfixedpoints centered in small
ellipses. Figure 7(d) shows the attractor and the second iterate of the critical set. Figure 7(e) shows the attractor, the critical set, and thefirstand second iterates of the critical set. 3. AN X-TRANGE ATTRACTOR
In Fig. 8(d) we show the attractor set for^ when s = 1 + 1.05/. The attractor has the shape of the letter X. We also show in Fig. 8 other kind of attractors for values of s very close to s = 1 + /. This value is a bifurcation parameter for the family, as it is shown in Fig. 8(b), 8(c), and 8(d). In Fig. 8(a), the two line segments are in an orbit of period 2. The other X-trange attractor has period 1.
Fig. 7. (a) S = 1.68, (b) 5 = 1.5 + 0.178/, (c) 5 = 1.55 + 0.178/, (d) s = 1.55 + 0.178/, (e) 5 = 1.7 + 0.178/.
101
Dynamics of real polynomials
8(a)
8(c)
8(b)
s= 1 + i
s= 1.07
+ i
8(d)
s= 1 + 0.95
i
s = 1 -»• 1 .05 1
Fig. 8. (a) 5 = 1 - f / , ( b ) 5 = 1 + 0 . 9 5 / , ( c ) 5 = 1.07 + / , ( d ) 5 = 1 + 1.05/.
Acknowledgement—I would like to thank C. Leme for assistance in plotting the pictures presented in this paper.
REFERENCES
1. E. Bedford and J. Smillie, Polynomial difFeomorphisms of C^: Currents, equilibrium measures and hyperbolicity Inventiones Math. 87 (1990). 2. P. Collet and J. Eckmann, Iterated Maps on the Interval as Dynamical System, Birkhauser, Basel (1980). 3. A. Douady and J. Hubbard, On the dynamics of polynomial-like mappings. Ann. Sci. Ecole. Norm. Sup. (4), 118,287-343(1985). 4. K. J. Falconer, The Geometry ofFractal Sets, Cambridge University Press, (1985). 5. M. Feigenbaum, Quantitative universality for a class of nonlinear transformations. /. Stat. Phys. 19, 25-52 (1978). 6. S. Friedland and J. Milnor, Dynamical properties of plane polynomial automorphisms. Ergodic Theory Dynamical Systems 9, 61-99(19^9)'
7. M. Henon, A two dimensional mapping with a strange attractor. Comm. Math. Phys. 50, 69-77 (1976). 8. M. E. Hoffman and W. D. Withers, Generalized Chebyshev polynomials associated with affine Weyl groups Trans. AMS, 308(1), 91-104 (1988). 9. A. Lopes, A first order level 2 phase transition in thermodynamic formalism. / Stat. Phys. 60(3/4), 395-411 (1990). 10. A. O. Lopes, The dimension spectrum of the maximal measure, SIAM J. Math. Anal. 20(N5), 1243-1254 (1989). 11. A. O. Lopes, Dimension spectra and a mathematical model for phase transition. Adv. Appl. Math. 11(4), 475502(1990). 12. A. O. Lopes, Dynamics of real polynomials on the plane and triple point phase transition. Math. Comput. Modelling, n(9\ 17-32(1990). 13. H. Peitgen and P. Richter, The Beauty of Fractals, Springer, Berlin, (1986). 14. M. Shub and S. Smale, On the existence of generally convergent algorithms. 15. W. D. Withers, Folding polynomials and their dynamics. Amer. Math. Monthly 95i'N5), 399-413 (1988).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
103 Chaos and Graphics
PHASE PORTRAITS FOR PARAMETRICALLY EXCITED PENDULA: AN EXERCISE IN MULTIDIMENSIONA L DATA VISUALISATION DAVI D POTTINGER,* STEPHEN TODD and IAI N RODRIGUES
IBM UK Scientific Centre, Athelstan House, St. Clement Street, Wincheste r S023 9DR, UK and TOM MULLI N and ANNE SKELDON
Clarendon Laboratory, Parks Road, Oxford OXl 3PU, UK l phase space of a system Abstract—Data visualisation technique s are used to investigate thefivedimensiona e of phase portraits is obtained that vividly illustrates of two pendula excited by an oscillatory force. A sequenc the system undergoing a bifurcation as the frequency of the excitation is varied in a certain range. Such pictures provide valuable information on the topological transformation s that the system undergoe s as it approache s chaotic motion. This data visualisation method can also be applied to other multidimensiona l problems where a phase portrait analysis is helpful. 1. INTRODUCTION
It is becoming increasingly apparen t that even relatively simple nonlinear dynamical systems can display an unexpectedl y broad range of effects, including instabilities, bifurcations, and chaos[l, 2]. Due to their complexity, the mechanism s responsible for some of these effects are still not fully understood . Thus, there is great interest in studying model dynamical systems , with the aim of clarifying the role and relevance of typical nonlinear effects, e.g., the transition to chaos. Recently, a detailed analytical and numerical study [ 3 ] of a familiar but still incompletely understoo d nonlinear system, a pair of pendula excited by an oscillatory force, has been carried out. It is very useful to have a visual representatio n of these results as nonlinear effects often have an illuminating geometrica l interpretation. A very general way of doing this is by constructing 3. phase portrait. The examination of phase portraits can help understan d how solutions evolve as an external paramete r is changed . In turn, this can aid understandin g of the mechanism s that give rise, for example, to chaos. This provided the motivation for a joint project between the Nonlinear Systems Group at the Clarendon Laboratory and the IBM European Data Visualisation Group at the IBM UK Scientific Centre. The aim was to develop methods for producing high quality phase portraits using the advance d (experimental ) 3D computer graphics and data base facilities that have been developed at the Centre. Finally, it is worth mentioning that the pendulum problem is also relevant from another point of view, as it provides an interesting example of multidimensional data visualisation. The visualisation methods used for the pendulum system are rather general and thus may also be applied to problems in other fields
where phase portraits can be very helpful, e.g., control theory. 2. THE SYSTEM OF PARAMETRICALLY EXCITED P E N D U LA
The double pendulum consists of two rods, one suspended from the other in such a way that they may only swing in orthogonal directions (see Fig. 1). Such a system has two possible types of pure mode oscillation. One of these modes involves the whole pendulum swinging as a rigid body about the top pivot point and the other has just the bottom pendulum swinging. The equations of motion for this system may be derived using a Lagrangian classical mechanics approach and damping can be added. The parametric excitation moves the top pivot point of the pendulum up and down sinusoidally and may be included in the equations by considering a frame of reference in which the gravitational field, instead of taking the constant value g, varies sinusoidally about g. The result is five first order autonomou s differential equations : two describing how the angular positions of the rods vary with time; two describing how the angular velocities of the rods vary with time and one for the sinusoidal excitation. The numerical study of the nonlinear equations involved the use of path following techniques[ 4, and Technical Note 1] to find where changes of stability of solutions occur as a function of the control parameters . These critical points are known as bifurcations and indicate where there is a transition from one type of behaviour to another [ 1, 2, 5 ]. Both stable and unstable solutions may be followed using these methods. In this way a number of different regions are found: regions where there is no side-to-side motion of the pendulum; regions where either one mode or the other is excited and areas of composite in phase motion of the pendulums. A particularly interesting part of the control * Presen t address : AEA Petroleum Services , Winfrith, Dor- plane is found where no stable regular solutions can set DT2 8DH, UK. be found using these techniques . A stable solution
Reprintedfrom Comput. & Graphics Vol. 16, No. 3, pag. 331-337, 1992
104
DAVI D POTTINGER et al.
must, of course, exist in this region, but they are presumably too compHcate d for the path following methods to deal with. Therefore, in order to look at such regions a direct numerical integration of the equations of motion was carried out. The numerical integration started from an arbitrary set of initial conditions and ultimately converged onto a stable solution, an attractor. There will be a transient phase associate d with this convergenc e and we must integrate for a sufficiently long time to allow this transient to die out in order to observe the correct final solution. Typically, for the value of the damping chosen, this takes around 30 cycles of the excite. In the chaotic regime we integrated over several hundred cycles to be sure that the transients had decayed . A further complication that may arise is there can be more than one solution for the same paramete r values. Some of these solutions may be stable and some unstable. Unlike the path following methods, numerical integration will not detect unstable solutions. Although these solutions would not be observable in an experiment either, they can play an important role in determining the dynamics. Thus, a combination of both numerical approache s must be used to make a complete study of the solution set. In the pendulum problem there are five first order differential equations so these numerical integrations produce a set of five values for successiv e points in time, as detailed above. Thus, each set gives the coordinates of a point in the space spannedby the two angles, their velocities and the excitation coordinate {i\\t phase space of the system). When successiv e points in time are joined up, the result is a curve or trajectory in this phase space and this gives a picture of the motion of the pendulum. For example, if the pendulum is simply moving up and down with the excitation then the picture obtained is just a line along the excitation axis, all other coordinates are zero. If we have a pure mode solution then one of the angles and its associate d angular velocity are zero, whereas the other angle and its velocity vary sinusoidally, in phase with the excitation. The pendulum repeats its motion exactly once every period T, where T'ls twice the period of the sinusoidal excitation. The correspondin g phase picture is a loop passing through three of the five dimensions . Every time the pendulum goes through one oscillation the correspondin g phase space point passe s once around the loop. If both rods are oscillating in phase,the result is again a periodic attractor and the phase portrait is again a loop, but one which now passe s through all five dimensions . If both pendulums oscillate, but the phase between them varies, then the trajectory sits on a torus (a doughnut shaped ring). As stated above, such a motion may be described by two frequencies . These are represente d on the torus as the frequency of the motion around the hole of the torus and the frequency of the motion around the arm of the torus. If the two frequencies are not rationally related then the motion is quasiperiodic . The examination of phase portraits can help understan d how the solutions evolve
as an external paramete r is changed . In turn this can aid ones understandin g of the mechanism s which give rise to chaotic motion. Experimentally there has also been the developmen t of phase portrait reconstructio n techniques [6 ]. These methods reconstruc t a phase portrait from a single time series and are proving invaluable in showing connections between theoretical and experimenta l work in hydrodynamic stability [ 7 ]. 3. COMPUTER GRAPHICS AND DATABASE TECHNIQUES
As a result of the numerical investigations , it is clear that a tool is required for the efficient processin g of the resulting data. Here we describe a method for doing this centered on the use of a data base and graphics system linked by a bridge. In this approach , a user asks queriesabout his data and the result is displayed as a picture. For these exploratory purposes , the pictures generate d can be rather crude, e.g., wire-frame representations . However, becaus e of this, they are quick to generate (of the order of seconds ) and can also be interacted with {e.g., rotated, zoomed, etc.) in real time (with the appropriate equipment). This data exploration process may be iterated until the user is satisfied with the final result. The final image can then be generated using a presentatio n software package , which is more suitable for education or publication purposes . This method has shown itself to be an extremely powerful tool for visualising systems involving large amounts of data, such as those encountere d in chemistry. The specific system developed at the IBM UK Scientific Centre is known as WGS (Winchester Graphics System)[8], and its general structure is given in Fig. 2. The data base holds the data and manipulates it according to user queries. The bridge takes the results of these queries and interprets them to draw a picture: Each row in the result of a query is mapped to one graphics primitive. The graphics displays the picture and lets the user interact with it. The driver takes user commands and routes them to the appropriate subsystem. For the pendulum problem, the data consists of the values of the five phase space variables at successiv e time intervals. The typical number of time slices in the data files is about 6,000. The first task is to use the databas e to select which time slices to display. The full power of the databas e is not as important in this application as in many, and usually a complete file is used. It is sometimes useful to declutter the result by choosing only every nth time slice, or a range of time slices, or slices for which the coordinates lay within (or without) particular ranges. As the system is five dimensional, one then needs to choose which three coordinates are to be used to construct the geometry of a picture, whether other coordinates should be used to control graphics attributes such as colour and line type, and, if so, what mapping from coordinate to attribute should be used. When this has been done, one issues a command that is in-
105
Phase portraits for parametrically excited pendula
driver-
bridge
data base
graphics
Fig. 2. The Winchester Graphics System.
Fig. 1. Snapshot of a double pendulum in motion (taken from video).
Fig. 3. Wire-frame image of two toroidal attractors. Fig. 4. Before the bifurcation. Excitation frequency = 590 (in appropriate units).
Fig. 5. Before the bifurcation. Excitation frequency = 560 (in appropriate units). Fig. 6. Before the bifurcation. Excitation frequency = 530 (in appropriate units). terpreted by bridge as (a) joining up successive points (in the chosen three dimensions) and (b) using graphics to display the corresponding image onto a VDU. This process produces a wire-frame image, such as that in Eig. 3. This figure corresponds to a 3D phase portrait of the double torus attractor. This picture has the following interpretation. Each pendulum oscillates at a slightly different frequency. The trajectory winds first
around one torus and then around the other. On one torus the pendulums oscillate almost in phase, and around the other in near anti-phase. Such a picture is quick to generate and can be interactively rotated, zoomed, etc., in order to obtain a reasonable understanding of its three dimensional structure. However, whilst the overall shape is appar-
106
DAVID POTTINGER et al.
Fig. 7. After the biftircation. Excitation frequency = 520 (in appropriate units).
Fig. 8. After the biftircation. Excitationft-equency= 515 (in appropriate units).
Fig. 9. Before the bifurcation. Excitation frequency = 560 (in appropriate units). The colouring indicates the magnitude of the second angular velocity.
Fig. 10. Before the bifurcation. Excitation frequency = 530 (in appropriate units). The colouring indicates the magnitude of the second angular velocity.
Fig. 11. After the bifurcation. Excitation frequency = 520 (in appropriate units). The colouring indicates the magnitude of the second angular velocity.
Fig. 12. After the bifurcation. Excitation frequency = 515 (in appropriate units). The colouring indicates the magnitude of the second angular velocity.
Phase portraits for parametricall y excited pendula ent, important details are confused and misleading due to the overlap in the trajectories. For instance, it is difficult to distinguish between the back and the front of the image (although this can be partially overcome via interactive slicing along the z-axis). Moreover, a choice of projection can often introduce spurious intersections . This is analogous to the impossibility of drawing a knot on a piece of paper without any crossings. The problem of spurious intersections is made particularly difficult in the pendulum problem becaus e the attractor sits in a five-dimensionalspace. The visualisation problems just mentioned can be overcome by making a (more realistic) solid model of the "object." This was carried out using an experimental 3D computer graphics program known as WINSOM (WINchester SOlid Modeller)[9, see also Technical Note 2 ]. It is an example of a graphics system built on Constructive Solid Geometry (CSG)[10]. In this approach to 3D graphics, objects are defined as sets of points and the standard set-theoreti c operations of union, difference, and intersection can be used to create new, more complex objects. WINSOM has a large set of basic shapes (primitives) that can be "called," e.g., sphere,cylinder, etc. For example, if one wants to draw a (piecewise-constant ) continuous curve from an ordered set of points, one writes something like: let curve = (cylinder (r, point2) at point 1) union (cylinder (r, point3) at point 2) union (cylinder (r, pointn) at point (n + 1)); draw curve; where r is the radius of the solid cylinder and the rest is hopefully self-explanatory . If a smoother curve is required, one can insert a sphere (of radius r) between every pair of cylinders. This simple approach was applied to the pendula data. Thus, after a choice of projection, each 3D point became the centre of a sphere, and successiv e spheres were then unioned with a cylinder to give a smoothed out 3D solid segment . This process was repeated , point by point, until the end of the numerically determined trajectory was obtained. The radius was given a value such that there were no holes or gaps in the resulting solid object. This simulated, in a plausible way, the effect of including the extra data one would have obtained if one had computed even more points on the trajectory. A typical file contained about 25,000 graphics primitives. The generation of the WINSOM files is performed by the same data base to graphics bridge program that constructs the initial interactive displays. The bridge is given an extra option requesting WINSOM output, and told what radius to give to the generate d cylinders and spheres . This radius is usually constant over a complete picture, but may be derived from the data base coordinates if required. The bridge first displays an interactive version of the picture, which the user manipulates to find a good viewpoint. The WINSOM model file is then written, complete with this view information.
107
Within WINSOM, there are also sophisticate d facilities for introducing a large range of effects to increase visual realism; these include highlighting, shading, multiple light sources , surface qualities (such as gloss), y as well as perspective [11]. Such features are necessar if one wishes to obtain a convincing 3D "feel" to images, thereby aiding the interpretation process . In addition, this work has also motivated the development of more specialist graphics techniques to produce improved images of chaotic trajectories and of experimenta l data[7]. These methods have been extremely useful in highlighting the three dimensiona l structures obtained from fluid flow experiments and helped establish connection with finite dimensiona l models. 4. VISUALISATION AND INTERPRETATION OF THE 3D PHASE PORTRAITS
We now present the results of using WINSOM in the manner described above to create phase portraits for the pendulum system. The projection is obtained by picking three out of thefivecoordinates and plotting only these. As long as we pick a combination involving either the position or velocity of the top angle, and one relating to either the position or velocity of the bottom pendulum we should obtain a portrait that contains the most important features of the motion of the system. Different projections should show qualitatively the same behaviour. For Figs. 4 to 12, the coordinates chosen are the top angle and its angular velocity and the bottom angle. The projection is chosen in this way to make the interpretation of the portraits easier. A brief, popular account of some of the following results can be found in [12]. 4.1. The basic bifurcation sequence Firstly we show a sequenc e of portraits of two separate attractors colliding to form a single attractor (Figs. 4-8). The start of the sequenc e (Fig. 4) shows two separat e tori coloured in different colours to indicate that they are distinct, i.e., they are separat e solutions to the equations that occur for the same paramete r values. The particular version obtained in the numerical simulation is dependen t on the starting conditions. Each torus represent s both pendulums swinging, but at a constantly changing phase to each other. The equations are invariant under reflection through an axis and this symmetry is apparen t in these attractors. Notice that each torus has two twists in it. The two separat e attractors appear to intersect, but this is an artifact of the particular projection, as in the fufl five dimensional space it is known that there are no intersections [1,2]. For these two tori, although the attractors sit in five dimensions it is clear that the projection onto two dimensions with some idea of a third dimension through the use of WINSOM gives a good indication of the behaviour of each single attractor. We now investigate how these attractors evolve as we decreas e the excitation frequency. Figures 5 and 6 contain portraits for successivel y lower excitation frequencies. They show that although these two tori are still two distinct attractors, the angle between them has become smaller and smaller and there is a thickening
108
DAVI D POTTINGER et al.
of the tori on one side. This correspond s to the pendulum spending more time in states along this edge. This thickening is interesting as it shows the presenc e of a saddle periodic orbit sitting between the two tori. A saddle orbit is attracting in some directions but repelling in others. This means that a numerical integration may approach such a solution from the stable directions but will ultimately head away along the repelling directions. When the frequency is reduced further, the two tori join to become one attractor as shown in Fig. 7. The trajectories have spent longer and longer on the thickened edge of the torus until the tori actually touch along this edge. The exact point where this occurs is very difficult to observe numerically or experimentally as it is structurally unstable and hence, any small change in the external parameter s causes a topological change in the attractor. However, key indications of the presenc e of such an orbit are the very long time to pass once around the surface, and the trajectory spending a particularly long part of this time close to a fixed point or periodic orbit. In our case, this is the saddle periodic orbit mentioned above. This type of behaviour is known as a homoclinic connection[ 1,2]. If the excitation frequency is reduced further (Fig. 8) then this single attractor loses the rib or thickening, which was a sign of the homoclinicity. Notice also that the twists in the original tori are essentia l to facilitate the sticking together process . The twisting allows one edge of one torus to stick to one edge of the other. The end result is still a torus (it can still be described by two frequencies) , but one that is twisted in such a way that it cannot be observed without intersection in three-dimensions . Such a sequenc e of e events is called a gluing bifurcation[ 13]: gluing becaus two separat e attractors have been stuck together; bifurcation becaus e the number of distinct solutions has changed. This sequenc e has also been investigated using a different projection. The projection is again chosen by picking three of the five coordinates , this time these coordinates being the top angle, the bottom angle and its angular velocity. The sequenc e shows the same pattern of events, but this time the homoclinic thickening appears on the "inner" rather than the "outer" edge[14]. 4.2. The bifurcation sequence in more detail It is clearly of interest to try to incorporate some information about the behaviour of the system in the other two dimensions . This can be achieved, to a certain degree,by incorporating colour. One way of doing this is to give a point on the surface a colour whose "value" is related to the correspondin g value of the chosen variable. Obviously, this use of colour is motivated by scientific rather than aesthetic considera tions, and its practical usefulnes s should be interpreted in this light. The results are shown in Figs. 9-12, which are refinementsof Figs. 5-8. The three coordinates projected onto the screen are the two angles defining the position of the pendulum and the velocity of the top pendulum. The colouring on the attractors represent s the mag-
nitude of the velocity of the lower pendulum. For the first picture in the sequenc e the red-yellow torus is red where the velocity is smallest. We see that the torus t the two has two bands of red. These patches represen points in one swing of the pendulum when the velocity goes through zero and the pendulum changes direction. For the blue-green torus, green plays a similar role to the red. As the external paramete r (the frequency) is changed and the two tori approach , we see that the rib that develops has a "slow" tinge to it. This becomes more pronounced as we get closer and closer to the touching of the two separat e attractors. It therefore indicates that along this edge the attractors are approachin g an orbit where the velocity of the bottom pendulum is zero and only the top angle varies. In a physical realisation, we would observe the pendulum oscillating for a long period with just the top angle varying, and hence the whole pendulum swinging about the top pivot as a solid body. During this time the bottom angle and velocity would be almost zero. Then over a short time the bottom pendulum would begin to swing with larger and larger amplitude and then equally rapidly these oscillations would die away again and the motion would return to only the top angle varying. As the parameter s are varied so that the system passe s through the gluing bifurcation we see that this slowing down is associate d with the ribbing and that as the rib is lost the slow colour along the edge is also lost. Finally, a computer-generate d movie of this interesting bifurcation effect has also been made [15] and is available on request. It shows, in detail, how (by an animation in time) a phase portrait is generate d and also (by an animation in frequency) how the attractors come together and join. If the external paramete r is changed further, the smooth surface breaks up as the motion of the pendulum becomes chaotic. Figure 13 shows a Poincare
eSx. \
\
so Fig. 13. Poincare Cross Section (non-chaotic motion).
Phase portraits for parametricall y excited pendula
109
visualising multidimensiona l systems . One possibility that is currently being investigated is the use of texture mappings to represen t five dimensiona l systems [17]. Another is the implementation of real-time rotation of n-dimensiona l objects (n > 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.25 1.0 1.0> <0.0 0.0 0.0> <0.500 0.0 0.0> -0.250} plane{<1.0 0.0 0.0> 0.75 inverse} intersection // an infinite cylinder truncated by a plane quadric{<0.0 1.0 1.0> <0.0 0.0 0.0> <0.0 0.0 0.0> -0.002500} plane{<1.0 0.0 0.0> 0.75} } bounded_by{box{<0.0 -0.13 -0.13> <1.0 0.13 0.13>}} // used to speed up rendering clipped_by{box{<0.0 -0.13 -0.13> <1.0 0.13 0.13>}} // 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<0.0 0.0 +90.0>} #declare Arrow^Z = object{Arrow_X rotate<0.0 -90.0 0.0>} // 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.0 0.0 0.0> 0.0500} texture{Axes_Texture} } bounded_by{box{<-0.1 3 -0.13 -0.13> <1.0 1.0 1.0>}} } 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{<0.0 1.0 1.0> <0.0 0.0 0.0> <0.0 0.0 0.0> %f}\n" , -r*r); fprintf(dataFile," plane{<1.0 0.0 0.0> -1 inverse}\n"); fprintf(dataFile," plane{<1.0 0.0 0.0> 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
116
/* position a sphere at each point without any links */ for(i=0; i
WriteSphere(FILE *dataFile, int index)
/* position a sphere at the proper XYZ location */ fprintf(dataFile," object\n {\n"); fprintf(dataFile," sphere{<%f %f %f> %f}\n", x[index], y[index], z[index], r); if(HasColors) /* write red, green, and blue color component s stored in R, G, & B arrays */ fprintf(dataFile," texture{color red %.5f green %.5f blue %.5f}\n }\n", R[index], G[index], B[index]); else fprintf(dataFile," }\n"); } void WriteSegment(FIL E *dataFile, int index) { /* first calculate the necessar y transformation s for the unit segmen t and */ /* store the results in the global variables length, theta, phi, mx, my, and mz */ CalculateTransformations(index) ; /* now form a composite object from a sphere and a properly positioned segmen t */ fprintf(dataFile," composite\n {\n"); fprintf(dataFile," object\n {\n"); fprintf(dataFile," sphere{<%f %f %f> %f}\n", x[index], y[index], z[index], r); if(HasColors) /* write the red, green, and blue color component s */ fprintf(dataFile, " texture{color red %.5f green %.5f blue %.5f}\n", R[index], G[index], B[index]); fprintf(dataFile," }\n"); /* the next several lines put the unit segmen t into the proper position */ {\n"); fprintf(dataFile, " object\n fprintf(dataFile," intersection\n {\n Seg_X\n"); fprintf(dataFile," scale <%f 1.0 1.0>\n", length/2); fprintf(dataFile," rotate <0.0 %f %f>\n", theta, phi); fprintf(dataFile," translate <%f %f %f>\n }\n", mx, my, mz); if(HasColors) /* average two data points to get the segmen t color */ fprintf(dataFile," texture{color red %.5f green %.5f blue %.5f}\n", (R[index]+R[index-l])/2, (G[index]+G[index-l])/2, (B[index]+B[index-l])/2); fprintf(dataFile," }\n"); /* define a bounding box for the completed segmen t */ fprintf(dataFile," bounded_by\ n {\n"); fprintf(dataFile," box\n {\n"); fprintf(dataFile," <%f %f %f> <%f %f %f>\n", -(length/2+r), -r, -r, length/2+r, r, r); fprintf(dataFile," rotate <0.0 %f %f>\n", theta, phi); fprintf(dataFile," translate <%f %f %f>\n", mx, my, mz); fprintf(dataFile," }\n }\n }\n"); } void CalculateTransformations(in t index) { float xl , x2, yl,y2,zl,z2; float dx, dy, dz, signFlag; /* first store the necessar y data in local variables */ xl = x[index]; x2 = x[index-l]; yl = y[index]; y2 = y[index-l]; zl = zfindex]; z2 = z[index-l]; /* calculate scale factor */ dx = x2-xl; dy = y2-yl; dz = z2-zl; length = sqrt(dx*dx + dy*dy + dz*dz); /* calculate rotations about the y-, and z-axes */ if(length < le-15) { theta = 0; phi = 0; } else { if(dx<0) signFlag = -1.0; else signFlag = 1.0; theta = -signFlag*asin(dz/length) ; phi = signFlag*M_180_OVER_PI*asin(dy/length/cos(theta)) ; theta *= M_180_OVER_PI; }; /* calculate x-, y-, and z-coordinate translations */ mx = (xl+x2)/2; my = (yl+y2)/2; mz = (zl+z2)/2;
117
118
M. T. RosENSTEi N and J. J. COLLINS
// lorenz.pov ... POV-Ray scene for rendering the data set described by lorenz.inc // first load the basic POV-Ray include files #include "shapes.inc " #include "colors.inc" #include "textures.inc" // now load the include fil e from Listing 1 and the .inc fil e describing the data #include "axes.inc" #include "lorenz.inc" // position the camera camera { location <-100.0 -10.0 130.0> direction <0.0 0.0 1.25> up <0.0 LO 0.0> right<-1.5 0.0 0.0> look at <0.28-12.0 44.0> } // position the axes composite { Axes_XYZ scale <40.0 40.0 40.0> translate <12.82 -28.0 -100.0> } // position a checkere d "floor" object { plane{<0.0 1.0 0.0>-39.0} texture { checker color Gray50 color Gray55 scale <50.0 50.0 50.0> ambient 0.9 diffuse 0.2 reflection 0.20 } } // position a light source object{ light_source {<-80.0 60.0 54.0> color White} }
Listing 3. POV-Ray scene file used to generate Figs. 1-6. During the filtering process, the x-, y-, and z-coordinate times series were separatel y filtered via the above difference equation. The value of« was computed from the desired cutoff frequency, cocutofr, {e.g., see the captions to Figs. 3-5) using the following equation:
tt^cutoff correspond s to the — 3 dB point, i.e., the halfpower point, of the filter.) Each set of filtered time series was then used to create a three-dimensiona l raytraced image. 3. GRAPHICS GENERATION
(This relation was derived from the assumption that
As a graphics engine, we chose the Persistenc e of Vision Raytracer (POV-Ray)[9,10], which is available for a number of computer platforms: Macintosh, MSDOS, Amiga, UNIX , X-Windows, and VAX . (Other
Fig. 1. Unfiltered Lorenz attractor. The theoretical Lyapunov dimension is 2.067.
Fig. 2. Severa l frames from a computer animation which illustrates the effects of filtering chaotic signals.
(2 = 2 -
c os COcutofT •
VcOS^OJcutofT -
4 COS Wcutoff +
3.
119
Visualizing filtered chaotic signals platforms, e.g., Silicon Graphics, Sun, are supported by compiling the C source code on the desired system.) POV-Ray images are represente d using a rich scene description language ( S D L ), and Listing 1 gives a brief example of a limited number of the SDL's features. A software utilit y was developed to convert a threedimensional time series into a model compatible with the POV-Ray SDL. This utilit y generate d an ASCII "include" file, which defined a sphere for everv 3D data point and a truncated cylinder as a link between successiv e spheres . (A similar utility[11] is available from the same sources that distribute POV-Ray.) Moreover, a color was associate d with each sphere and its link to the previous sphere. (Section 4 describes the color-coding scheme. ) This gave the data set the appearance of a multi-color, winding "tube." Listing 2 shows the core C functions needed to define a tube. Once the POV-Ray include file was created, th^ data set was rendered using the scene file described in Listing 3. Running on an Apple Quadra 700 computer, POVRay required approximately 16 hours of computation time to generate a 1023- X 682-pixel image. However, through the generous use of POV-Ray "bounding objects," we were able to speed up the ray-tracing by 500-800%. (The computationa l savings results from POV-Ray's ability to eliminate the calculations associated with a group of objects, except when a given light ray intersects the group's bounding object.) 4. RESULTS
Figure 1 shows a ray-traced model generate d from the unfiltered Lorenz data set. The color scheme used i n the figure conveys supplementa l information about the system's history. Specifically, a violet-blue hue refers to the oldest states of the system, whereas an orangered color indicates the system's most recent output. Note that the system trajectory, i.e., sequenc e of states, is bounded in space; therefore, the trajectory tends to pass repeatedly near previously traversed regions of state space. This trait is important because similar temporal patterns are necessar y if two points are to be nearby in state space. Thus, one can expect spatially
Fig. 4. Filtered Lorenz attractor with lowpass cutoff frequency (cocutoff) of 0.0628 rad (2.0 Hz). The theoretical Lyapunov dimension is 2.119.
close points to behave similarly under the influence of a temporal filter. Figure 2 shows several frames from a computer animation that was developed for pedagogica l purposes as well as a research tool for examining and understanding the effects of filtering chaotic signals. By associating higher degrees of lowpass filtering (i.e., lower cutoff frequencies ) with elapsed time, the animation illustrates the primary features of filtered chaotic signals. For example, as one lowers the cutoff frequency, energy is removed from a signal until only the DC component remains. Hence, in terms of the geometry, the attractor collapses toward its mean position with increased amounts of filtering. (However, a given point actually moves toward its local mean^ before converging upon the global mean. Thus, some points may first drift away from the global mean.) For presentatio n purposes , we magnified three representative frames of the animation to produce Figs. 3-6. Lik e Fig. 1, these images communicate additional information through a color scheme. Specifically, we related the colors to a scale factor, Fscaie, which was based on the spatial effects of the filter:
disti disto '
where disti is the distance from a filtered point to its original, unfiltered location, and disto is the distance from the unfiltered position to its global mean. As indicated by the legends in Figs. 3-6, a scale factor between 0.0 and 1.0 is associate d with a change in color from violet to red, whereas a scale factor greater than 1.0 correspond s to a reduced saturation (i.e., a whitening) of the red hue. With minimal filtering, one observes littl e change in the geometry of the attractor and, therefore, littl e change in the system's fractal diF'ig^ 3. Filtered Lorenz attractor with lowpass cutoff frequency ('•^cutoff) of 0.2513 rad (8.0 Hz). The theoretical Lyapunov dimension is 2.067.
^ "Local mean" here refers to the mean value calculated from a window of data centered about a given point.
120
M. T. RosENSTEi N and J. J. COLLINS
Fig. 5. Filtered Lorenz attractor with lowpass cutoff frequency (^cutoff) of 0.0157 rad (0.5 Hz). The theoretical Lyapunov dimension is 2.477.
mension.^ This fact is supported by the predominantly violet-blue color of the filtered attractor in Fig. 3. With increased filtering (Figs. 4 and 5), however, the attractor's geometry undergoes a scale change and the appropriate colors shift closer to the red end of the spectrum. Perhaps the most important feature to notice in Figs. 3-5 is the nonuniform coloring of the filtered attractor. We interpret this result as a shape change regardless of overall scale. Thus, different portions of the attractor move (as a function of cocutoff) toward the global mean at varying rates. This phenomeno n is due to the filter's selective attenuation of points associate d with the highest frequencies . As best revealed by Fig. 6, the attractor is transformed from its normal configuration (roughly two planar lobes for the Lorenz system) to one that is more convoluted or space-filling (over a smaller volume).* Thus, filtering causes a nonuniform scale change, i.e., a shape change that manifests itself as a dimension increase for chaotic systems. 5. SUMMARY We demonstrate d that data-visualizatio n techniques are useful as a novel means to understandin g existing problems in nonlinear dynamics. Specifically, we utilized three-dimensiona l ray-tracings to examine the effects of filtering chaotic signals. The images presente d in this paper were derived from a computer animation that was designed to show the mechanism s underlying the observed increase in fractal dimension. We found ^ For comparison with previous work [3-6], the captions to Figs. 1, 3, 4, and 5 present the closely-relate d "Lyapunov dimension" in lieu of the ft-actaldimension. The Lyapunov dimension (as calculated using the Kaplan-Yorke conjecture [12]) relates fractal dimension to the stretching and folding quantified by a dynamical system's Lyapunov exponents . * Figure 6 also best illustrates the filter's "end effect" (which becomes more apparen t as one lowers the cutoff frequency): the first data point (violet-colored) remains anchored to its original location.
Fig. 6. Magnification of the image in Fig. 5.
that lowpass filters can induce a nonuniform convergence to a system's mean state-spac e position. With chaotic systems, this convergenc e results in a distortion of the attractor's geometry such that the observed system acquires greater complexity and, therefore, increased dimensionality. Acknowledgements—We would like to thank L. S. Rosenstei n for providing CPU time on the Quadra 700 computer. This work was supported by the Rehabilitation Researc h and Development Service of Veterans Affairs and the National Science Foundation (Grant BCS-9308659) . REFERENCE S 1. J.-F. Colonna, The subjectivity of computers . Comm. ^CA/36(8), 15-18(1993). 2. J.-P. Eckmann and D. Ruelle, Fundamenta l limitations for estimating dimensions and Lyapunov exponents in dynamical systems . Physica D 56, 185-187 (1992). 3. R. Badii, G. Broggi, B. Derighetti, and M. Ravani, Dimension increase in filtered chaotic signals. Phys. Rev. L^//. 60(11), 979-982 (1988). 4. F. Mitschke, M. Moller, and W. Lange, Measuring filtered chaotic signals. Phys. Rev. ^ 37( 11), 4518-4521 (1988). 5. A. Chennaoui , K. Pawelzik, W. Liebert, H. G. Schuster , and G. Pfister, Attractor reconstructio n from filtered chaotic time series. Phys. Rev. /4 41(8), 4151-4159 (1990). 6. D. S. Broomhead , J. P. Huke, and M. R. Muldoon, Linear filters and non-linear systems . J. R. Stat. Soc. B 54(2), 373-382(1992) . 7. P. Grassberge r and I. Procaccia , Characterizatio n of strange attractors. Phys. Rev. Lett. 50(5), 346-349 (1983). 8. E. N. Lorenz, Deterministic nonperiodic flow. J. Atm. Sci. 20(2), 130-141 (1963). 9. POV-Ray is available free of charge from a number of commercial online sources , as well as from the Internet by anonymous FTP to alfred.ccs.carleton.c a (134.117.1.1) . 10. T. Wenger, Image Lab, Waite Group Press, Corte Madera, CA(1992). 11. Connect The Dots Smoother (CTDS), version 2.20 by Truman Brown (1993). 12. J. Kaplan and J. Yorke, Chaotic behavior of multidimensiona l difference equations . In Functional Differential Equations and the Approximation ofFixed Points, Lecture Notes in Mathematics , Vol. 730, H. O. Peitgen and H. O. Walther (Eds.), Springer, Berlin, p. 228 (1979).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. Al l rights reserved
121
Chaos and Graphics
OSCILLATING ITERATION PATHS IN NEURAL NETWORKS LEARNING R A O L R O J AS
Freie Universitat Berlin, Institut fii r Informatik, Takustr. 9, Berlin 14195, Germany Abstract—In this paper we show that finding optimal combinations of learning and momentum rate for the standard backpropagatio n algorithm used to train neural networks involves difficult trade-offs. Gradient descen t can be accelerate d with a larger step size and momentum rate, but the stability of the iteration . We show in which cases backpropagatio n produces process is affected by certain combinations of parameters an oscillatory behavior and how its simple feed-back nature can lead to chaotic iterations. Some graphics illustrate the kind of problems which can be found when applying backpropagatio n and which are often disregarded . 1. INTRODUCTION Neural networks can be defined as directed graphs of computing elements in which the nodes of the network evaluate a certain primitive function of their input [ 1 ] . Information flows through the edges of the network, where it is multiplied by the correspondin g edge's weight. Learning in neural networks consists of finding the appropriate weights so that a given function can be approximated by the network as closely as possible. Starting with random weights, an iterative process refines the network's parameter s until a good enough approximation to the given function has been found. The function to be approximated is known usually only from a set of input-output examples, i.e., the training set. The error function of the network measure s the deviation between desired and current output for a given input from the training set. In most cases it is a continuous and differentiable function of the network's weights, and a simple strategy, lik e gradient descent, can lead to optimal weight combinations. The standard backpropagatio n algorithm is just a straightforward implementation of gradient descent on the error function. If the weight adjustments are done immediately after each pattern presentatio n we speak of on-line backpropagation . If the weight adjustments are done after all input patterns have been processe d with the network and all deviations have been measui*ed, we speak of off-line or batch backpropagation . The size of the correction step in the negative gradient direction is determined by a constant called the learning rate. A popular variation of the basic learning algorithm is the introduction of a momentum term. The gradient of the error function is computed for each new parameter combination but instead of just following the negative gradient direction, a weighted average of the current gradient and the previous correction direction is computed at each step. This average is used as the new correction direction. Theoretically, this approach should provide the search process with some inertia and could help to avoid excessive oscillations in narrow valleys of the error function. However, there is empirical evidence that trying to adjust the learning and momentum rate to minimize the processing time is a hard
computational problem. It has also been shown that backpropagatio n leads to chaotic behavior in the case of continuous u n i t s [ 2 ]. In this paper we show what are the trade-offs involved in choosing a specific learning and momentum rate, and that chaotic behavior can also be observed in the discrete case with the backpropagation feed-back rule and large momentum rates. We show, moreover, that such large momentum rates are necessar y when the optimal size of the learning step is unknown and the form of the error function is highly degenerate . In standard backpropagation , as explained before, some input-output patterns are fed into a network, and the error function E is determined at the output. In a network with n different weights Wi, W2,. . . , w„ the /th correction step for weight Wk is given by dE Awkii) = -JT—-^ dWk
aAwkii-
1),
where 7 and a are the learning and momentum rate, respectively. Normally we are interested in accelerating the convergenc e to a minimum of the error function, and this can be done by increasing the learning rate up to an optimal value. Several fast learning algorithms for neural networks work by trying to find the best value of 7, which still guarantee s convergence . The introduction of the m o m e n t um rate allows the attenuation of oscillations in the iteration process. Adjusting both learning parameter s to yield the best possible convergenc e is normally done by trial and error, or even some kind of random search [ 3 ] . Since the optimal parameter s are highly dependen t on the learning task, no general strategy has been developed to deal with this problem. In this paper we show why some paramete r combinations yield poor results. 2. THE LINEAR ASSOCIATOR Let us first consider the case of a linear associator , that is, a single computing element with associate d weights Wi, W2, .. ., Wm and, which for the input Xi, X2, ..., Xnt produces WiXi -\- • • • -\- w^Xm^s output.
122
R. ROJAS
The input-output patterns in the training set are the p Ax{i) = -2yax + aAx{i - 1) ordered pairs (xi, >^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
o g
•-
H 13 U
>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 V W CN V "fd n3 t i II CD td td Q) >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
•p td H II (L) O P! ^
m
\-H
(d -K 1+-I *
H \-H
o o o
O O O H CN m 'sT in vD m CO f^ m m ro
•
II
O O (X) O O O C T i O i - H C N r o ^ L D CN ro HrHCNCNCNCNCNCN
o o o o o o o o
131
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
133
Chaos and Graphics
EVALUATIN G PSEUDO-RANDOM NUMBER GENERATORS RICHARD L . BOWMAN
Departmen t of Physics, Bridgewater College, Bridgewater, VA 22812, USA, e-mail: r.l.bowman @bridgewater.ed u Abstract—The graphing and computationa l capabiUties of Mathematica provide a quick and visual route to evaluating various characteristic s of pseudo-rando m number generators . This paper is a tutorial on using some simple statistical and graphical technique s for studying the output of such generators . In addition, a simple congruentia l generato r with modulus TT, whose output is shown to be reasonabl y uniform and independen t (according to the tests describe d here), is introduced. 1. INTRODUCTION
The ability to construct a sequenc e of random numbers is crucial to a variety of computing tasks, from designing arcade games, to generating fractals, to using Monte Carlo techniques . The graphing capabilities of Mathematica (a software package for solving a variety of mathematica l problems in algebra, graphics, statistics and calculus) [1] provide a quick, visual route to evaluating some of the characteristic s of pseudorandom number generators . This paper is a tutorial on some simple statistical techniques for testing the output of such generators . The study of the practical and theoretical aspects of the generation of random numbers dates at least back to the invention of dice. In this century, a number of tables of random digits were produced from census figures (by L. H. C. Tippett in 1927) and by other means (such as the machine ERNIE in the 1930s) [2] . Only in the past few decade s has this area of researc h taken leaps forward with the advent of fast electronic computers and various stochastic modelling programs needing good algorithms for generating sequences of random numbers. Only such physical processe s as the decay of the nucleus of a radioactive element, the selection of a colored ball from a well-stirred container of different colored balls, and the noise in an electronic circuit are technically considere d random events. However, the amplitude of several component s of electronic noise are now known to depend on the frequency of the signal. Thus the distinctions between random and pseudo-rando m numbers will be left to the theoreticians. In the remainder of this article, the usual convention of using the term "random number" to refer to an element of a sequenc e of pseudo-rando m numbers generate d by a numerical algorithm will be followed[3]. In this paper, I limit my discussion to random numbers on the interval [0, 1) and to algorithms that approximate a sequenc e of statistically independen t random numbers distributed uniformly over this interval. First, I examine tests of the uniformity of the distribution of a sequenc e of random numbers. Then I look at several techniques for probing how independen t any element of a random number sequenc e is from the
preceding and following elements of that sequence . The output from several random number generator s wil l be explored including that from congruentia l generators with integer parameters , a generato r with an irrational modulus, the RND function in BASIC on a Commodore 64, and the Random[] function in Mathematica. 2. LINEAR CONGRUENTIAL GENERATORS
Linear congruentia l random number generator s [4, 5] produce a sequenc e of non-negative numbers in [0, 1), {f/i} , where Xi = (aXi^i + c)modM
(1)
Ui=Xi/M
(2)
and the multiplier a, the shift c, modulus M, and seed, XQ, are integers in the range [0, M ~ 1]. Press[3] refers to these generator s as ' 'quick and dirty'' since the necessar y code requires only a couple lines in a FORTRAN program. A number of choices for parameter s (for "good" and "bad" generators ) are presente d in several sources [ 2 - 8 ]. As a running example to show my testing techniques,a generato r labelled as a "Linear Congruentia l Generato r eXample" (LCGX) will be used. The LCGX has a = 157, c = 1, Xo = 2 and M = 2048. Other examples will be examined after the tests have been developed . 3. TESTS FOR UNIFORMITY OF THE DISTRIBUTION
3.1. Bar chart plots There are a number of nonuniform distributions of random numbers that are useful in the physical sciences, computer science and mathematics . However in an electronic computer these are generally approximated starting with a uniformly distributed random number generator[3]. So to limit the scope of this article, I restrict the discussion to uniformly distributed sequence s of random numbers. A finite set of uniformly distributed numbers is one in which each possible number has an equal probability of occurring in the set[2]. Since the interval of study is infinite and the random number sequence s are
Reprintedfrom Comput. & Graphics Vol 19, No. 2, pag. 315-324, 1995
134
R. L. BOWMAN
I n [ 5] : = r d [ x _ ] := ( r a n i = Take[ran,x];pts
x;)
The first 500 numbers in this list are then selected, sorted into ten subunits in the interval [0, 1), and plotted in a bar graph (Fig. 1).
Fig. 1. Bar chart of the counts of random numbers, for the first 500 numbers produced by the Hnear congruentia l generato r example (LCGX) described in the text, in each of ten equal subintervals in the interval [0, 1).
finite, this definition can be tested by subdividing the range of the random number sequenc e into equal subintervals and counting the number of elements in each such subinterval. As the sample size of the sequenc e gets larger, the interval can be divided into smaller and smaller subintervals. A simple bar chart wil l help in visualizing the degree of uniformity of the random number sequence . Loading a graphics package in Mathematica wil l enable the displaying of bar charts. Two statistical packages wil l also be loaded for later use. In[l ] : = ((Graphics' Graphics' ((Statistics' Descripti veStatistics' ((Statistics' HypothesisTests' Next, a list of 6144 random numbers is created as output by the LCGX. The operator Short[] provides a shortened printing of a list (array) in Mathematica. In the case below, only the first sixteen elements and the last eight elements are printed. The remaining 6120 numbers in the middle of the list are represente d by " ( ( 6 1 2 0 ) ) ." In[3]ptsmax = 6144; rnd = 2; Short [ran = Table [rnd = Mod[N[157 rnd + 1],2048]; rnd/2048, {i,ptsmax} ] ,6 ] O u t [ 4 ] / / S h o r t= {0.153809, 0.148437 0.913086, 0.305176, 0.990723, 0.543945, 0.35498, 0.732422, 0.27002, 0.399902, 0.393555, 0.785156, 0.788574, 0.643066, 0.961914, 0.806641, ( ( 6 1 2 0 », 0.386719, 0.715332, 0.282715, 0.307617, 0.533203, 0.713379, 0.296387, 0.000976562 A function is then defined that wil l pick different quantities of these numbers as are suitable for the various tests to be performed.
In[6] := rd[500]; rs = Sort [ r a n ] ; j = 1; subint = 0.1; nint = T a b l e [ l , { l / s u b i n t } ] ; n i n t [ [ l ] ] = 0; D o [ I f [ r s [ [ i ] ] < ( j subint), n i n t [ [ j ] ] = n i n t [ [ j ] ] + l,j=j + l], {i,pts}]; nint Out[124] = {50, 54, 55, 56, 51, 44, 49, 51, 43, 47} In[125] : = BarChart[nint] The flatness of the histogram in Fig. 1 wil l be tested later with a chi-squared procedure. What happens qualitatively to the flatness of the plot if more random numbers are included? In[126] : = pts = 2000; rnd = 2; ran = Table [rnd = Mod [N [157 rnd + 1 ] , 2048]; rnd/2048, {i,pts}]; rs = Sort [ r a n ] ; j = 1; subint = 0.1; nint = Table[1,{1/subint}]; n i n t [ [ l ] ] = 0; D o [ I f [ r s [ [ i ] ] < ( j subint), n i n t [ [ j ] ] = n i n t [ [ j ] ] + lj=j+l], {i,pts}]; nint Out[131] = { 2 0 3 , 2 0 1 , 2 0 1, 197,200, 197, 198, 198,203,202} In[132] : = BarChart[nint] The resulting histogram for 2000 points (Fig. 2) appears even flatter than that for 500 points. In fact its flatness is misleading since the generation of 2000
Fig. 2. Bar chart of the counts of random numbers, for the first 2000 numbers produced by the LCGX, in each of ten equal subintervals in the interval [0, 1).
Evaluating pseudo-rando m number generator s numbers brings the generato r very close to completing one cycle. The quantity of random numbers produced by a generato r before it repeats the whole sequenc e is called the period of the generator . Even bad linear congruentia l generator s should produce a uniformly flat histogram during any complete period. This will be more fully explored later. 3.2. Mean and standard deviation of the sequence Can the uniformness of the distribution of random numbers in a sequenc e be quantified? Certainly Mathematica can calculate the mean and standard deviation of a sequenc e of random numbers with the package Statistics" DescriptiveStatistics". In[17] : = u = Mean [rani] sigsq = StandardDeyiation[ranl]^2 Out [17] = 0.485846 Out[18] = 0.0816118
135
Out [146] = 200. Out[147] = 0.25 The meaning of this value of x^ can be investigated by finding the probability of this value arising from pure chance selection. The Mathematica package . Statistics" HypothesisTests", must be loaded to quickly calculate this quantity. In[181] : = ChiSquarePValue [ chisq,! /subint-1] Out[181] = OneSidedPValu e -^ 1.48902 10"^
ChiSquarePValue [] is a hypothesis test which gives as output a probability that the value of x^ (given the number of degrees of freedom) could be as large as it is if the hypothesize d model is true and the deviations are due to random errors [11]. In this particular case, the degrees of freedom for this model are given by the term (1/subint-1) = ( l / . l ) - 1 = 9. This test is implemented such that the output ranges For a uniform infinite distribution in the interval [0, from 0 to 0.5 and back to 0 again instead of from 0 1), /x should be \ and G^ should be n- For a uniform to 1. So for small /?-values associate d with small x^ finite sequenc e of 2000 numbers, these values can be values, the /?-values need to be subtracte d from 1 to calculated in Mathematica. match the usual table of x^ values {e.g., 9 ]. In the above calculation, the table /?-value is really In[19] : = 0.9999985. theory = Table[N[x/2000], {x,0,1999}]; One must take care when interpreting this value of utheory = Mean [theory] probability in the x^ test becaus e 2000 points are near sigsqtheory = StandardDeyiation[ theory] ^2 one complete period for the LCGX. Morgan[10] has Out[20] = suggeste d that some generator s may have too good of 0.49975 a fit as well as some may have too poor of a fit. Out[21] = In addition, if the output from a linear congruentia l 0.083375 generato r such as the LCGX is studied for one full period, then x^ will equal zero since the actual freSo it appears , from a comparison of the sample fi quency of numbers in each subinterval will be equal and G^ with the above theoretical values, that the out- and will match the expected frequency [5] . The period l generato r will need to be put from the LCGX is adequatel y uniform (but re- of a linear congruentia member that it is abnormally so becaus e of having looked at more closely. nearly completed one period). This can be quantified further by using a chi- 3.3. Periodicity of the generator squared test or the Kolmogorov-Smimov test[5, 9 ]. The theoretical periods over which different types In using the x^ test, the null hypothesis is assumed , of linear congruentia l generator s repeat their sequenc e i.e., the experimenta l numbers and the theoretical of numbers have been extensively studied and deternumbers are assume d to be drawn from the same set, mined [2] . The LCGX is a full-period generator , and and thus any differences between the two are due to thus its period is equal to its modulus, 2048. The bar chance alone. A large value of x^ means that this chart for a sequenc e of 2000 numbers should therefore null hypothesis can be rejected with some level of appear nearly flat. confidence, x^ can be calculated for frequencies of Fast Fourier transforms (FFT) can be used to study numbers in subintervals by summing up the quantity the periodicity of a data set and are readily calculated (observed frequency-expecte d frequency)^/(expecte d and plotted using Mathematica. To make certain that frequency) for each subinterval. x^ values can be the first term does not dominate the output, the mean readily calculated in Mathematica. of the sequenc e (theoretically this is 0.5) must be subtracte d from each random number. The first term e is simply the sum of all of the elements of the sequenc In[146] : = divided by the square root of the number of elements expect = pts subint , i.e., in this case, the mean value of chisq = Apply [Plus, (nint expect )^2I expect ] in the sequence
136
R. L. BOWMAN
Fig. 3. Fourier coefficients calculated using Fast Fourier Transforms indicating the periodic structure of the random number sequenc e (6144 elements ) generate d by the LCGX.
Fig. 4. Plot of 5000 random numbers in the order in which the LCGX generate d them already suggestin g a lack of randomness .
the sequenc e (0.5) multiplied by Sqrt[6144] which is approximately 39. (See Wolfram[12] for the form of the equation that Mathematica uses to calculate the EFT.)
[(Ui,Ui+u Ui+2)} will show how close to being " 3distributed'' a sequenc e of random numbers is. Before looking at the plots of the 2-tuples and 3tuples (as these pairs and triplets are called), a plot of the random numbers in the order of their generation may show us some lack of randomnes s even at the 1distributed level.
In[33] : = ListPlot [ Abs [ Fourier [ ran-.5 ] ], PlotJoined-^True, PlotRange^{ { 0,pts/2} ^11} ] Only half of the FFT is plotted, since, due to aliasing, the other half contains no new information on the periodicity of the random number sequence. The structure in this plot (Fig. 3) indicates that there is more periodicity in the output of the LCGX than just its full period of 2048. In fact the Fourier coefficients for several other periods are just as large as that for 2048. The solid section at the bottom of the graph arises from the fact that some periods are not present at all in the sequenc e and thus have a value of zero. Connecting all 3072 points, including the zeros, on one graph makes this apparen t solid region. This periodic structure is actually an indication that each number is not as independen t as had been hoped. Better random number generator s appear to have some contribution from most all of the possible periods. Thus, since there will be no periods with Fourier coefficients of zero, the dark region will appear suspende d in the middle of the graph. These better generator s also have smaller Fourier coefficients, often 0.6 or less.
In[37] : = rd[5000]; ListPlot [rani] Fig. 4 demonstrate s that the output from the LCGX already shows structure at the 1-distributed-leve l indicating that each random number generate d depends closely on the previous number generated . The plots of the 2-tuples and 3-tuples (Figs. 5 and 6) shows even more definite structure. In[40] : = ListPlot[Traiispose[{Drop[ranl, -1], Drop [rani,!]}]] In[41] : = Show [ Graphics3D [ Map [ Point, Partition [ rani, 3, 1]]]] Note that the Partition [] function could have been used to generate the 2-tuples as well as the 3-tuples.
4. TESTS FOR INDEPENDENCE
4.L Plots of 2-and 3-tuples If the individual numbers in a sequenc e of random numbers are uniformly spread over the interval, the sequenc e is then said to be "1-distributed." But as seen above, a sequenc e can be uniform and still not be very random. So, one can check to see how independent one number in the sequenc e is from its predecessor. In other words, is the sequenc e "2-distributed"? A plot of {(f/j , Ui+i)} will give a visual indication of any such dependence . Similarly, a plot of
Fig. 5. Graph of the 2-tuples for the 5000 random numbers generate d by the LCGX.
Evaluating pseudo-rando m number generator s
137
In[19] : = disp = Table[ th - 2 Pi r a n l [ [ i ] ] ; ph = P i r a n l [ [ i + 1 ] ] ; r = Sqrt[ranl[[i+2]]]; X = rCos[th] Sin[ph]; y = rSin[th]Sin[ph]; z = r Cos[ph]; Point[N[{x,y,z}]], {i,pts-2}]; In[20] : = Show [ Graphics3D [ disp ] ] The various tendrils seen in Fig. 7 are indicative of a random number generator that has problems with the independenc e of a generate d number from those previously produced in the sequence . Sometimes , it helps to see a 3D graphic from a different perspective . For this example, the "noise sphere" is so highly structured that littl e new information is gained, but the technique coded below (and shown in Fig. 8) may be useful in other cases. Fig. 6. Cartesian plot of the 3-tuples for the 5000 random numbers generate d by the LCGX.
However, the formalism using Drop[] is at least as fast, and it provides an alternative coding example. Generators of the LCGX type show structure at the 2, 3 and higher tuple level. The better generators of this type do not show obvious structure at the 1-distributed-level and have less distance between the hyperplanes containing the tuples. Much work has been done on this topic, called lattice structure analysis [4, 5 and refs. therein]. One interesting fact concerning the linear congruential generators is that if the period of the generator is iV, then there can only be N fe-tuples for any k. Thus a generator with a near infinite period wil l have a chance of having littl e or no lattice structure. This can be observed in several of the generators examined later.
In[21] : = Show [ Graphics3D [ disp, Viewpoint^{0.086, - 2 . 7 2 8 , 2.000}]] This type of rotation may be helpful in viewing the 3D Cartesian plots, too. In many instances Pickover's "noise spheres " are superior to the Cartesian plots because they require fewer trial rotations to see any structure. 4.3. Autocorrelation The fc-tuples plots give information on the local effects of immediate neighbors. Calculation of the au-
4.2. Spherical plots of 3-tuples A n alternative way of displaying the 3-tuples is to make a "noise sphere" plot as described by Pickover [13, 14]. Each 3-tuple is mapped to spherical coordinates (instead of cartesian coordinates) , and then a small sphere is placed at each point location. The coordinate transformation of {(Ui, L^^+i, Ui+2)} to {(ri,Oi,(t>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,<24) Rule Number = t/o + 2 * ^ , + 4*^2 + 8*^3 + 16*^/4 + 32*(ao + 2*a, + 4*fl 2 + 8*^3 + 16*^4) A^ = number of automaton cells to be presente d Cell states are represente d by c[/] for / = 3 to A^ + 3,
REFERENCES A. K. Dewdney, The Armchair Universe An Exploration of Computer Worlds, W. H. Freeman , New York (1988). C. Langton, et al. (Eds.), Artificial Life II, Addison-Wesley , Redwood City, CA (1992). S. Wolfram, Theory and Applications ofCellular Automata, World Scientific, Singapore (1986).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
155
C h a o s & Graphics
ONE TUB, EIGHT BLOCKS, TWELVE BLINKERS AND OTHER VIEWS OF LIFE JOHN E. PULSIFER* and CLIFFORD A. REITER^^ 400 Liberty Valley, Danville, PA 17821, U.S.A. ^Department of Mathematics, Lafayette College, Easton, PA 18042, U.S.A. e-mail: [email protected] Abstract—The time evolution of Conway's Game of Life is visualized in three dimensions by stacking the states at each generation. The color associated with each cell is determined by the number of neighboring live cells. Views generated by square initial configurations and classic configurations are considered. Copyright © 1996 Elsevier Science Ltd
1. INTRODUCTION
The Game of Life, created in 1970 by John Conway [1] is a favorite of computer users because of the rich behaviors that occur and the visual appeal of showing successive generations using animations. Initial configurations are known that move themselves through space and others generate infinite streams of such configurations. Descriptions of the behaviors and dehghtful initial configurations are available from a variety of sources including [1-6]. A computer archive of initial configurations is described in the Appendix. The Game of Life is a 2-D binary cellular automata. That is, at each generation there is an infinite "checker board" (2-D square lattice) of cells where each cell is either alive or dead. The states of the cells evolve from generation r t o generation t+\ according to the local rules given below. It turns out that these rules depend only on the state of the cell and the number of its eight neighbors that are aHve. • A cell that is alive at t will be alive at ^+1 if, and only if, it has 2 or 3 live neighbors at t. • A cell that is dead at t will be aUve at r + 1 if and only if 3 of its neighbors are aUve at time t. While it is traditional to view the Game of Life using animations, the successive generations can be stacked and viewed in 3-D. In fact, any 2-D automaton can be viewed in this way [7, 8] or examples\life.m in [9]. Of course, single generations of a 3-D automaton can be viewed in 3-D as well [10, 11]. It is also traditional to show each cell as dead or alive by using two contrasting colors; however, we will use several colors to distinguish the number of alive neighbors for each alive cell. In particular, dead cells are transparent, aHve cells with no aUve neighbors are shown in black, those with 1 aUve
^ Author for correspondence.
neighbor are shown in red, and so on using green, blue, yellow, and magenta; lastly, cyan corresponds to 6, 7 or 8 alive neighbors. Thus, black and red cells die, blue and green cells persist to the next generation, and yellow, magenta and cyan cells die. 2. EVOLUTION OF SQUARES
We first consider the long-term behavior of initial configurations consisting of a filled square of aUve cells. Various common configurations appear often in the long-term evolution of the Game of Life. Figure 1 shows several such configurations. The first row of configurations contains a block, a tub, a pond and a snake. These are all stable configurations. The first configuration in the second row is called a honey farm. It consists of 4 beehives and is also stable. The second and third entries in the second row form a traffic hght. It consists of 4 bUnkers which alternate
Table 1. The long-term behavior of the Game of Life when the initial configuration is a filled square with sides of length n. n= 1 n= l «= 3 n=A n= S n= 6 n=7 n= 8 n=9 n= 10 n = 11 n=12 n = 13 n = 14 n=15 n = 16 n=n n= 18 /!= 19 n = 20
dies immediately is stable from r = 0 (it is a block) dies at r = 9 dies a t / = 4 terminates in the honey farm at t=\\ forms a pond at r = 5 makes a traffic light at / = 11 dies at f = 6 turns into 4 traffic lights and 1 tub at r= 17 forms 1 pond at ^= 17 becomes a traffic light at r=33 fades at r=9 makes a tub at r = 18 turns into a pond at / = 9 diesatr=22 forms 4 ponds and 4 beehives at t=l\ makes 1 tub, 8 blocks, and 12 blinkers at r = 33 turns into 8 blocks, and 1 pond at t=n makes 5 traffic lights at r=21 dies at r= 12
Reprinted from Comput. & Graphics Vol. 20, No. 3, pag. 457-462, 1996
156
J. E. Pulsifer and C. A. Reiter
•
Si
M Lii*<*MMMt
1
1 Illllllllll
1
•*^:|-
H
i(
.-1^.
^ ^: i
y^
fcs .Ai%%s
* 1 ^^^H^Kv.
Fig. 1. Some common configurations.
between a vertical and horizontal position as shown. The last row of Fig. 1 shows the result of 4 generations of the Game of Life applied to a glider. Notice that after 4 generations the initial configura-
Fig. 2. Evolution of a 13 by 13 square.
Fig. 3. Evolution of a 17 by 17 square.
157
Conway's Game of Life
Fig. 5. Evolution of the B-heptomino. Fig. 4. Evolution of a random initial configuration.
tion reappear s displaced one cell vertically and horizontally. Thus, a glider, in the absenc e of any interference from other cells, will move off toward infinity . Table 1 gives the long-term behavior for small square initial configurations. These configurations sometimes die out but often show a simple long-term behavior. For example. Fig. 2 shows the time evolution of an initial 13 by 13 square for 60 iterations. The square base is visible and the growth of the outer edge continues for some time. The interior becomes a jumble, all parts dying out except a tub, shown as a green tower in the center. Of course the figure has the symmetry of the square (the Dihedral group, D4) since the initial configuration does and becaus e the Game of Lif e preserve s that symmetry. Figure 3 shows 60 iterations on an initial 17 by 17 square. Here the base square is visible along with some symmetric jumble.
but there is considerabl e stable long-term behavior— namely, one tub (the green tower in the center), eight blocks (the blue towers) and twelve blinkers (the green and red towers). That configuration inspired the title of this note. 3. CLASSICAL CONFIGURATIONS
Animations displaying the Game of Lif e frequently use an initial configuration where the initial states are randomly selected between alive and dead. Figure 4 shows 151 generation s of the Game of Lif e on a 20 by 20 random configuration (the probability of initially being alive is one-third). Notice that the region of alive cells seems to expand—ofte n some organized behavior such as ponds or blocks appear for a time but then these are disturbed by neighboring activity. As the number of generation s increases , there is a general tendency toward more organized behavior. This is consisten t with the view of the Game of Lif e as being slightly on the organized side of chaos.
158
J. E. Pulsifer and C. A. Reiter
Fig. 7. Evolution of the bi-gun.
Fig. 6. Evolution of thunderbird.
Nonetheless, very small configurations can have very complex long-term behavior. For example, Fig. 5 shows 130 generations of the B-heptomino. This is a small, somewhat vigorous configuration that begins with 7 alive cells and results in 2 gliders and 3 blocks after 148 generations. In thefigure,two of the blocks are visible as the blue vertical towers. Both gliders are visible moving off at diagonals to the right and the left. Notice the gliders are blue and green on the bottom, where they will persist, and red on the top, where they dre. Also notice the regions where the qualitative feel is very similar to the random case. The B-heptomino configuration and all the remaining configurations can be accessed electronically (see Appendix).
Figure 6 shows 145 generations of "thunderbird", a configuration that runs a bird-like symmetric pattern around a spiral until ending in a traffic Ught. Along the way, several blinkers are "fed" to the birds. Figure 7 displays 120 generations of the "bigun". This configuration is periodic except that gliders are spewn out. Notice the gliders moving off" to the left and right and the blocks forming blue towers that bound the periodic part of the image. Lastly, Fig. 8 shows 120 generations of the "pulsar puffer train" which moves off" to the right leaving behind a trail of pulsars. The pulsars are shown as the large towers.
4. CONCLUSIONS
The time evolution of 2-D automata can be visualized using stacked cells in three dimensions. In particular, the evolution of the Game of Life can be visuaHzed using a color scheme to provide information about the number of alive neighbors each cell has at each generation. The qualitative behavior of random initial configurations can be viewed and common configurations, such as ponds, blocks, blinkers and gliders can be recognized. Interesting initial configurations are viewed. These
159
Conway's Game of Life
Fig. 8. Evolution of the pulsar puffer train.
include one which is periodic except for the generation of streams of gliders and another where the generator moves leaving a trail of periodic behaviors.
10. A. K. Dewdney, The Armchair Universe, W. H. Freeman and Company, New York (1988). 11. C. A. Pickover, Lava lamps in the 21st century. The Visual Computer 10, 173-177 (1993).
REFERENCES
1. M. Gardner, The fantastic combinations of John Conway's new solitare game of "life". Scientific American 223, 120-123 (1970). 2. E. Berlekamp, J. Conway and R. Guy, Winning Ways For Your Mathematical Plays, Academic Press, New York (1982). 3. M. Gardner, On cellular automata, self-replication, the Garden of Eden and the game "life". Scientific American 224, 112-117 (1971). 4. William Poundstone, The Recursive Universe: Cosmic Complexity and the Limits of Scientific Knowledge, Contemporary Books, Chicago (1985). 5. E. Rietman, Creating Artificial Life: Self Organization, Windcrest/Mcgraw-Hill, New York (1993). 6. T. Toffoli and N. Margolus, Cellular Automata Machines: A New Environment for Modeling, MIT Press, Cambridge, MA (1987). 7. C. A. Reiter, Fractals, Visualization and J, Iverson Software, Inc., Toronto (1995). 8. S. Wolfram, Theory and Applications of Cellular Automata, World Scientific, Singapore (1986). 9. S. Wolfram, Mathematica, a System for doing Mathematics by Computer (2nd edn), Addison-Wesley Publishing, Redwood City, CA (1991).
APPENDIX
Implementation and Resources The figures shown in this note were created by implementing the Game of Life and the color scheme in the programming language J. All the examples here were run on large enough initial fields so that the boundary conditions played no role. The results of those computations were then formatted for, and rendered by the freeware ray tracing program POVRAY. The J language is available by anonymous FTP from archive.uwaterloo.ca in the directory languages/j. POVRAY is available from alfred.ccs.carleton.ca. One of the largest on-line collections of initial configurations for the Game of Life is the pattern collection lifep.zip that is designed for use by Al Hensel's shareware version of the Game of Life which is archived in lifel6.zip. These files are available for FTP from wuarchive.wustl.edu in the directory systems/ibmpcj simtel/msdos/simulatn. We used the pattern collection for some of our examples. In particular. Figs 5-8 have initial configurations stored in bhepto.lif tndrbird.lif, bi-gun.lif and psrtrain.lif Below we list the J code required to apply the Game of Life to a 13 by 13filledsquare. Complete J script files which
160
J. E. Pulsifer and C. A. Reiter
create the appropriate color scheme and format the results for POVRAY are available from the authors. First we define a function f i l t that executes the Game of Life on a single 3 by 3 neighborhood. For example, the neighborhood M dies. L 111 19 1 111 filt=. e.&3 1112@(+/)@. @(L&*) M 0 10 Oil 110 filt M 0
Next we define a functionfilterwhich apphes f i l t to each 3 by 3 neighborhood; here it is apphed to a matrix M.
f i l t e r = . 3&(3&(f i l t \ ) @ | : \ ) M 0 10 10 0 1110 110 0 1 10 0 0 0 11111 filterM 0 0 1 0 0 1 0 00 To implement a step of the Game of Life we extend the matrix periodically in both directions. Then A is defined to be a 33 by 33 array whose center 13 by 13 block is aHve and A60 is defined to be a 3-D array containing 60 iterations of l i f e on that configuration. perext=.{:,],{. life= . f ilter@perext@ : (perexfl) A=. 33 33{ ._23_23{ . 13 13$1 A60=. life ^: (i.60) A A60=. life ^: (i.^0) A
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
161 Chaos and Graphics
SCOUTS IN HYPERSPACE SHERRI SHEPARD and ANDREW SIMOSON*
King College, Bristol, TN 37620 Abstract—A one-person, checkers-like pegboard game in M-space is described. The goal of the game is to advance a peg as far as possible from an initial configuration of pegs. Using an argument based on the golden mean, we demonstrate bounds for how far a peg can travel as well as how many pegs are needed to achieve a particular goal. Finally, the game is viewed as automata moving about so as to achieve their collective goal. INTRODUCTION
"Scouts in Hyperspace" is a variation of a pegboard game which has been attributed to an unfortunate Frenchman who whiled away his time by moving pebbles around on his flagstone cell floor in the Bastille. The game uses a single simple rule and produces surprising results. The game is played on an unbounded n dimensional checkerboard which has been partitioned by a hyperplane into two regions, called the desert and the oasis (Fig. 1). The object of the game is to advance a peg (a scout) as far into the desert as is possible, starting from a configuration of pegs (an army of soldiers) in the oasis. In the play of the game, no more than one peg can occupy any hypercubeshaped cell of the board simultaneously; and a move consists of a peg jumping in any of the 2n natural directions over a neighboring peg onto a previously vacant cell, after which the jumped over peg is removed from play. When first approaching this game, and especially after a few experiments in dimensions 2 or 3, the player might expect that a sufficiently large, strategically moved army should attain appreciable penetration into the desert. However, we demonstrate that a scout can advance at most 3w-2 cells {paces) into the desert, and also determine a good lower bound on the approximate sizes of the armies needed to attain such goals. Finally we show that the game can be viewed as pegs moving themselves as automatons so as to achieve their collective goal of stepping out into the desert.
To configure an army in 3-space allowing a scout to advance seven paces into the desert, consider the plane configurations of Fig. 3 (called Platoon A and B). As the reader can verify, the eight pegs of Platoon A are sufficient to advance a scout three paces, and the 36 pegs of Platoon B are sufficient to advance three scouts, one, two, and three paces, into linear array. Assemble two A platoons and six B platoons for a total of 232 soldiers as indicated in Fig. 4(i), so that the scouts advanced by each platoon are all in the same plane. The rectangles labelled A and B in the figure are intended to be side views of their respective platoons. See the color figure of this paper to better visualize this configuration (Fig. 4'). To see that this configuration enables a scout to advance seven paces into the desert, move the pegs in the five vertical B platoons to resuh in Fig. 4(ii). Then make a series of jumps with these pegs in the desert and also move the pegs in the remaining B platoons to result in Fig. 4(iii). Now make a series of jumps
/:7\ Desert
."nW,
PACE SOLUTIONS FOR DIMENSIONS ONE THROUGH FOUR
Before establishing the general result, we demonstrate the play of the game in dimensions one through four. In thefigures,black dots represent initial peg positions and open circles represent final peg positions. For 1-space, two pegs advance a scout one pace into the desert (see Fig. 2(i)). For 2-space, the reader can verify that 20 soldiers are sufficient to advance a scout four paces into the desert (see Fig. 2 (ii)). See [1,211215] and [2, 712-717] for an analysis of this two dimensional case, which provided the inspiration for this paper. (See also [3] and [4] for variations on the two dimensional game.)
' Author to whom correspondence should be addressed.
asti "•"l 1 y
Fig. I. A representation of the playing board in three space.
Hi) (i) Fig. 2. Configurations enabling a scout to respectively advance one and four paces into a one and two dimensional desert.
Reprintedfrom Comput. & Graphics Vol 13, No. 2, pag. 253-260, 1989
162
SHERRI SHEPARD and ANDREW SIMOSON
We also use other 3-dimensional companies in our solution. For example, let Company BBB be three lay0 ers of platoon B. As illustrated in Fig. 6, thefirsttier of Company BBB allows three scouts to occupy the •• u three cells as indicated with open circles, whereupon the third tier jumps over the second tier, reoccupying thefirsttier. Companies AAA and BAA function simTCaicofvB 'Siaiomf^ A ilarly. Fig. 3. Subconfigurations for a three dimensional configuraNow assemble platoons and companies of platoons tion. for a total of 3912 soldiers as indicated in Fig. 7(i). To see that this configuration enables a scout to adwith these pegs and move the pegs in the two A platoons vance 10 paces into the desert, move the pegs in the to result in Fig. 4(iv). Then make the final grand se- five vertical C companies to result in Fig. 7(ii). Then quence of jumps to result in Fig. 4(v), thus getting a make a series of jumps with these pegs and move the pegs in the right hand companies BBB and AAA, rescout seven paces into the desert. We construct a solution for 4-space, building the suhing in Fig. 7(iii). (An open circle indicates where solution out of groupings of soldiers as we did for 3- the next series ofjumps will leave a scout.) Then make space. Let Company C be the three dimensional army a series of jumps and move the pegs in the remaining illustrated in Fig. 5. Following an argument similar to B and A platoons on the right to result in Fig. 7(iv). that illustrated in Fig. 4, the reader may verify that the Then make a series of jumps and move the pegs in the 672 soldiers of Company C are sufficient to advance left hand companies BBB and BAA and platoons B three scouts two, three, and seven paces (or four scouts and A, resulting in Fig. 7(v). Make a series of jumps and move the pegs in the remaining B and A platoons two, three, five, and six paces). [o] [o] [oj
.
^
[#[
LIZ
JZJ
Fig. 4. A sequence of snapshots in advancing a scout 7 paces into a three dimensional desert. (See the text for supporting details.)
163
Scouts in hyperspace
for some integer/?, in the valuation of the army. (This transaction also defines s, i.e., s^ + s = 1.) With this assignmen t of hypercube values, the sum of hypercube values over all hypercube s whose first componen t (of their centers) is less than or equal to —3^7 + 1 is 1, as demonstrate d by the following string of equalities (which uses the geometric series formula and the identity ^^ + 5= 1).
2
- m ,+ |m2l + -
2
mi = -3rt+l m2=-oo m3=-oo
=
2
^y'C 2 s"")"-' m=-oo
m=3n-l 00
OO
= {s'"-')({/(\
Fig. 4'. A three dimensional , color rendition of the configuration of Fig. 4i. Note that the pegs of each platoon are the same color.
to result in Fig. 7(vi). Finally, make a series of jumps to result in the configuration in Fig. 7(vii), upon which one last series of jumps gets a scout out 10 paces into the desert.
-sm-i
+(2/(1 -5)))"-'
= (5^"-'5-2)((i -{- s)/s''r-'
= 1.
Now imagine that the oasis is the set of all hypercube s whose first componen t (of their centers) is no more Surprisingly enough, the golden mean dictates that than —3n + 1. Then the sum of the hypercube values s is exactly 1, which means a scout can advance no more than 3n — 2 paces into over all oasis hypercube an «-dimensiona l desert. To see this, embed the desert/ that no finite sized army positioned in the oasis can oasis playing board of hypercube s in /?" so that each have a value as large as 1. But if it were possible for an army positioned in the oasis to send out a scout 3n hypercube has — 1 paces into the desert to occupy the hypercube con• side length one; taining the origin and which has the value 1, then (since • all of its sides aligned with the axes of/?"; and the value of an army can never decrease ) the value of • its center at integer coordinates . this army must have been at least 1, a contradiction. Hence each hypercube is reference d by its center and Therefore a scout can advance no more than 3« — 2 so when a peg at (mi, . . ., m„) jumps over a peg at paces into the desert. (/?!, • • •, P/i) landing at (^i,. . ., ^„) , then there exists A COMBINATORIAL TOOL l integers and m, a j with nij, pj, QJ being sequentia In this sectio n we develop a combinatorial tool which = Pi = Qi for all /• with i <. i < n and i¥'J. Generalizing will enabl e us to determine lower bounds on the army a two dimensiona l pagoda function as in [ 2 ], we assign each hypercube a value so that THE BOUND IN /i-SPACE
• the value of an army of pegs is the sum of the occupied hypercubes ; and • the value of an army never increase s whenever a move is made. An assignmen t which satisfies this last condition is achieved by assigning the hypercube with center (mi, . . ., m„) the value 5-^.+i'"2t-Mm3i + - • • + im„i ^ ^^^^^ ^ -^
VJ - 1
the golden mean, namely s = — - — ^ 0.618. As the
O
0 B 8
B B S B
B BB 8 S
A A /4
B B 8 B B B B
reader may verify, no move yields an increase in the value of an army. Let L be the axis {x E R"\Xj = 0, Canvpa^yj C 2 < j <, n}. Then in particular whenever a move is made in the positive L direction or "towards" L, the Fig. 5. A subconfiguratio n for a four dimensiona l configuravalue of s^'^^ 4- s^"^^ is exchange d for the value of 5^ tion.
164
SHERRI SHEPARD and ANDREW SIMOSON
Fig. 6. Another subconfiguration for a four dimensional configuration.
sizes needed to advance a scout 3« - 2 paces into the h(n,M) n dimensional desert. The combinatorial problem is this: How many whenever points with integer coordinates lie on the surface of the n dimensional prism whose 2n vertices are ±Mei, 0, otherwise. where ei is the unit vector in the /''' natural direction (1 :^ / :^ «) and Af is a nonnegative integer? This prism is also the set of points in R" such that the sum of the Also note that magnitudes of the point's components is M. To answer this question, \QX h(n, M) be the number of points in R" with positive integer coordinates summing to M. By a straightforward inductive argument
fC::)
g B B BAA
n <> M
and
M > 0,
(1)
(2) k-=0
BBB BB B
TYi
/>^A
^
• BTATAT
cc
a aa
vu
f 1
i ^
SB 8 6 A A
B
1
A
1 ^
4 1 • •
<» • • . I I 'M l
S
B A 3
1
B ^
Vt^
Hi 8 BB BAA
_A
L
iv Fig. 7, A sequence of snapshots in advancing a scout 10 paces into a four dimensional desert. (See text for supporting details.)
Scouts in hyperspace another straightforward inductive argument. Let/(^i, M) be the number of points in R" with integer coordmates such that the sum of the magnitudes of these coordinates is iV/. That is,/(«, A/) counts the integer . ,, *u • ^- J u A coordinates on the pnsm as mentioned above. As can be seen / ( ^ , M ) = 2(^)2^/i(/:,M);
(3)
165
"-^ l^'^ ^\ k^^^ ^(^\ k^\-^ K ^ l U Z^(^,P)+ZI |2 2 h(k, p). r» /-.^ i.By (2) this expression becomes ^^ ^ " ln\ "'^^ In -k- \\ 2 , 2*/z(A:+ l,A/)+ 2 . 2^/i(^+ 1,A/). k'-'(i\'^l
ik-O \
^
/
(7) note that each term j
] 2 *"//( A:, Af) counts the number
of points in i?" with integer coordinates, n- k of which are 0. In addition,
\ k ) \k) \k—l) mation expression of (7) can be written as h(UM)-^
f{n + 1, M) =f{n, M) + 2 2 / ( « , A:)
2 (2)2*/i(A:+ 1,A/)
(4) + 2 I '^ :-i fc-i
because component x„+i of points counted in/(rt + 1, M) can vary from - M to M; when x„.^ = 0, then/(A2 + 1, A/) includes precisely/(«, A/) of these points; when Xn^i = ±{M - k),0 <, k ^ M - 1, then/(« + 1, A/) includes precisely 2/(/I,/:) of these points. These four formulas are enough to yield the Fibonacci-like recursive relation
|2^/z(A:+ l,M) + 2''^'/z(« + 2, A/).
\ ^ - 1/
Substitution of this expression in (7) and simplifying yjei^s « / \ 2( |2*"^'/i(it+l. A/) A:-O \ ^ /
2A/ / ( « + 2,A/) = - — - / ( « + l , A / ) + / ( A 2 , A / ) ,
+ 2 l |2'=/z(A:4- l,Af). /cT,U-l/
(8)
Al + 1
with/(0, A/) = 0,/( 1, M) = 2, where
Af > 0. (5)
Re-indexing the first summation expression in (8) as 2y ( 1 " fc-l -1
To prove equation (5), it is clear that/( 0, M) - 0 and / ( 1 , A/) = 2. Applying (4) twice on the left side of (5) yields / ( « + 2, A/) = / ( « + 1, Af) + 2 2 /('I + 1, ^)
b*/. 12^/i(/c, A/) and simplifying yields
\^ " 1 /
^^ ^ ( ^ \2''{h(k, M) + h(k + 1, A/)). j^., \ f c - 1/ By (1) this expression becomes
A:=0
= / ( « , A/) + 2 2 (/(«, k) + / ( « + 1, ^)).
^^ [j, _ J 2 M/c + 1, A/ + 1).
fc=0
Hence to prove (5) it is equivalent to show that
By ^ e factorial structure in (1) again, this expression becomes
A/-1
2
(An,p}+f(n-l,p))
2'('':']-^2*/,(..A/).
p-O
M = ;^Tr^^"'^^*^^
^""^
''^^'
^^^ Lastly by (3) we have
By (3) the left side of (6) becomes
/ ( ^ + 1^ M). n-h 1
2 ( 2 ilY'hik, P-o\k^o\kJ
P) + 2 C t ^ Y'hik, p)] . k^o\ k / )
Interchanging the order of summation in this expression yields
So by ( 5 ) , / ( 2 , M) = 4A/;/(3, M) = 4A/2 + 2;/(4, A/) = 8A/V3+ 4 A / / 3 + 4A/;andsoon. Let g(n, M) be the number of points counted in f(n, M) whose first component is less than or equal to 0. As can be seen by the "proof without words" of
166
SHERRI SHEPARD and ANDREW SIMOSON
Fig. 8. A pictorial argument showing that the number of points with integer components on the half prism in dimension AZ -I- 1 is half the number of points with integer components on the « + 1 and the n prisms combined. Fig. 8, dissecting an (« + 1, A/) prism (Fig. 8(i)) into three parts leads to Fig. 8(ii): two halves of an {n + 1, M) prism without bottom and top, respectively, and an («, M) prism; subtracting the (w, M) prism leads to Fig. 8(iii), and then dividing by two leads to Fig. 8 (iv);finally,adding back the (/?, M) prism yields Fig. 8(v).Thatis,
To sum these values, we need to know how many cells have value 5'°, j ", 5 '*, and so on. The number of such cells corresponds to the number of points with integer coordinates on the sequence of nested half prisms as suggested by Fig. 9. And this task is precisely what function g performs. Formula (9) yields ^(4,A/) =
/ ( 4 , M ) + / ( 3 , .V/) (8/3)A/^ + (16/3).V/ + 4A/2 + 2
which means that g(n + 1, M) = ^ {fin + 1, M) -^f(n. A/)).
(4/3)A/^ + 2i\P + (8/3)A/ + 1.
It is this last formula which we will utilize in the next section. ARMY SIZE ESTLMATES
The formulas for^(Az, M) and f{n, M) easily yield the number of cells of a particular value in the oasis and thus can be used to obtain a bound on the minimal size of an army needed to advance a scout 3« — 2 paces into the desert (n > 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 <" (2) boxes the 2-dimensiona l cells of the resulting 3-dimensiona l array since it is convenient to view a 3-dimensiona l array as a boxed vector of matrices. Notice there are a large number of Os which correspond to the fractal in this example.
<"(2) O 0 O 0
O 0 O 0
O O p 0 op OOp 0 0 0
3 gl
#:i.4
O O O 0 1 0 10 0 0 0 0 1 0 10
NB. 3 - d i m e n s i o n a l
0 0 0 0 0 0 0 0 0 op 10 1 0 1 1 0 0 1 1 0 1 10 1 1 1
base 2
construction
Fig. 5 shows the result of 3 g l # : i . 2 ^ 6 which uses 6-digit base-two addresse s in three dimensions. Notice that there are four primary faces that contain the Sierpinski triangle, as do all the sub-faces . This Sierpinski "clif f dwelling" can also be imagined as arising from an iterated function system that uses 7 distance halving transformations . Figs. 6 and 7 show this for base three addresses . Zeros are shown in yellow and Is in green. Notice in particular, that while these are generalization s of the Sierpinski triangle and carpet to 3-dimensions , these do not give the classical Menger sponge. For the Menger sponge, we need something lik e the carpet, in all pairs of dimensions. Thus, looking at GCDs of LCMs of all possible pairings of the addresse s is needed (there will be n addresse s for each point in n dimensions). Here, we use the function g g l, which also is given in Appendix A. This function computes the pairwise LCM of all possible pairings of addresse s and the G CD over all possible pairings is taken. That is followed by taking GCDs over all the digits as in the earlier constructions , thus GCDs are applied at two levels and, hence, the name g g l . Again, the left argument is the dimension and the right argument is the matrix of addresse s in whatever base is desired.
g i t 2 .5 2 . 5 #! <"(2) 3 ggl #:i.4 0 0 0 0 0 10 1 0 0 11 0 1 1 1
0 10 1 1 1 1 1 0 1 1 1 1 1 1 1
0 0 11 0 1 1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
NB. 3-dimensional base 2 construction
Table 1. Brief J glossary. X plus y X times y X to the power y G C D of X and y LCM of X and y an addition table a G C D table sum of items in y G C D of items in y transpose of y matrix product of x and y GCD - LCM inner product m a k e a boxed scalar of y box the rank 2 cells of y m a k e x copies of y Cartesian product
X + y X *y x^'y X +. y X *. y x+/y x+./y
+/y + ./y |:y
X +/ . * y x + . / . *. y
<"2y X #y
{y
EFEFEPTPTFFPYFEFEVEFEF Vfr rjr Wr
P^ P^^ |r V Vp^V IV
ILLF
V
V^ V
EFET
vFVy
vWVy
p ^
^p-
p ^
|r
|jr
wr
MT w'^ p r
Fig. 3. GCD-LCM product base four.
rlJ
vVPy ^v hr
I I n , ^ # 0 . C | 4 ' O O - l ^4 ^^,
^ * ,.;iQf q-l^l^^-
*4 ^, ^0
J4„ i-'U-* r-il
liU .
t
i J-1' -fi:
Fig. 1. Sierpinski Triangle: GCD-LCM product base two.
Fig. 4. GCD-LCM product base seven.
Fig. 2. Sierpinski Carpet: GCD-LCM product base three.
Fig. 5. Sierpinski cliff dwelling: GCD of triple-wise LCMs base two.
172
Sierpinski fractals and GCDs
Fig. 6. GCD of triple-wise LCMs base three.
173
Fig. 9. Menger Sponge: GCDs of pairs of LCMs base three.
Fig. 8 shows this for 6-digit base-two addresses. This is what might be called the Sierpinski tetrahedron, seen in many places, for example [7, 8, 10]. This can also be thought of as the attractor under four distance-halving functions. Fig. 9 shows this in base three: 3 g g l ( 4 # 3 ) # : i . 3 ^ 4 . In this case, the 0, 1, and 2 entries are shown in red, transparent, and cyan. As in the twodimensional Fig. 2, some inner structure of the sponge part is seen. There is a preponderance of cyan, and fractal edging is shown in red. Fig. 10 shows this construction for base four. Here 0, 1,2, 3, and 6 are red, transparent, transparent, cyan, and magenta, respectively. Notice the oversized holes and the rich inner structure visible in the sponge. A few additional remarks about higher than 3-dimensional versions are given in Appendix A. Fig. 7. GCD of triple-wise LCMs base three with interior.
Fig. 8. Sierpinski tetrahedron: GCDs of pairs of LCMs base two.
Fig. 10. GCDs of pairs of LCMs base four.
174
C. A. REITER
REFERENCE S 1. M. Barnsley, Fractals Everywhere, Academic Press (1988). 2. B. A. Bondarenko, Generalized Pascal Triangles and Pyramids, The Fibonacci Association, Santa Clara CA (1993). 3. M. S. El Naschie, On turbulence and complex dynamic in a four-dimensiona l Peano-Hilber t space. Journal of the Franklin Institute 330, 183-198 (1993). 4. K. E. Iverson, J. Introduction and Dictionary Iverson Software Inc., Toronto (1993). 5. A. Lakhtakia and D. Passoja , On congruenc e of binary patterns generate d by modular arithmetic on a parent array. Computers & Graphics 17(5), 613-617 (1993). 6. G. Langlet, Toward the ultimate APL-TOE. APL Quote Quad 23(\), 118-134(1992) . 7. B. B. Mandelbrot, The Fractal Geometry of Nature, W. C. Freeman and Company (1982). 8. H.-O. Peitgen, H. Jiirgens, and D. Saupe, Chaos and Fractals. Springer-Verlag (1992). 9. C. A. Pickover, Computers Pattern Chaos and Beauty, St. Martin's Press (1990). 10. C. A. Pickover, Mazes for the Mind, St. Martin's Press (1992). 11. C. A. Reiter, Fractals and generalize d inner products. Chaos, Solitons and Fractals 3, 695-713 (1993). 12. A. M. Reiter, Determining the dimension of fractals generated by Pascal's triangle. Fibonacci Quarterly, 31(2), 112-120(1993) . 13. W. Sierpinski, Sur une courbe cantorienne dont tout point est un point de ramification. Comptes Rendus Acad. Sci. Pflm 160, 302-305(1915) . 14. W. Sierpinski, Sur une courbe cantorienne qui contient une image biunivoquet et continue detoute courbe donnee. Comptes Rendus Acad. Sci. Paris 162, 629-632 (1916). 15. M. Sved, Divisibility—wit h visibility. The Mathematical Intelligencer 10(2), 56-64 (1988). APPENDIX A: CODE FOR SIERPINSKI FRACTALS IN /i-DIMENSIONS
In order to duplicate the experiments in this paper, the reader is encourage d to get a copy of J. Versions of J for the Amiga, Mac, OS2, Next, PC, PC386, Windows, Sparc and many other platforms are available via anonymous ftp from w a t s e r v l . u w a t e r l o o .ac in l a n g u a g e s / a p l //j e x e c. The source code in C is also available. The windows version has the most advance d interface. While the ftp versions are free sharewar e (but copyrighted), J users are wise to purchase the documentatio n [4] for a small cost. The first function we define is g l, that is used to create Sierpinski objects in A7-dimensions by taking GCDs of the nwise LCM of the «-addres s vectors. This is implemented as shown. gl =. + . / " l @ ( * . / " 2 ) (
K#<@(<"1@] ) )
The reader interested in understandin g each of the symbols used in this definition should consult the J dictionary, but the main steps are to box (<) and replicate the address data n times, compute a Cartesian product ({) , to unbox (>) and then to apply LCMs and GCDs. Thus 2 g l # : i . 2 ^ 11 would give the classic Sierpinski triangle as a 2-dimensiona l array
arising from 11-digit base-two representation s of addresses , as in Fig. 1. The data of Fig. 2 is constructe d using 2 gl ( 6 # 3 ) # : i . 3 ^ 6. The 3-dimensiona l data of Figs. 5-7 are constructe d with 3 gl # : i . 2 ^ 6, and 3 gl (4#3)#:i.3'^4. Four-dimensiona l examples with even a small number of digits contain a large amount of data, but here is a small 4-dimensional example generalizing the Sierpinski triangle and cliff dwelling using 2-digit base-two addresses .
<"(2)
4 gl
o o o o
o o o o
o o o o
o o o o
p p p p
o o o o
o o o o
0 0 0 0
0 0 0 0
0 0 0 0
op op op op
0 1 0 1
0 0 0 0
o o o o o
o o o o o
o o p o o o p o o o p o o o o o p o o o p o o o p o o o o o p o o o p o i i p o i i o o [ o o o o [ o o i i p o i i o o p o o o p o o o p o o o
o o o o
o o p p
op 10 op 10
o o o o 0 0 0 0
o o o o 0 0 0 0
o o o o
o p p p
op op op op
o o o o
o o o o
o o o o
0 0 10 0 0 1 0
0 1 0 1
0 0 0 op 1 0 1 0 0 0 op 1 0 1
o o o o p o o o p o i i p o i i 0 0 0 0 0 1 0 10
0 1 1 0
1 1 1
The second generalizatio n of the Sierpinski objects to ndimensions is given by g g l, which computes the pairwise LCMs of all possible pairings of the «-addres s vectors, and then computes the GCD of those pairs, and then the GCD among all the digits. g g l =. + . / " l @( [ ( + . / © ( + . / ) @ ( < / ~ @ i . @ [ * . * . " l / ' - @ ] ) )"2>(^ >@{@(#<@(<"1@] ) ) ) This is also consisten t with the 2-dimensiona l constructions . For example, 2 g gl #: i . 2^11 would give the data in Fig. 1 again. The data of the 3-dimensiona l images in Figs. 8-10 result from 3 g gl # : i . 2 ' ' 6, 3 g gl (4#3)#:i.3^4, and 3 g gl (3#4)#: i . 4^3, respectively. Again, higher dimensiona l versions can computed by changing the left argument.
APPENDIX B: TWO-DIMENSIONAL CONSTRUCTION IN PASCAL
The following program provides a starting point for readers who want to explore the two dimensiona l versions of these fractals using Pascal. This duplicates g i t (n#b) #:b^n with g l t = . + . / . * . I : when b is an integer. Procedura l programs analogous to gl and g gl would require a variable number of loops and are not given here.
Program GLTX; { Computes an array generalizing Sierpinski's Triangle } { using base b representations of indices of positions } var i, j,k, { loop indices } d,g,
#:i.4
{ temp variables }
b,n,m : integer; { base, number of digits and rows }
Sierpinski fractals and GCDs
x: array [0 . . 1023, 0 . . 9] of integer; { X stores base b representations of 0 to b ^ k—1 } function gcd (a,b:integer):integer; var r0,r1,r2:integer; begin rl:=a; r2:=b; while not (r2 = 0) do begin rO:=rl; rl:=r2; r2 : =rO mod rl; end; gcd:=rl end; funtion lcm(a,b: integer) : integer; begin if a = 0 then 1cm: =0 else lcm:=a*b div gcd(a,b) end; function power (x, y: integer) : integer; begin power: =round(exp(y*ln(x) ) ) ; end; Begin { *** main *** } b:=2: { base used } n:=4; { number of digits in representation } m:=power (b,n); { number of rows represented } { define x; the rows give base b representation of row index } for i: =0 to m—1 do begin d:=i; for j : =0 to n—1 do begin x[i,n—j—1] :=d mod b; d: =d div b end; end; { create the gcd-1cm array } writeln; for i: =0 to m—1 do begin for j : =0 to m—1 do begin g:=0; for k:=0 to n—1 do g:=gcd(g,lcm(x[i,k],x[j,k]))); write(g:2) end; writeln; end; end. { main }
175
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
177 Chaos and Graphics
COMPLEX PATTERNS GENERATED BY NEXT NEAREST NEIGHBORS CELLULAR AUTOMATA WENTIAN LI
Center for Complex Systems Research, Beckman Institute, University of Illinois, 405 North Mathews Avenue, Urbana, IL 61801 and Department of Physics, Columbia University, New York, NY 10027* Abstract—A greater number of complicated patterns can be produced by cellular automata niles with next nearest neighbors in the updating, than those with only nearest neighbors couplings. Some patterns can be identified as gliders moving on the background, while other rules have more intriguing configurations called "creatures" which move irregularly on the background. Sometimes, even the distinction between creatures and the background disappears, and the patterns look strikingly similar to those generated by probabilistic rules, even though the rules used are strictly deterministic. The question of how the complicated behaviors of biological systems can be explained in terms of the simple laws of physics motivated Von Neumann and Ulam to propose the use oi cellular automaton[\], a, fully discretized dynamical system with local couplings. It is indeed found that some specially designed two-dimensional cellular automata can mimic the least selfreproduction behaviors [ 2 ]. Although we lack the general criteria on what types of cellular automata rules can produce what behaviors, today it is is widely appreciated that simple rules can lead to compjex dynamics [3, 4]. The simplest type of cellular automata are on a onedimensional lattice with two state values at each site, and with nearest neighbors couplings: a'r'-fiaUi.aUaUi)
(I)
where ai is the state value on site / at time r, and/( ) is some kind of function, usually in a tabular form, with the state values at previous time step on nearest sites as the variables. These cellular automata are thoroughly studied, and their spatial-temporal patterns can be found in the Appendix of [ 5 ]. By looking at these spatial-temporal patterns one may feel a bit of disappointment because only one or two of them seem complicated, with most of the other patterns being either simply periodic in time direction or homogeneously random. The capability for these rules to produce more complicated dynamics is limited by the fewer number of state variables and neighbors involved in a updating. Here I ask the following question: what complicated dynamics can cellular automata, still in one dimension and with two state variables, generate when next nearest neighbors are included in the updating? This article partially answers this question by collecting some spatial-tempral interesting patterns generated by such cellular automata rules. * Address after September I, 1989: Santa Fe Institute, 1120 Canyon Road, Santa Fe, NM 87501.
GLIDERS
Fig. 1 shows a pattern which cannot be produced by any nearest neighbor cellular automaton rule: a "net"! The line on the top is the initial configuration which is random with each site value chosen from either 0 (white) or 1 (black), with equal probability, and the successive lines are configurations updated by the rule presented by the following rule table: 110101011lOOOlOOl100000010011001.
(2)
Each bit in this binary sequence represents the state value which a 5-neighbor configuration maps to. Starting from theright,the binary sequence can be decoded to a rule: 00000 — 1, 00001 -> 0, 00010 -* 0, • • •, l l l l O - * l,and 11111 -* 1. There are many ways to condense this binary sequence to shorter sequences with larger bases. For example, this 32-bit pattern can be rewritten in a sequence with 10 digits if the base is 10 {Le., 3586441369), 11 digits if the base is 8 {i.e., 32561140231), with 7 alphabets if the base is 26, or with 4 numbers if the base is 256 {i.e., 213,196,192,153), etc. Unsure of which representation is the best, I will adopt the last approach, i.e., using 4 numbers with 256 as the base, throughout this paper. Take the rule in Fig. 1, for example; the way to do this is to split the 32-bit sequence into four segments: 11010101, 11000100, 11000000, 10011001, and use the decimal equivalences 213, 196,192,153 as the rule label. The picture in Fig. 1 is typical for a class of rules with "gliders," i.e., stable configurations on the background moving with certain speed. For example, if we look at the "thread" on the "net" carefully, we can find that one of the gliders in this picture is the configuration 01000 (on the background of Ts), which moves to the left by one site after each updating. The "knots" are the collisions between gliders. Will the dynamics in Fig. I run into an equilibrium state, causing the pattern to be boring? The readers can activate their own numerical simulation as a test. Although most of the time two gliders emerge when two
Reprintedfrom Comput. & Graphics Vol. 13, No. 4, pag. 531-537, 1989
178
VVENTIAN LI
. Another vvav of writing this rule is: Fig. 1. Pattern produced using rule (313,196.192,153) 1101010111000100110000001001100 1 (see text).
gliders meet, occasionally, only one glider survives such a collision. Besides, it is never observed that extra numbers of gliders are produced. As a consequence , the number of total gliders is decreasing , and the "holes" in the net become larger and larger, though with an extremely slow expansion rate. CREATURES
Fig. 2 shows the pattern generate d by rule (78,158,206,33) . It looks like a pine tree. If we wait long enough, all the branches of the tree stop growing, and only the background remains. It is quite common for cellular automata rules to have nontrivial patterns in the transients . Two other cellular automata rules with the similar amazing structures in transients are shown in Figs. 3 and 4. Fig. 3 is generate d by rule (130,36,202,62 ) and Fig. 4 is by rule (123,140, 162.141). The purposefor including these pictures is to show that not all the complicated structures produced by the cellular automata are glider activities. It is possible to have configurations, distinctive from the background , moving in irregular ways, rather than the fixed speeds for gliders. In most of the cases , these are transient behaviors. I call these moving objects in the transients creatures. The source for the irregularity of the creatures' movement is the structures in the back-
ground, such as the checkerboard-lik e configuration • • • 1 lOl 1011 • • • in Fig. 2. The interaction of the creatures with the background makes their movement irregular. If the background is homogeneousl y all O's, the objects will only moved with fixed speeds . RANDOMNESS AND REGLLARfTV Fig. 5 shows the pattern generate d by rule (166,252,133,49) . For this pattern, the background (dark area), instead of being of periodic patterns, is as complicated as the creatures themselve s (light area). It might be more appropriate , at least during the transient period, to describe them as two different phases than as background and creatures . Another feature I want to point out is the practical unpredictability for the details of the pictures, even though the rule is purely deterministic. Of course, one has to be reminded that the initial configuration is random, but without some aspects of the cellular automaton rule itself, the complex structures will not necessarily be generate d or maintained. Fig. 6. for rule (205.233,162,25) , shows another example for a deterministic cellular automaton rule to generate pictures typical for nondeterministi c rules. Sometimes , even when the initial configuration is random, the pattern generate d can be astonishingly . regular. Fig. 7 is generate d by rule ( 195,188,227.144)
Complex patterns
Fig. 2. Pattern produced using rule (78,158,206,33).
Fig. 3. Pattern produced using rule (130,36,202,62).
179
180
WENTIAN LI
Fig. 4. Pattern produced using rule (123,140,162,141).
Fig. 5. Pattern produced using rule (166,252,133,49).
Complex patterns
Fig. 6. Pattern produced using rule (205,233,162,25).
Fig. 7. Pattern produced using rule (195,188.227,144).
181
182
WENTIAN LI
It gives an impression that 3-dimensiona l tetrahedron s are piled up one next to another. This illusion is achieved partly by the existence of the "third color," grey, which is actually checkerboar d configurations • • • 00110011 • • •. The amazing thing about this rule is that it accomplishe s the fractal-like arrangemen t of the tetrahedron s from a random initial configuration! (By the way, this rule was discovered accidentally.) There are other patterns generate d by some rules which are less spectacula r than the one in Fig. 7, but the readers can also see large-scale structures emerging from random configurations [e.g.. Fig. 8, for rule (206,176,186,98)] .
There are two empirical tricks, though, which I use to enhance the possibility to get interesting pictures in this seemingly hopeless random searching . First, do not fill the rule table with too many 1 's or too many O's. Actually, for the next neares t neighbor cellular automata rules, something close to half O's and half I's is about appropriate . The reason can be explained as the following: if there are too many O's in the rule table, there is a greater chance that any 5-neighbor configuration will be mapped to state value 0. Consequentlythe pattern generate d tends to have a lot of O's which can hardly be an interesting situation. The same argument can be applied to the situation with too many 1 's. A more quantitative study has been carCREATE YOUR OWN PRETTY PICTURES ried out in [6, 7], which shows that the optimal filling The number of cellular automata rules with next density in the rule table for interesting rules is not acneares t neighbors couplings is very large. Since there tually 0.5, and this optimal density moves away from are 2^ = 32 possible 5-neighbor configurations, and 0.5 when more and more neighbors are included in each of them can map to either 0 or 1, there are 2^" the coupling. The above statemen t is correct only in = 429496729 6 possible rules. Even if we can produce the statistical sense . For next neares t neighbors cellular a spatial-tempora l pattern from each rule in 1 second, automata rules, I still recommen d anyone starting the it is going to take about 138 years to run through all simulation from rules with half-filled rule tables. the rules. Considering the redundanc y due to the The second trick: once you observe a pattern you equivalencebetween rules upon 0-to-l transforma- consider to be interesting, record the rule in the form tions, which will cut the time by half, it still requires of 32-bit sequenc e and gather new rules by randomly a solid 69 years. Obviously, I did not look at all of flipping one or more bits in the rule table. Sometimes , them. There are chances that other interesting patterns flipping even one bit can alter the features of the origwill be discovered by searching further. inal pattern completely. Other times, the new pattern
Fig. 8. Pattern produced using rule (206,176,186,98) .
Complex patterns
Fig. 9. Pattern produced using rule (195J 88,227 J 46). This is a close relative of the rule for Fig. 7, produced by flipping the third bit from the right in the rule table (from 0 to 1).
is almost the same with the old one, but there are chances that you might end up with fresh pictures with interesting new looks. For example, the rule which produces the picture in Fig. 9 is a ''close relative'' of the rule in Fig. 7, by flipping the third bit from the right in the rule table from 0 to 1. [I t is rule (195,188,227,146). ] Comparing the two patterns, we see littl e similarities. Some other pictures generate d by next nearest neighbors cellular automata are collected in [8 ] . I saw even more patterns on the computer screen but I didn't have the chance to print them out. I wish that more wonderful ''cellular automata arts" will appear in the future. Acknowledgements—This paper has grown from a Technical Report[8]. I would like to thank Stephen Wolfram for providing the original graphic program, and Cliff Pickover for encouragin g me to write the material in the present form. The work I have carried out at the Center for Complex Systems Researc h was partly supported by the National Center for Supercomputin g Applications at the University of Illinois, and
partly by the National Science Foundation grant PHYS-8658062. REFERENCES 1. J. von Neumann, The theory of self-reproducin g automata. In A. W. Burks (Ed.), Essays on Cellular Automata y University of Illinoi s Press, Champaign , IL (1966). 2. C. Langton, Self-reproductio n in cellular automata . In D. Farmer, T. Toffoli and S. Wolfram (Eds.), Cellular Automata, North-Holland, Amsterdam (1984); [ reprint of Physica D 10(1/2), 135-144 (1984)]. 3. J. Gleick, Chaos: Making a New Science, Viking, New York (1987). 4. S. Wolfram, Cellular automata as models of complexity. A^fl/wr^ 311 (5985), 419-424 (1984). 5. S. Wolfram (ed.), Theory and Application of Cellular Automata, World Scientific, Singapore (1986). 6. C. Langton, N. Packard and W. Li, Bifurcation-like phenomena in cellular automata rule space (in preparation ) (1989). 7. W. Li, Problems in complex systems . Ph.D. Thesis, unpublished, Columbia University, New York (1989). 8. W. Li, Pretty pictures generate d by two-state five-neighbor cellular automata . CCSR Technical Report No. 15, University of Illinoi s (1988).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
185 Chaos and Graphics
ON THE CONGRUENCE OF BINARY PATTERNS GENERATED BY MODULAR ARITHMETI C ON A PARENT ARRAY AKHLESH LAKHTAKI A
Departmen t of Engineering Science and Mechanics , Pennsylvani a State University, University Park, PA 16802-1401 , USA and DAN N E. PASSOJA
410 East 73rd Street, New York, NY 10021, USA Abstract—Presente d is the idea of the congruenc e of binary gaskets generate d using modular arithmetic operations on a parent array. It is seen that the binary gaskets of prime orders are nontrivial, while the binary gaskets of nonprime orders are congruences . Because material microstructure plays a vital role at nanoscopic scales [1-3], studies on gaskets have become of considerabl e importance in materials science (e.g., [4-6]). Inevitably, these and similar developments in other fields have spawned interest in cellular automata and patterns for their own sakes[7, 8], and several reports (e.g., [9-11]) have come forth in the pages of this journal. In a recent paper, we looked at the esthetics of square patterns generate d by a simple rule involving modular arithmetic with reference to their CIE chromaticity diagrams! 12]. During that work, and a subsequen t follow-up involving some variations of Khayyam's triangle [ 13 ], we chanced upon the concept of congruence of two or more gaskets . The present paper is motivated by a desire to communicate the results of our investigations on congruence . We also note a paper by Sakamoto and Takagi[14], on patterns with residue arithmetic, that was brought to our attention recently. Let .G/ be an array of positive integers <2^ > 0 arranged on the nodes of a lattice in «-dimensiona l space, n > 1; here r is the positional «-index. From this parent array s^ we generate a second array ^(q) with elements hXo) such that ^Xn) = 1, if flrinod ^ = 0, and b,(g) = 0, if
armodq¥^0,
where the integer ^ > 2; we call g the order of the binary gasket ^(q). For the graphical 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 <2^mod P1P2 = 0 <=> {a^mod px = 0 and a^mod P2 = 0 } , while a^mod piP2 ^ 0 <=» { artnodPi ^ 0 and/or «^modP2¥=0}. Hence, br(p\P2) = 1 «=> {br(Px) = 1 and WP2) = 1 } , while br(PiP2) = 0 <=^ {br(pi) = 0 and/or br(p2) = 0 } . An example of this lemma is afforded by Figs. 1-3, wherein it is easy to see that ^ ( 1 5) is the congruenc e of ^ ( 3) and ^ ( 5 ).
Reprintedfrom Comput. & Graphics Vol. 17, No. 5, pag. 613-617, 1993
186
A. LAKHTAKIA and D. E. PASSOJA
Fig. 1. ^ ( 3 ) obtained from .c/ defined as fl„,o = %„ = 1 VAZ ^ 0 and a„ Otherwise. Grays have been used in place of black for esthetic reasons.
Lemma 5. ^{p'"',p") = ^{p") where n^m. It is easily seen thatfl^modp" = 0 =» a^mod p"" = 0. Consequently, Wp") = 1 =• Wp'") = 1, although the converse is not necessarily true. Therefore, all nonzero elements of ^(p") are contained in ^(p"") if « > m. Indeed, one can say that all nonzero elements of all ^(p"), n> 1, are contained in ^(p).
Lemmas 4 and 5 together give a special status to ^(q) with prime q. Any positive integer ^2 can be factored into its prime divisors. Let qn =
and
Fig. 2. Same as Fig. 1, but ^ ( 5 ) .
PVPTP?
187
Congruenc e of binary patterns
m
fiiK
« i wig
mmt
|»« #
Kif
n»«»
| i » |i»i •«$
MftM
ii« if
: * . f . *-lfe!«E3«fe^
ftls
mm
§,»
*"
! , » "^^^ '^
"€^%*
Fig. 3. Same as Fig. 1, but ^ ( 1 5) = <^(3;5).
w h e r e p i, /72, • • • are primes. We exclude all primespi if m, = «/ = 0. Then, Lemma 6. Excluding all primes /?/ such that m^ = Hi = 0, and with kj = m a x [ « ,, m , ], ^{qn',Qm) = The proof can be found by observing that c^(^„; Qm) = 1 iff {a^mod p?' = 0 and fl^mod pf" = 0} for all /. This, in turn, implies that c^(^«; Qm) = ^ iff a^mod p'i' = 0 for all /. Indeed, one can write ^(g„;gm) = Corollary 7: ^{quQi) = ^{QiQi) if ^i and ^2 do not have a prime divisor in common. Corollary 8: ^(g'";g") = M(g") where « > m. I n closing, we have presente d the idea of the congruence of binary gaskets generate d using modular arithmetic operations on a parent array. We have shown that the binary gaskets of prime orders are nontrivial, while the binary gaskets of nonprime orders are congruences .
10. 11. 12.
REFERENCE S R. Messier, Toward quantification of thin film morphology. J. Vacuum ScL Tech. A4, 490-495 (1986). D. E. Passoja , Fundamenta l relationships between energy and geometry in fracture. Adv. Ceramics 22, 101-126 (1988).
13. 14.
J. J. Mecholsky, T. J. Mackin, and D. E. Passoja , Selfsimilar crack propagation in brittle materials. Adv. Ceramics 22, 127-134(1988) . A. Lakhtakia, R. Messier, V. K. Varadan, and V. V. Varadan, Use of combinatorial algebra for diffusfon on fractals. Phys. Rev. A34,2501-2504 (1986); errata: 35,1445 (1987). G. Jin, B. Feng, and D. Feng, Optical diffraction on Sierpinski carpet. Chin. Phys. Lett. 5, 9-12 (1988). J. C. Lee and J. E. Main, Scale-dependen t lacunarity and fractal Ising models. J. Phys. A: Math. Gen. 22, 37313735(1989). O. Martin, A. M. Odlyzko, and S. Wolfram, Algebraic properties of cellular automata . Comm. Math. Phys. 93, 219-258(1984) . C. A. Pickover, Computers, Patterns, Chaos and Beauty, St. Martin's Press, New York (1990). A. Lakhtakia, A simple gasket derived from prime numbers. Comp. & Graph. 13, 57-58 (1989). M. Szyszkowicz , A simple gasket derived from the logistic parabola. Comp & Graph. 14, 335-336 (1990). M. Szyszkowicz, Patterns generate d by logical operators . Comp & Graph. 15, 299-300 (1991). D. E. Passoja and A. Lakhtakia, Carpetsand rugs: An exercise in numbers. Leonardo 25, 69-71 (1992). [In this paper, Color Plate A No. 3 and its legend should be interchange d with Figure 2 and its legend.] D. E. Passoja and A. Lakhtakia, Variations on a Persian theme. J. Rec. Math. 25, 1-5 (1992). M. Sakamoto and M. Takagi, Residue patterns and their application to graphic design. Forma 6, 115-127 (1991).
188
A. LAKHTAKI A and D. E. PASSOJA
APPENDIX
10 20
!! * n M ! n !! n ! ! ! ! ! ! ! ! ! M ! ! ! ! ! ! ! ! ! ! 2 ! ! ! ! ! ! n ! ! ! ! ! ! M U ! ! ! ! ! n ! ! ! ! ! ! I ! ! * ! ! ! ! ! ! ! ! ! ! ! ! ! Program: Congruence !! ! ! ! ! ! ! ! ! ! > 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<,1 !White IF Suin=0 THEN GOTO 980 IGrey 1 IF Suin=2 THEN AREA INTENSITY .75,-.75,,.75 IF Suin=2 THEN GOTO 970 IGrey 2 IF Sum=l THEN AREA INTENSITY .5,,.5,.5 IF Sum=l THEN GOTO 970 IF Suni=3 THEN AREA INTENSITY .25,-.25,..25 IGrey 3 IF Suin=3 THEN GOTO 970 1 Black IF Sum=4 THEN AREA INTENSITY 0,0,-0 IF Suin=4 THEN GOTO 970 = THEN RECTANGLE H,,H,FILL IF A(Row,Col) =1 = THEN RECTANGLE H,,H,FILL IF A(Row,Col) =0 NEXT Col NEXT Row !!!!!!!1!!!!!!!!!!!!!!!!!!!!M!!!!!I!I!!!!!!I1!!!!!!!!!!!!!!!!!!!!! PAUSE !!!!!! !!!!!II!!1I!!!!I!!!I!II!!!!M!!M!I!!!1!!!!!!!!M!!!!!!!!1!!! •!!!!!!1!»!1Inkjet'printing'subroutine *!iI!11!! Ii1!!!! I! 11 i 1!! 1 i 1!! !!!!!!! M!M!I!!!!!!1!!!!!!!!!!!!I!!!!!!!!!!I!II!!I!I!!!!!!!!!!IM! FOR K=i TO 10 LOADSUB ALL FROM "GDUMP_C" Gduinp_colored(CRT, 7 0 1 , "NORMAL" , 1 8 0 , "OFF" ) PAUSE NEXT K !!1I!M!!!!!!!!1!!!I!!!II!!!!!!!!!!!!!!!III!!!M!!!!!II!!!!!I!!!!!! !!!!I!!!!!I!!I!!!!!!!I!!!!!!M!!I!!!MMM!!!!!!!I!!!!I!I!!!!!I!!!! END SUB Printmat(A(*)) SUBEND !!!!!!!!!II!I!!!I!!!!!!II!I!!!!!!!II!!!!!!!!!!!!!!!I!!II!I!!!!!!!!!
189
This Page Intentionally Left Blank
191
Compiit & Graphics Vol. 13. No. 1. pp. 57-58. 1989 Primed in Great Britain.
Chaos and Graphics
A SIMPLE GASKET DERIVED FROM PRIME NUMBERS AKHLESH LAKHTAKIA
Department of Engineering Science and Mechanics, Pennsylvania State University, University Park, PA 16802 World inside a world inside a world, without end. Uwa-t 'uwa, in our language. Chinua Achebe (Anthills of the Savannah) Abstract—Well-known gaskets are fractal because increasingly larger voids are created as these structures evolve. As a counter-example, a gasket is constnicted using prime numbers, which does not appear to have larger voids as it evolves.
Generally, well-known gaskets, such as the Sierpinski gasket [1], are fractal because increasingly larger voids are created as these structures evolve. Given here is an example, however, which does not seem to have voids of indiscriminately larger sizes appear as the gasket grows. Consider the rectangular array of numbers/y whose first row (/ = 1) is given as fij = Pj\ 7 = 1,2, 3 , . . . ,
(1)
[Pj} being the sequence of all primes arranged in order of increasing magnitude with pi = 2. The other rows of this array are created using the rule fi-i^\j
Mij'fu
(2)
The exponentsfi?clearly indicate that this is a self-affine, and not a self-similar structure[3, 4]. This is because varying values of d would be obtained by sampling different portions of the gasket. As is also obvious from Table 1, the gasket grows Euclidean as it evolves, i.e., its asymptotic dimension could possibly equal its Euclidean dimension of 2. Since the number of primes is unbounded, as per a theorem due to Euclid [ 5 ], this does not imply that more voids will eventually not appear as / increases; it could simply mean that the number of massless nodes would grow almost in constant proportion to the number of nodes with unit mass. It is known that the number of primes less than a large integer n can be estimated as «/ln(«). Prime numbers appear as ordered pairs; e.g., the twins {3, 5} or {59,61} which are consecutive primes separated by a difference of 2, as quadruples {7, 11} or {13, 17} which are consecutive primes separated by a difference of 4, and so on. The author does not know, however, of any general patterns of twins and quadruples, etc. Hence, it may not be possible to analyze the presented gasket using number theory. Yet, despite the fact that the seeds {pj} are not stochastically determined, the various features of the gasket described here are similar to those of some cellular automata generated with recursion rules similar to (2) but with 'random' seeds[6]; in particular, comparison with the cover page of the premier issue of the journal Complex Systems is invited. Therefore, statistical analysis of this gasket may be of importance.
which is either zero or a multiple of 2. However, it appears that/+ij = 1 for all / ^ 1, although that conclusion has not been proved analytically [ 2 ]. The prime number gasket is defined by the triangular array g^ with (\)gij =fij, Ufij = 0, and (ii) ^/,= 1, if otherwise. The resuhing structure appears superposed on a rightangled triangle when the gasket is terminated at some / = /. Shown in Fig. 1 is the initial 200 X 200 segment of the gasket for / = 669 (i.e., Pi = 4999). The zeros of the gasket are coded black. As can be observed from thesefigures,the gaskefs voids do not indiscriminately increase in size with increasing gasket size. Furthermore, many of the voids have tails, and some intervoid connectivities also exist. Suppose the gasket lies on a square lattice whose Table 1. For the prime number gasket. successive rows and columns are a unit distance apart; Dimension as per m ^ r'' let m(r) be the sum of all gij contained in the quadrant Range of r used of radius r and centered at the site i = j = 1. As per 1 ^ r :s 470 1.88460 the power law m ^ r'^, ^ will be the "fractal" dimension 10 ^ r ^ 470 1.93406 50 ^ r ^ 470 1.95315 of the portions of the gaskets thus explored. Given in 1.96549 Table 1 are the various measures of d obtained from 100 ^ r ^ 470 1.96926 200 ^ r ^ 470 curve-fitting the power law over various ranges of r. Reprintedfrom Comput. & Graphics Vol. 13, No. 1, pag. 57-58, 1989
192
AKHLESH LAKHTAKIA
Fig. I. The 200 X 200 lower left-hand segment of the prime number gasket.
REFERENCES
B. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, New York (1983). W. J. LeVecque, Fundamentals of Number Theory, Addison-Wesley, Reading, MA, (1977). A. Lakhtakia, R. Messier, V. K. Varadan and V. V. Varadan. Self-similarity versus self-affinity: The Sierpinski gasket revisited. / Phys. A: Math. Gen. 19, L985-L989 (1986).
4. B. B. Mandelbrot, Self-affine fractal sets, I, in Fractals in Physics, L. Pietronero and E. Tosatti, eds. North-Holland, Amsterdam (1986). 5. T. Nagell, Introduction to Number Theory. Almqvist & Wiksell, Stockholm (1951). 6. O. Martin, A. M. Odlyzko and S. Wolfram, Algebraic properties of cellular automata. Commun. Math. Phys. 93,219-258(1984).
193
Comput. & Graphics Vol. 17, No. 1, pp. 95-102, Printed in Great Britain.
Chaos and Graphics
DISCRETE APPROXIMATION OF THE KOCH CURVE SAM CHUNG HWANG and HYUN SEUNG YANG *
Departmen t of Computer Science , Center for Artificial Intelligence Research , Korea Advanced Institute , YooSung-ku, Daejon, Korea 305-701 of Science and Technology, 373-1, KooSung-dong Abstract—Existing algorithms for Koch curve generatio n do not consider the discrete environmen t of the computer. They do not define the termination condition explicitly. Therefore, generatio n of the curve must be terminated in ad-hoc manners . This paper describe s a new algorithm for discretely approximate d Koch curve generatio n which produces only the points on the limit Koch curve and describe s the mathematicall y well defined termination condition. 1. PREVIOUS ALGORITHMS OF KOCH CURVE GENERATION
In computer graphics, various shapes of nature, mountains, terrains, trees and clouds,are represente d by fractals[l, 2, 3]. Many fractal generation methods have been developed and used to create images of natural scenes [4, 5,6, 7 ]. Cantor dusts as seen in Saturn's ring, Julia sets, Mandelbrot sets, and Koch curves are classical fractals[8]. Among these, the Koch curve is defined by initiators and generator s and produced by recursively replacing each initiator by a generator . There are two representativ e algorithms for generating Koch curves. 1.1. Recursive substitution {Mandelbrot's generation)[^] Mandelbrot defined the Koch curve, as a rough model for coastlines , by initiators and generators . He generate d the Koch curves by the following three steps
3. Repeat 1, 2 until the desired number of points approximating Coo is reached . In this algorithm, the termination condition is also not mathematicall y well defined. Generation of the Koch curve must be stopped in an ad-hoc manner. Because a pixel {x,y) of the image plane correspond s to the domain {x -\- x\ y -\- y') where —Ax/2 < x' < Ax/2, -Ay/2 < y' < Ay/2 and Ax, Aj; are the row and column length of a pixel, some of the generate d points (x, y) of the image may be visited repeatedly . To generate the Koch curve automatically without user interaction, the termination condition of the curve generation algorithm must be mathematicall y well defined. For termination conditions, we defined the tolerable distance e between the limit Koch curve Coo and the approximate d Koch curve Ck. 2. THE KOCH SYSTEM
The Koch system that generate s the Koch curve is 1. Select an initiator (arbitrary polygon). informally defined as follows [ 8 ]. The Koch curve is 2. Replace edges of initiator by generator s (open poly- constructe d by recursively replacing the initiator, which gon). is a set of edges of a polygon with the generator , which 3. Repeat 1, 2 until appropriate points are generated . is an open polygon. This section describes the formal definition of Koch system analogous to Mandelbrot's Because initiators are not a set of vectors but a set notion. of edges, direction of the Koch curve generation is If a poly vector is an ordered set of vectors in a plane controlled implicitly and is difficult to manipulate. The denoted by A = ^i • • • a„, and if we denote WSLSSL set termination condition of the Koch curve generation of all vectors in the given plane and W* SLS the class is not mathematicall y well defined. Thus, generation of all poly vectors in the given plane, the Koch system must be stopped in an ad-hoc manner. may be defined as follows: 1.2. Attraction method [ 9 ] Prusinkiewicz defined the initiator by a set of vectors to easily control the curve generation direction. He also defined the generator s by a set of transformation s of the vectors. He characterize d Koch curves as the smallest nonempty sets closed with respect to a union of similarities on the plane and named the smallest d nonempty sets the limit Koch curve C^o. He generate the Koch curves by the following three steps. 1. Start from a set ^o = {z} where z E CQO 2. Given set 5„, construct Sn+\ by applying all transformations (/)/ in $ to all points z in Coo. * To whom the correspondenc e should be addressed .
Definition 1: A Koch system is a pair K= (I^P} where the initiator / is poly vector Oi • • • ^i E W^ and the production Pis a pair ( ?, 3i • • ^Qm)^ ^X W*. The production P is defined by a set of vector transformations (translation, rotation, scaling) 0/ E $, m = 1 , . . ., m, where p (f), = 5/ • The production P is denoted (ixpi,ypi),ixp2,yp2)}, b y p - ^ 5 i - • • 5m wherep = Qi = {(Xix, yix)AXi2, yti)) ^rid Xpx = Xi^ypi = yn, Xp2 — Xm2,
yp2 —
ym2-
Figure 1 describes the production P of the snowflake. The initiator is an arbitrary vector in a 2D plane and the production is a set of transformation s of the initiator. Denote that the initiator and the generato r of Mandelbrot are compose d of polygons and in the Prusink-
Reprintedfrom Comput. & Graphics Vol. 17, No. 1, pag. 95-102, 1993
194
SAM CHUNG HWANG and HYUN SEUNG YAN G
wicz's production (correspondin g to generator), the first point (x^i , y^i) and the last point {Xp2, ypi) of the predecesso r p need not be the first point ( x n, >^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) ^ <^o
1-7
< e.
vector a = {{xx, >^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, = <(-^on, yo/i), {xon, yon)) Co, drawpoint at {xot 1, yot 1) and (xo/2, yon)e{\ - 7 ) 1 • For k= 1 to A:: log^ do
Ck = C , _ i$ For each vector a= ((Xkix, ykiOAxkn, ykn)} ^ Ck, drawpoint at (Xkix, ykn) and {Xkn, ykn) • While Ck^ 0 _^ For each vector 3 = ((Xkix, ykn), (Xkn, ykn)) E Ck whose length > 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 = <(xl, yl), (x2, y2)> 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 <
(c)
E
\,
^(1-7)1 do
Ck = Ck-x^ For each vector a = ({Xkix,ykii), (Xkn, ykn)} ^ Ck drawpoint at (x/t/i, y;t/i) and (Xkn, ykn) • While Ck^ 0 ^ For each vector 3 = ({Xkix, ykn), {Xkn, ykn)) ^ Ck whose length > 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 / = {<(0, 0), (0, 511)>, <(0, 511), (443, 256)>, <(443, 256), (0,
Ifdx = (X2 - x,)/3, dy = (^2 - yi)/X rx = dx/2 - V 3 ^y/2 and r>^ = 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 / = <(0, 0), (0, 511 )> 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 -^ = <(xl.yl),(x2,y2)> dragon curve is 1/V2. When the initiator / = <( 128, Xo = (xl, yl) X2= (x2, y2) 256), (384, 256)), the distance do between Co and Cx Xi = ( ( x l + x 2 + y 2 - y l ) / 2 , ( y l + y2 + x l - x 2 ) / 2 ) is 128. When the tolerable distance e is 4.0, the apd curve Fig. 5. Production of the dragon curve, (a) Initiator / = ((x 1, proximated curve is CM and the approximate with tolerable distance e = 1.0 is Ci 6. y\), (x2, >;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 = <(xl. yl), (x2. y2)> 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 / = <(xl, y 1), {xl, y2))\ (b) Production p => 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)
^ = <(xl, yl). (x2, y2)> 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 = <(xl, yl), (x2, y2)> 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<^-'>)
Each choice of sign in one of these formulas locates a particular spire's center, and describes the spinal curve as a function of z. Clearly the location of the spine of a spire at level k is given by a polynomial of degree (k — 1) in the shrinkage factor z. The radius of the corresponding cross-section circle is z^. We have created a 3-D representation of variabledimension cheese, but the rendering of these spires is not particularly striking or informative, and so is omitted. A simple two-dimensional plot of the polynomial curves above is sufficient to give a correct impression of the shape. Indeed, a similarfigureappears in Mandelbrot [2] (p. 81). 3. THE SOLENOID, A COUSIN OF THE CANTOR SET
The solenoid is a topological construction which arises from, and is related to, the Cantor set. It is one of the principal examples of a strange attractor in dynamical systems theory. In this paper, we do not dwell on its intersting topological properties, for that would run to too many pages (see [ 1,5,6 ] for further reading). Instead, we develop some formulas which help to elucidate its self-similar structure, and allow computer graphical generation of images which are pleasing in their simplicity and grace, yet sufficiently complex to intrigue the eye.
204
CLIFFORD A. PICKOVER and KEVIN MCCARTY
Program 2. Program Code for Cantor Cheese Cross-Sections (Recursive) The pseudocode for generating cheese cross-sections can be simplified a manner which more clearly reveals the recursive nature of the construction. frac I eve I -
in
size reduction factor, < 0.5 number of generations (recursive depth)
Procedure DoCircle(x, y, radius, level : integer); begin (* first draw the enclosing circle *) DrawCircleAt(x, y, radius);
end;
(* if there are further levels, then work (* on the left circle, then the right circle if (level > 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(<2 + /7 + c)^"\ resulting in a Pasca on each of the three faces [ 3 ]. Mueller labels the initial plane, containing one term, as level 0 (Fig. 3) which turns out to be a good choice of notation. Terms on higher levels are expresse d as the product of two binomial coefficients. n subdivided into 4 tetrahedr a and 1 ocFig. 1. A tetrahedro J. Staib and L. Staib[4] pubHshed The Pascal pyrtahedron. The top tetrahedro n is likewise subdivided into 5 parts and the top tetrahedro n in that group is subdivided amid in 1978. Like Mueller, the Staibs also used a again. stack of successivel y larger triangles to form a pyramid Reprintedfrom Comput. & Graphics Vol 15, No. 2, pag. 303-311, 1991
208
JIM NUGENT (0,2.2)
(0,2,0) (2,2,2) (0,1,0)
(0,0,0) (2,0.2)
10
n in 3D analog of Pascal' s Fig. 3. Levels or slices of tetrahedro triangle.
(see Fig. 3). They developed a coordinate notation for each point on each triangular level, a system for determining which of the small triangles were centered above a point on the next level, that the sums of the trinomial coefficients associate d with the vertices of an upper triangle were equal to the trinomial coefficient found directly below that triangle, that a trinomial expansion could be generalize d from a binomial expansion and that a BASIC computer program could be written to generate the coefficients of (x -\- y -\- z)" in the form of layers of a pyramid. In a 1938 book, Stein-
Fig. 5. Tetrahedra l coordinate s in relation to Cartesia n cube corner,
haus[5] gives a short example of a method of determining winners in a/hree-wa y election with a similar notation except that he breaks the triangle into hexagonal cells. In 1986, Bollinger attempted to lay pyramid power to rest with: It would seem that in spite of the appea l of an array for multinomial coefficients similar to the triangle for binomials, one is better off for most purpose s using a convenien t algorithm to generat e the m-part compositions of n, from which the exponents on the x, and the multinomial associate d with a given term are immediately available[6]. 3. THE PROPER PARADIGM
Two key concepts needed for a clearer understandin g of the 3D analog of Pascal's triangle are missing from these earlier works.
(0,4,0)
,1,3)
,(0,0,4) Fig. 4. Component s of oct-tet lattice between levels 6 and 7 of 3D analog of Pascal' s triangle. Fifteen point-down tetrahedr a l coordinate s for level 4 of 3D analog of a array while Fig. 6. Tetrahedra nest into 15 voids on the top of the 21 octahedr s triangle. The sum of the coordinate s for each element 28 point-up tetrahedr a nest into the 28 voids on the bottom Pascal' of the level equals the level index of 4. . of the octahedra
209
Pascal' s pyramid for PC users
analog of Pascal's triangle are connecte d by an octahedron-tetrahedro n lattice. Some of the tetrahedra are oriented with a point up and some with a face up (Fig. 4). Loeb states it clearly: a [or pyrIt is not possible tofill space with regular tetrahedr amids] only; four tetrahedr a and an octahedro n are necessar y n having eight times the volume (twice to produce a tetrahedro the linear dimension) of the original tetrahedro n [ 7 ]. In order to fill space,octahedra are used in combination with tetrahedra (see Fig. 1). Subdividing the pyramid s makesit a simple task to into these two component model the 3D analog of Pascal's triangle. ) can be Second, Pascal's pyramid (or tetrahedron modeled with ordinary Cartesian coordinates . A tetFig. 7. A 3D "Bell" curve. A plot of the values of the elements rahedron is point-for-point congruent to a cube corner of level 74 of the 3D analog of Pascal' s triangle. Coefficients Fig. 5). If you visualize the X, Y, and Z axes as the of the trinomial expansio n of (x + >' + 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;:REAL); CONST kmax= 100; R=2.0;
VAR
A::INTEGER;
xI,x2,yI,r:REAU
BEGIN xl:=0;yl:=0] k:=0; -\-yl*y]); r—SQRT(xl*xI WHILE ({r;); END;
Fig. 6. Fig. 4 (in white) and Fig, 5 (in black) merged against a grey background .
Efficient computer graphics of the Mandelbrot set k:=k-\-U END; IF (k=kmax) THEN draw(x,y); END; With the second program many unnecessar y operations are eliminated. 6. AVOIDING FLOATING-POINT OPERATIONS
It is possible to go one step further and suppres s at least two floating-pointoperations , replacing them with integer calculations. If we examine the code of Program 2 more closely, we will find one trivial operation for a binary computer. The calculation 2*x\*y\ could be simplified if we note how the floating-point result is stored in the computer. In Turbo Pasca l 3.0 real variables are stored in six bytes. The first byte contains the binary exponent and the remaining 5 bytes contain the fractional part of the number. It is possible to multiply a floating-point number by two simply by increasing its exponent by 1. All one has to know is where the real number is stored. Turbo Pasca l provides the function ADDR that could be used for this purpose. The following piece of code multiplies a floatingpoint number by two: VAR mfBYTE; xiREAL; m:=ADDR(x);
229
PROCEDURE plot(x,};:REAL); CONST kmax= \00; VAR A::INTEGER; xl,yl,b2,b3:^^^U BEGIN xl:=x; yl:=y', b2:=SQR{x); b3:=SQR{y)r:=b2-\-b3',k:=l; WHIL E ((«^<131) AND (k
We can now raise the stakes again and aim for even higher speeds . There is actually a way to suppres s more This same method could be used with any other Pasca l floating-point operations , but it requires eventually a version that uses a similar representatio n for the float- littl e more programming, especially if a 16 bit machine ing-point numbers. is being used. The speed up obtained by suppressin g Another floating-point operation that could be sim- all floating-point operations varies according to the plified is the comparison r < R. Remembe r that R is computer. In a Macintosh Plus, the difference between equal to 4.0. This real is represente d in Turbo Pasca l all-floating-point and all-integer can be dramatic. as the number with fractional part 1 and exponent 131 Floating-point operations in the Macintosh take a long (Turbo Pasca l adds 128 to the exponent). If n is a time to perform, even longer than in an IBM-PC with pointer to the binary exponent of r, it suffices to ask if no 8087. If one already has a floating-point co-prothe contents of the pointed address is greater than 131. cessor, one can nonetheles s gain a significant speed up. The comparison in the "WHILE " above could be reThe main idea is the following: we do not actually written: need all the power of unlimited floating-point calculations becaus e the numbers we are using always remain in a small region of the complex plane. The x VAR«:^BYTE; and y coordinates are never bigger in absolute value than 2 (if they are, we have already left the escape «:=ADDR(r); circle of radius 2). For the same reason, the squares WHIL E ((^'^ < 131)AND(/:
230
RAUL ROJAS
be used for the sign of the number (in a normal two'scomplement representation) . Using this convention the integer 1 represent s the smallest floating point that can be represente d with our convention, in this case 1 /2 * \ That is enough for the first zooms (without too much magnification) of the Mandelbrot set. The first difficulty is how to multiply two numbers using this convention. In Pasca l or C we get an integer overflow each time we multiply any number greater than zero in our representatio n (that means, with more than 13 significant bits). It is most probable that one will have to program the "plot" routine in assemble r to take advantag e of extended accumulators . With an 8086 processor , two signed integers of 16 bits can be multiplied and the result is stored in two registers (DX and AX) . With a 68020 two 32 bit, signed integers can be multiplied and the result is stored in 64 bits that can be manipulated later. With the appropriate shift, one can always normalize the result to bring it back to the desired representatio n (with 13 or more fractional bits). The routine in Program 4 was programme d in a computer with 32 bit integers. It was assume d that the 13 leftmost bits encoded the fractional part of the numbers used. In this representatio n four is equal to the binary number 100 followed by 13 zeroes. In order to multiply two fixed-point numbers, one has to make an integer multiplication and shift the result to the right by 13 places (using the function arithmetic shift right [ASR]). We controlled this routine simply by limitin g the value of r to 4, but this test could have been made after each multiplication in order to stop the iteration process earlier and avoid an overflow. Program 4 PROCEDURE plot(x,>^:REAL); CONSTA:w«x=100; VAR Jc7,y7,r,^2,Z7i,A::INTEGER ; BEGIN xl:=x\
yl'.=y\
^2:=ASR(SQR(x7),13) ; b3—ASR(SQR(yl),l3); r-b2^b3\ WHIL E ((r;7),13) ; r:=b2-\-b3', k'=k+U END; IF ik=kmax) THEN drawix.y); END; 7?:=ASL(1,15);
As can be seen in the listing, R was initialized to 4 shifting 1 fifteen places to the left (with ASL). The product of xJ and yl was multiplied by two simply by shifting it only 12 places to the right (and not 13). The rest of the routine is as simple as before. We used only 13 fractional bits in order to avoid any overflow condition. If one is interested in going very deep into the Mandelbrot set, then 13 bits for the fractional part are not enough. With a 32 bit processor , up to 29 bits can be used for the fractional part without too much programming pain. If more precision is desired, the fixed-point representatio n should be extended to 64 bits using two long words. In each case it should be done in assemble r to get the best results. 8. THE DIVIDE AND CONQUER TECHNIQUE
All the refinements mentioned previously do not essentially change the calculation procedure . We still have to go row by row, pixel by pixel, calculating the escape time. However, it is possible to get an additional speed up by using a rather different strategy to calculate the points in the graphic. The main idea is very simple. The Mandelbrot set is a connecte d set. That means that each point of it is not isolated. There is always a path of points in the Mandelbrot set communicating two other arbitrary points in the set. The complemen t of the Mandelbrot set is also connected . Then we can do the following: instead of drawing the Mandelbrot set row by row in a window of the screen, we could draw first of all the sides of the window. If we use black for points in the Mandelbrot set and white for points outside of it, we have only to look at the color of the sides. If the sides contain only black points, then we can be sure that the whole window is black, becaus e it contains only points in the Mandelbrot set. This happens becaus e if a white point were to be located somewher e in the window, there should be a path of white points going out of it (to the rest of the complemen t of the Mandelbrot set) and at least one of the sides should contain white points (see Fig. 7). The reverse is also true: if the sides of the window are found to be white, then the whole window can be colored white. No black points could be inside, becaus e that would imply that a path of black points should traverse the window. The only exception is when we are using a window that totally contains the Mandelbrot set. In this case we have to check only if the origin is located in the window. We can adopt the following recursive strategy: (a) Define the coordinates of a window in the real plane and its size in pixels. (b) Look at how many pixels the window has: If the window has 2 by 2 pixels, draw the four points one by one and stop. (c) If the window has more than 2 by 2 pixels, draw the four sides of the window. (d) Look at the sides of the window: (d. 1) If the four sides have the same color, paint the whole window with this color.
Efficient computer graphics of the Mandelbrot set
231
tently faster than the first when the size of the screen region was bigger than 32 by 32 pixels. We also made some graphics using a laser printer and a resolution of about 1500 by 1500 pixels. The results confirmed that the alternative method grows even faster in comparison to the whole scanning method when the resolution used increases . Using a floating-point co-processo r in a workstation, our method consume d a third of the time of the normal method (using 256 by 256 pixels and 25 iterations) when the main island of the Mandelbrot set was drawn. For a window size of 1024 by 1024 pixels and 25 iterations, our method consume d about a sixth of the time consume d by the normal program. Figure 8 shows the borders of the windows used in the Fig. 7. If the sides of the reference frame are black, the whole calculation of the main island of the Mandelbrot set. frame is black. All the points inside the windows were not calculated, but rather deduced from the color of the window sides. It is easy to see that many calculations were saved. (d.2) If there are different colors in the sides of It should be evident why the improved method grows the window, divide it into two smaller win- relatively faster each time the resolution is increased . dows (drawing a line in the middle) and If one starts with a window size of say 256 by 256 and repeat the whole procedure for each one one increase s this to 512 by 512, then there are four starting with step (b). times as many points as before. With the traditional method, four times more calculations are made, so With the above method one should simply take care that the CPU time grows linearly with the number of to divide the original window in such a way that the pixels used. With the other method, one does not cal"cut" is done through the middle and perpendicula r culate all points on the screen. Our experience is that to the two largest sides. In this way, the resulting sub- the CPU time grows by a factor of about three for each windows are as regular as possible. The method can increase in the number of pixels by a factor of four. also be used to paint the escape regions of the Man- Figure 9 is a graph that shows how the CPU time indelbrot set with different colors. That means that not crease s with each resolution increase using the two only calculations within the regions with infinite escape methods. The first line (at 45 degrees ) shows how the time are saved, but in other regions of the plane as CPU-time increase s by four each time the number of well. pixels is quadrupled , when using the all-scan method. To anticipate criticism of this method, let me point The second line shows that the CPU-time increase s by out the following. The Mandelbrot set possesse s ex- a factor of about 3 for each quadrupling of the pixel tremely fine branches that connect one part of the set count, when only the Mandelbrot set is plotted. We to another. If the number of iterations is big enough, gathered these statistics using the main island of the it could well be the case that one of these branches goes to the inside of a window with white sides unnoticed. The reason is that we make a discrete calcu.'.\ ^-. lation each time taking the center of each pixel as a representativ e for the whole pixel. If the branch is fine enough to go between the centers of two neighbor pixels without touching them, then this branch will not be detected and we could lose parts of the set. Although P^*^' ^^"^^^^^^^ this criticism is correct, our practical experience is that this case does not occur very frequently if one is using a well combined pair of values for the resolution (pixels per side) and the iteration count. In many graphics that we made using the normal method and this variant, only a few points got lost and the differences were for the most part unnoticeable . If one is unwilling to sacrifice any single point of the graphic, this method ;JfSir' trfrt can still be used to explore the Mandelbrot set looking for an interesting region. Then one can shift to a row by row scanning of the whole window. But believe it or not, in most cases the difference is hard to notice. We conducted experiments using a program that scanne d the whole screen and a program using the Fig. 8. Borders of the frames used to calculate the Mandelbrot method described . The second program was consisset.
:i*l| E
232
RAUL ROJAS ! [RLuirrTH F*-
1000,0
%k
^
^
^
PST jj relative elapsed time
^
^M^ w 64
128
256
512
1024
-^^v^'
2048
Pixels per side
apF^u^
'"'*'t*k^S^'''^'n©
Fig. 9. Calculation time in function of the pixels per side (relative to the "all-scan" method, 64 X 64 resolution).
Mandelbrot set. Other regions of the plane produced ^^^ similar results. It is very important to mention that Fig. 9 was ob- L > "A. tained using only 25 iterations. If you are using many Fig. 11. Borders of the frames used to calculate Fig. 10. more iterations, the difference between one method and the other could be much more drastic. Instead of a speed up of about 10 with 2048 by 2048 pixels, you Figures 10 and 11 show the same region of the plane. could get speed up of as much as 100 if you are using Both were calculated using 90 iterations. The second 300 iterations or more. shows how many calculations were saved using the We also tested how big the overhead is associated with our method, when compared to the complete dividing method. Figures 12 and 13 show a blow up of a part of the scanning one. In an IBM-PC/AT without floatingpoint co-processor, the overhead was less than 1%, previous graphics. You can see that due to the chaotic when using 25 iterations. That means that we pay al- behavior of the set in this region not too many calmost nothing for avoiding unnecessary calculations. If culations were saved using our method. In cases like the number of iterations increases even more, then the this the performance of both methods converge. overhead becomes negligible. 9. POSSIBLE REFINEMENTS In very chaotic regions of the plane, the savings of There are many other refinements that could be inthis method are much more limited, but one can still troduced. In order to speed up thefloating-pointcalavoid some calculations. In very chaotic regions, it is culations one could program special floating-point possible that the iteration count is already very large routines as described in Section 6. One public domain so each saved calculation must be welcomed. program for the Macintosh (Mandelzot 2.0) implements the techniques discussed here and some others.
Fig. 10. A detail of the Mandelbrot set calculated with 90 iterations.
Fig. 12. A magnification of a detail of Fig. 10.
233
Efficient computer graphics of the Mandelbrot set
partial sums
«fj?l«L^ 1
2 3 4
5 5 5
5 5 5
L cx)lor length=5
color length=0
I
- 1 | ? v . ••;
color length=5 Fig. Al. Line of length 10 with color length 5.
at the color of thefirstpixel and see if the color-length of the line is equal to its length in pixels multiplied by the number of thefirstpixel's color. Fig. 13. Borders of the frames used to calculate Fig. 12. If we have a line of length 10, for example, and all pixels are black, then all partial sums are equal to 0 (black's number is 0). If we look at the last partial sum and it is equal to 0, A more promising field of research would be to in- then we know that the whole line contains only black points. Take the case shown in the Fig. Al. vestigate if previous results for neighboring points could If the first five points are white (color number 1) and the be used for other points. Another technique is discussed last five are black, then the first five partial sums are: 1,2,3, 4, 5. The last five partial sums are: 5,5,5,5,5. The total sum in [ 5 ] . If one is working in a distributed computing envi- is 5 and it is not equal to the pixel length (10) multiplied by ronment, parts of the whole calculation can be sent to the color of thefirstpixel (in this case 1). That is not all. One can divide the line in two parts. The first other computers and the results collected through files part contains the five leftmost pixels and the second the five in the server. Naturally the ultimate in speed would rightmost ones. If we look at the partial sum that corresponds be obtained using a hardware device to do the calcu- to thefifthpixel (5), then we know that thefirstpart contains only white pixels, because this partial sum equals the pixellations at the fastest possible pace. length (5) multiplied by the color of thefirstpixel (1). With the second part we can do the same, but we have to subtract the last partial sum of the first part (in this case 5) REFERENCES 1. M. Bamsley, Fractals Everywhere, Academic Press (1988). from the partial sum that corresponds to the tenth pixel (5 2. A. K. Dewdney, Computer Recreations, Sci. Am. August too). In this case we get zero and we know immediately that the second part of the line contains only black points. (1985). It is very simple with this technique to test if the sides of a 3. B. Mandelbrot, The Fractal Geometry of Nature, Freeman , frame contain all pixels of the same color or not. All we have San Francisco (1982). 4. H. O. Peitgen and O. H. Richter, The Beauty of Fractals. to do is calculate the partial sums for the four sides. If the Images of Complex Dynamical Systems, Springer Verlag, color length of each side equals its pixel length multiplied by the color number of any pixel on the frame, then the whole New York (1986). 5. H. O. Peitgen and D. Saupe, The Science ofFractal Images, frame is made up of a single color. If not, then we have to divide the frame drawing a horizontal or vertical line through Springer Verlag, New York (1988). 6. Peter B. Schroeder, Plotting the Mandelbrot Set, Byte its middle. With the two new frames we can repeat this process. Note that the partial sums can be calculated simultaneously 11(13), December (1986). with the calculation of the pixel's color in a line. The overhead is just one integer addition per pixel. If these partial sums are stored in a stack, then we do not have to recalculate the partial APPENDIX A: HOW TO DETECT FRAMES sums each time we need to know what color the pixels in a OF EQUAL COLOR The only open question in the text is how to test if the sides line are. Once we do not need these partial sums any more of the drawing frame are all the same color when using the (for example, if the whole frame is already completely drawn) divide and conquer technique. There is a way to do this test we can pop them off the stack. In this way we do not need to without recalculating the colors of all the points in the frame store one integer per each pixel of the graphic in the stack. If and without too much overhead. The main idea is the fol- the divide and conquer technique is programmed in a recursive way, a stack is needed which is not greater than 8 times the lowing. We can define a table of color numbers, so that for example size of the side length of the picture. If we are using 1024 by 1024 points, then we need no more than 8192 integers to black is 0, white 1, red 2, green 3, etc. If we draw thefirstside store the partial sums. of our frame in the screen, then we know the color of each pixel on this line. We can then go from left to right (in the case of a horizontal line) and add the color of each pixel to the color of his right neighbor. We can store these partial APPENDIX B sums in the stack and the last element in the stack is then the It is possible to savefloating-pointcalculations even when total sum of all colors in this line. I call this sum the "color a Pascal version does not feature the built in procedure ADDR. length" of the line. It is very simple then to test if the whole All one needs to do is to overiap a real with an integer variable. line has pixels of a single color: all we have to do is to look The real variable can be manipulated then using integer arith-
234
RAOL ROJAS
metic. The following type definition achieves this in most Pascal versions:
VAR numbenoverlap; number.rel:=4.0; number.int:=number.int+16*256*256;
TYPE
overlap:RECORD boolean of true: (rel:real); false: (int:integer); END;
The following program fragment allows one to investigate how the floating-point numbers are stored in the computer (supposing each real and integer variable occupies the same space, for example 32 bits):
After this calculation number.rel is equal to 8. The number 16*256 *256 could be defined as a constant in order to avoid recalculating it each time. By adding this constant we increase the exponent of the real number by one. It is possible also to ask if a real variable is bigger than four, only by looking at the exponent. In a SUN-3 computer the following code fragment does the trick: VAR numbenoverlap;
VAR numbenoverlap; number.rel:=5.0; number.rel:=4.0 writeln(number.int);
In a SUN-3 workstation the following code fragment permits us to multiply a real variable by two:
if(number.int>( 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)\
<5
whenever \h\ < €. This condition is stronger than saying that all the functions fi are continuous at x, because it requires the same € to work for all the functions. If all the derivatives of the functions/ are bounded by the same constant, then the set of functions is equicontinuous. The Julia set of a complex function/( x) is the set of complex numbers z such that the set of all iterates of/, {/^'^}, is not equicontinuous at z. For quaternion functions we take the same definition, replacing absolute values in the above statement with the quaternion norm. This definition does not necessarily coincide with the one we used above, unless some restrictions are placed on the functions/. I f / i s a complex polynomial then Montel's theorem can be used to show the equivalence (see [1 ]). If / is a quaternion polynomial the equivalence is not clear. It may occur that for some quaternion polynomials the boundary of Acknowledgment—Discussions with B. Mandelbrot in 1980- the set of points attracted to infinity is a proper subset of the 82 exposed me to the notion of complex planar Julia sets, Julia set, although this has not been observed. and stimulated me to pursue the research of this article. Evelyn Melton was a major encouragement in the writing of this arDerivatives of quaternion polynomials ticle. She carefully read the manuscript, advising me about To reason about attraction and repulsion in the quaternions needed improvements, and provided many of the illustrations. it is useful to have a means of computing derivatives. Because quaternion polynomials are mappings on four-dimensional REFERENCES space, their derivatives cannot be represented simply as a nu1. P. Blanchard, Complex analytic dynamics on the Riemerical value. The derivative of such a function /(x) at a mann sphere. Bull. Amer. Math Soc. H( I), 85-141 (July point X must be regarded instead as the Jacobian matrix, or 1984). the linear transformation that best approximates the poly2. Sir W. R. Hamilton, Elements of Quaternions. Vols. 1 nomial near the point x. In other words, the derivative Tof and II, Reprinted by Chelsea Publ. Co., New York (1969). / at X is a linear transformation such that fix -i- y) is ap3. G. Julia, Memoire sur Piteration des fonctions rationnelles. proximately equal t o / ( x ) -I- T{y) for y near 0. J. Math Pure Appl. 4, 47-245 (1918). Reprinted in An easy way of representing this linear transformation is Oeuvres de Gaston Julia, Vol. I, Gautier-Villars, Paris to specify what it does to a quaternion y. The derivative of a (1968). polynomial is the sum of the derivatives of the monomials in 4. A. McAulay, Utility of Quaternions in Physics, MacMillan it, so it is enough to differentiate monomials. The derivative and Co., London (1893). of a monomial, evaluated at y, is the sum of all the monomials 5. B. B. Mandelbrot, The Fractal Geometry ofNature, Free- that are each obtained by replacing one occurrence o( x by man, San Francisco (1982). the value y. Some examples: The derivative of x^ at a qua6. B. B. Mandelbrot, Fractal aspects of the iteration of z - • ternion X is the linear transformation that takes a quaternion Xz( I - z) for complex X and z. Ann. N. Y. Acad. Sci. y to the quaternion xy -^ yx. The derivative o(x^ is the trans357,249-259(1980). formation whose value at y is x^y + xyx + yx^. 7. H.-O. Peitsgen and P. H. Richter, The Beauty ofFractals, Springer-Vedag, Beriin, Heidelberg (1986). Attractive cycles in the quaternions 8. A. Norton, Generation and display of geometric fractals We can use the above formulation of the Jacobian derivative in 3-D. Comput. Graphics 16(3), 61-67 (July 1982). to show that attractive cycles for complex polynomials of the 9. A. Norton and E. Melton, Dynamics of e"x( \ - x). Vidform ax^ + b extend to be attractive in four dimensions, imeotape, 1986 ACM Siggraph Electronic Theater. plying that the quaternion Julia sets of such polynomials are 10. R. H. Taylor, Planning and execution of straight line manontrivial extensions of their complex planar counterparts. It nipulator trajectories. IBM J. Res. Devel. 23(4), 424suffices to consider an attractive fixed point p; cycles admit a 436 (July 1979). similar proof. l(p is an attractive fixed point, then we know APPENDIX In this section we provide a mathematical justification for some of the statements in the paper. The mathematical level of this discussion assumes understanding of advanced calculus. Formal definition of Julia sets The usual definition of Julia set is different than the ones we have used in this article. We begin by recalling the notion
the absolute value of the complex derivative satisfies \f'{p)\ < 1. To show that p is attractive in the quaternions, we need to know that Jacobian matrix of / at p, as a linear transformation, has norm less than one. The Jacobian of ax^ -f 6, applied at p to a quaternion y has value a{py + yp). Using the multiplicativity of the quaternion norm, we see that the norm is at most 2\a\ \p\ \y\. Since 2\a\ \p\ is the absolute value of the complex derivative of / at p, we conclude that the Jacobian matrix does in fact have norm less than one.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
247 Chaos and Graphics
SELF-SIMILAR SEQUENCES AND CHAOS FROM GAUSS SUMS AKHLESH LAKHTAKIA' and RUSSELL MESSIER'•-
'Department of Engineering Science & Mechanics, ^Materials Research Laboratory, The Pennsylvania State University, University Park, PA 16802 Abstract—It is shown that the quadratic Gauss sums form self-similar sequences with well-defined scales and similarity dimensions. It is also shown that Gauss sums can be modified to yield intricate chaotic patterns. 1. FRACTAL SEQUENCES
A self-similar (fractal) sequence {f[n]} can be defined by the power law f[S'n]^sVlnl
(1)
with n > 0 ranging over all positive integers, while f[n] may be real or complex. The positive integer s > 1 is called the scale of the sequence, whereas a> 0 is a real number which serves as the similarity (fractal) dimension of the sequence. Provided f[n] ^ 0, it should be noted that
a=
\og{f[s'n]/f[n])/\o${S'n/n).
(2)
which serves to validate the fractal nature[l] of the sequence by explicitly revealing the respective statuses of a and s. The sequence { / [ « ] } is completely determined by the specification of only a subset of its members. These members, countably infinite in number, are: ( i ) / [ l ] or/[5], ( i i ) / [ m ] ; m = 2, 3, 4 , . . . , 5 - 2, j ~ 1, and (iii) f[m]; m> s, (m, s) = 1. From Eq. (1) it is readily seen that/[I] and/[5] are linked by the relation /[^] = ^Y[i];
(3)
hence, the specification of either one of them is sufficient to determine the other. Furthermore, if m < 5, then m(mod s) = m, ox mis relatively prime to 5; therefore, the specifications (ii) cannot be built up from Eq. (1) and must be independently given. Lastly, the specifications (iii) must also be made, since Eq. (1) cannot be used to generate them if the greatest common divisor of m and s is unity. But for any n> s, which has 5 as one of its divisors, f[n] can be ascertained through Eq. (I). In fractal parlance, the specifications (i)-(iii) collectively are the initiators of the sequence, while the power law (1) serves as its generator[2]. A very simple example of such a sequence is the following one. 1, 3, 0, 9, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, . . .
(4a)
which has a scale 5 = 2 and a similarity dimension a = log(3)/log(2). This sequence is replete with zeros, but can be easily augmented to yield a more substantial example, 1, 3, 5, 9, 11, 15, 19, 27, 29, 33, 37, 45, 49, 57, 65, 81, 83, 87, 91, 99, 103, 111,119, 135, 139, 147, 155, 171, 179, 195,211,243,...
(4b)
which too has a scale 5 = 2 and a similarity dimension a = log(3)/log(2). Yet another example is furnished by the sequence 1, 3, 6, 8, 12, 18, 21, 27, 36, 38, 42, 48, 52, 60, 72, 78, 90, 108, 111, 117, 126, 132, 144, 162, 171, 189,216,...
(5)
which has a scale 5 = 3 and a similarity dimension a = log(6)/log(3). 2. FRACTAL SEQUENCES FROM GAUSS SUMS
The bi-indexed numbers defined as the quadratic Gauss sum
(6)
where p and q are positive integers, provide interesting examples of the fractal sequences defined above; / = V( —1) as usual. These numbers have been much investigated in recent years, especially the celebrated Gauss sums ^( 1, ^) which have a long history [ 3 ] dating back to the great Gauss himself. It has been shown by Nagell[4] that ip(p, q) = 2(p(p, q/4),
(7)
provided /? ^ 1 is odd, and q^ 16 is a power of 2. This relation relation forms lorms the me basis oasis of 01 aafamily ramiiy of orfractal iractaisequences sequences {fp[Q]}^Q =^ 1, 1, 2, 2, 33 ,, .. .. .. ,, the the parameterp parameterp identifying identifying {fp[Q]}^Q =^ the genus of the sequence within the family. The members of the p-th sequence thus derived are given by
/.[I] = ( ! + / " ) f^[2] = V(2/'^')-(l + /)
Reprintedfrom Comput. & Graphics Vol 13, No. 1, pag. 59-62, 1989
248
AKHLESH LAKHTAKIA and RUSSELL MESSIER
/ p [ 4 l = <^(/7,4^);
^'= 1 , 2 , 3 ,
/p[4'^'^'] = <^(/7, 4^"'/^);
...
;t = 1, 2, 3, . . .
with fp[q] = 0 otherwise. Note that (pip, 1) = 1, and (fip, 2) = 0 for odd p; it would have been nice to be able todefine^[l] and7p[2] i n t e r m s o f t h e s u m s ( 6 ) , but even so. The scale s for these sequences can be immediately seen to be equal to 4, while the dimension a = 0.5. Furthermore, 17^[^] I is seen to be independent of (odd)/?. Similar fractal sequences {/v(^]} can also be constructed by utilizing another identity given i n [ 4 ] ,
+/)V(2*'iV),
(8)
which holds for all integer N > 0 and q ^ 2, Such sequences would have a scale 5 = 2, while their similarity dimension would still be a = 0.5: verification of this statement is given by the ratio log(v?(l, 2W)/<^(1, 2''-*7V))/log(2^iV/2^-'iV) = log(V2)/log(2) = 0.5.
(9)
3. EXTENSION TO THE COMPLEX PLANE The fractal sequences given in Section 2 are comprised of either zeros or complex numbers, but p and q are positive integers. Thus, complex patterns cannot be obtained from them, unlike the case of the Collatz sequence (3n + l ) [ 5 - 7 ] . Recently, Berry and Goldberg[8] have studied the quadratic sum SL(T)-=
2,.,.2
^expf/TTTr^],
(10a)
which can specialize to
varying sizes. For higher q, the detail is even more spectacular, chiefly consisting of gouged-out bulbs of different sizes. Color pictures are highly intricate; as examples, see Figs. 1 and 2 for F ( z ; 2, 0) and F(z; 3, 0 ) , respectively. The function F(z; q, c) can be made even more interesting by using higher order Gauss sums, or even negative order sums, e.g., consider the function F ( z ; ^, w, c) = c + 2,.o.i.:
,-,exp[27r/z(7-'r''], (12)
in which the integer n can be zero, negative or positive. Yet another generalization, reminiscent of the Comu spirals[6], is the function
F ( z ; a,n,c)--c-h
\ dr exp[27r/z(a + O'V"], Jo (13)
where a > 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
REFERENCES 1. B. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, New York (1983). The parameter r is always real in their study, and they 2. A. Lakhtakia, R. Messier, V. V. Varadan and V. K. Varadan, Spatial convolution and the generation of clusters have worked out a renormalization transform to exand generalized Cantor bars. Phys. Lett. A 118, 54-58 plore SL(T) in the complex domain. (1986). An extension of the quadratic Gauss sums can, 3. B. C. Bemdt and R. J. Evans, The determination of Gauss however, be fruitfully utilized to yield complicated sums. Bull. Amer. Math. Soc. 5, 107-129 (1981). (Note: An extensive bibliography on ^(1, q) and other w-adic patterns provided p can be made complex. Accordingly, Gauss sums has been given here.) we can define the function 4. T. Nagell, Introduction to Number Theory, Wiley, New York (1951), Sec. 53. F{z; q,c)^ c-^- 2 , . o . 1.2 g-l exp[2x/z<7 V^], (11) 5. S. Wagon, The Collatz problem. Math. Intelligencer 7, 72-76(1985). 6. C. A. Pickover, Computers, Pattern, Chaos and Beauty, where z and c are complex. In general, the Julia sets Springer-Verlag, New York (in press). of the mapping z => F{z; q, c) yield very intricate 7. B. C. Wiggin, Wondrous numbers—Conjectures about the 3A2 + 1 family. / Recreational Math. 20, 52-56 patterns. For q = \, F(z\ q, c) - c + 1, which is not (1988). very interesting. When ^ = 2, then F{z\q, c) = c -{• 1 8. M. V. Berry and J. Goldberg, Renormalisation of curli+ e x p [ 2 x / z ] . The Julia set for the resulting process cues. Nonlinearity 1, 1-26 (1988). can be equivalently expressed as z ==» exp[27r/(c 9. M. Misiurewicz, On iterates of ^*. Ergod. Theory Dvnam. Sys. 1, 103-106(1981). + l)]exp[27r/z], which is a take-off on the mapping z ==» X exp [ z ] due to Misiurewicz [ 9 ] and Devaney [10]. 10. R. L. Devaney, Julia sets and bifurcation diagrams for exponential maps. Bull. Amer. Math. Soc. 11, 167-171 When viewed on a monochrome monitor using the (1984). program given here, the most distinguishing feature of 11. M. R. Schroeder, Number Theory in Science and Comsuch sets is a multitude of swirling speckled bands of munication, Springer-Verlag, New York (1986). 5,(2/(7) = ^ ( 1 , ^ ) .
(10b)
Self-similar sequences
Fig. 1. Julia set of the function F(z; 2, 0) of Eq. (11) produced on an IBM 5080 color display. The screen resolution is 1024 X 1024, and the z-domain is -1.940 ^ x <. -0.716, -0.621 ^y ^ 0.559.
Fig. 2. Same as Fig. 1, but for F{z\ 3, 0) with the z-domain 0.550 ^x:^ 1.420, 0.013 ^ y :^ 0.842.
249
AKHLESH LAKHTAKI A and RUSSELL MESSIER
250
COMPUTER PROGRAM c C C C C C C
TO CREATE JULIA SETS FOR THE MAPPING GIVEN BY EQUATION (11) WITH PARAMETER C « 0. PROGRAM IS IMPLEMENTED ON MACINTOSH II COMPUTER. IT UTILIZES A ABSOFT MACFORTRAN/020 V2.3 COMPILER, AND GIVES A BLACK-AND-WHITE OUTPUT.
PROGRAM GAUSS INCLUDE TOOLBX.PAR INTEGER*4 P,NA,NB,KMAX,NX,NY,KOLOR,K,Q,WHITE, BLACK COMPLEX Z,ZO,PHI DATA WHITE/30/, BLACK /33/ Q****•••**••** INPUT DATA ************* WRITEO,*) 'GIVE XMIN, XMAX, YMIN & YMAX. ' ACCEPT XMIN, XMAX, YMIN, YMAX WRITE(9,*) 'GIVE NA & NB IN THE RATIO 4:3.' ACCEPT NA, NB WRITE(9,*)' GIVE THE INTEGER Q' ACCEPT Q Q************* SET VALUES ************* DELX « (XMAX - XMIN)/FLOAT(NA - 1) DELY « (YMAX - YMIN)/FLOAT(NB - 1) KMAX « 63 RMAX « l.OE+02 C************* COMMENCE ITERATIONS ************* DO 1000 NX » 0, NA-1 DO 1000 NY =« 0, NB-1 ZO « CMPLX(XMIN + NX*DELX, YMIN + NY*DELY) K = 0 25 K = K+1 Z = PHI(ZO,Q) R « ABS(Z)**2 IF (R.GT.RMAX) KOLOR « K IF (R.GT.RMAX) GO TO 50 IF (K.EQ.KMAX) KOLOR = 0 IF (K.EQ.KMAX) GO TO 50 ZO - Z GO TO 25 50 CONTINUE Q************* PLOT ************* IF(MOD(KOLOR,2).EQ.O)CALL TOOLBX(FORECOLOR,BLACK) IF (MOD (KOLOR, 2) .EQ.DCALL TOOLBX (FORECOLOR, WHITE) CALL TOOLBX(MOVETO, NX, NY) CALL TOOLBX(LINETO,NX,NY) 1000 CONTINUE C************* END OF ITERATIONS ************* STOP END C************* FUNCTION SUBPROGRAM PHI ************* FUNCTION PHI(Z,Q) COMPLEX PHI,Z,CI INTEGER Q,R CI=CMPLX(0.0,8.0)*ATAN(1.0)*Z/FLOAT(Q) PHI=CMPLX(1.0,0.0) DO 10 R = 1,Q-1 10 PHI=PHI+EXP(CI*R*R) RETURN END
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
251 Chaos and Graphics
COLOR MAPS GENERATED BY "TRIGONOMETRIC ITERATION LOOPS" MICHAEL MICHELITSCH
Emilienstr. 38, D-7000 Stuttgart 80, FRG Abstract—Interesting color maps are being generated by using "trigonometric iteration loops." They yield vortices and fern-like structures, amongst others. 1. INTRODUCTION
The famous Mandelbrot set[l, 2] is being generated in the parameter space by iterating z„+i = zj - c. The real and imaginary parts of this equation are:
1.193 and 0.75 are empirical ones and preserve the "head" of the Mandelbrot-like set and that of the "tricorn-like" structure on the Cx-axis, as well. The "cosine structures" (Fig. l)show:
• Mandelbrot-like sets, if the sign of the cosine is positive, and tricorn-like structures [3, 4 ] , if the sign of it is negative [right-hand part of Eq. (2)]. These two yn+l ~ ^' X„* y„ — Cy (2) structures are repeatedly found with a period of 27r on the C;c-axis. During each iteration loop the previous x„ has to be • vortices between both kinds of structures which rereplaced by a new x„+i-value: minds one of "high and low pressure" areas above X„ -^ Xn+\ * ' • (3) an "ocean with islands." • self-similar small sets of above structures being distributed over the entire parameter plane. SO that the complete iteration cycle runs from (1) ^' ^n+l
~ ^n
Vn
^x ' '
(1)
( 2 ) - ^ ( 3 ) - ^ (I) and so forth.
The "tangent structures" (Figs. 2a, b, c, d) show:
2. RESULTS AND DISCUSSION
Exciting graphics are being obtained by changing (3) either into Xn -^ COS( 1.193-X^+i)
(3a)
x„-> tan(0.75-x„+,)
(3b)
Iteration cycles from (1), (2), through (3a) yield Fig. I and those of (3b) yield Figs. 2a, b, c, d. The factors
• "fern leaves" surrounding the Mandelbrot-like set. This feature is refound at any scale. Again, a periodicity of 27r of the "columns" containing a set can be seen. Within one "column" infinitely many "subperiods" appear in the Cx- and c^-directions, respectively. • "fern leaves" enveloping the Mandelbrot-like sets at any scale (Figs. 2b, c). • that the fractality of the boundaries disappears, some kind of "dust" is surrounding these structures. This dust seems to consist of helical arrangements of el-
Fig. I. Computer scan of x„+, = xl- yl- Cx\ y«+i = 2 • x„ • y„Fig. 2a. Computer scan of x„+i =xl~ yl- Cx\ y„+i = 2 • x„ • ^n - Cy\ Xn -^ cos(1.193* x„+i); "Hurricans above an Ocean - Cy\ x„ -»• tan(0.75 • A:„+I ) showing "fern leaves"; initial value with Islands," initial value Xo = yo = 0; axis -0.5
252
MICHAEL MICHELITSCH
Fig. 2b. Computer scan, all equations and parameters as in Fig. 2a, except -0.7
Fig. 2d. Three-dimensional "Lake Mandelbrot" (blue—for one period out of Fig. 2a, surrounded by "Fern Leaves Mountains"—brown); maximal iteration number 50.
lipses near the boundary of the Mandelbrot-like sets (Fig. 2c). Finally I should mention that other nice graphics can be obtained, if trigonometric functions are applied to other terms of Eqns. (1) and/or ( 2 ) . Acknowledgments—I thank Prof. O. E. Rossler and M. Klein very much for stimulating discussions and A. Murle for kindly sharing with me his computer programs.
Fig. 2c. Computer scan, with "fern leaves" accompanying a helical arrangement of ellipses, all equations and parameters as in Fig. 2a, except -0.41132 < c^ < -0.41078; 0.0150 < Cy < 0.01588; maximal iteration number 250; explosion threshold value 250.
REFERENCES 1. B. B. Mandelbrot, Fractal aspects of the iteration of z -^ Xzi 1 - z) for complex A, z. Ann. N. Y. Acad. Sci. 357, 249(1980). 2. H.-O. Peitgen and P. H. Richter (Eds.), The Beauty of Fractals, Springer-Verlag, Berlin (1986). 3. R. L. Devaney, private communication (Mandelbrot set for the complex iteration Zi = (Zcoiy)^ + c\ Milnor's "Tricom"). 4. M. Szyszkowicz, Computer graphics generated by numerical iteration. Comp. & Graphics 13(1), 121-126 (Example G)( 1989).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
253 Chaos and Graphics
A NOTE ON HALLEY' S METHOD R A Y R E E V ES
Department of Computer Science, University of Lowell, Graphics Researc h Laboratory, 1 University Avenue, Lowell, Massachusett s 01854 Abstract—Scrutin y of Pickover's representatio n of Halley's method applied to solving the polynomial equation z** 7 = 1 elicits several remarkable features. The nodules are seen to be bilinear conformal mappings of the whole plane which explains the coloration by targets. There are distinguished director nodules that direct the forward orbits out of the chaotic separator s to their target basins. There are points of essentia l complexity where all targets are represented . At sufficiently high root density, separator s will web over to form more complex separators .
INTRODUCTION
In 1988 Pickover [1] published some engaging illustrations showing the rate of convergenc e of Halley's iterative method for the solution of z** 7 = 1. While reproducing these results as part of a graphics capability demonstration , we noticed several interesting features of the separator s and orbits. Following Pickover, we use Halley's method of iteration which is just a second order form of Newton's iteration derived from the Taylor series. For each point in a selected window on the complex plane, the number of steps required by Halley's method to converge to a root of the polynomial were recorded. The stopping criterion was by the absolute value of the polynomial. The points were then colored according to the number of steps required (distance coloration), as in Pickover's map, or according to the root that is reached from it (target coloration). In either case, the intermediate points in the convergenc e sequenc e are valid starting points for the process and are also plotted. This accelerates the display if the scan is arranged to start from the outside so that intermediate points do not on the whole fall within areas already scanned . The resulting adumbration of the final display captures the viewer's attention immediately. Fig. la shows a distance coloration, and Fig. lb a target coloration. While there are basins of attraction around each root where the convergenc e trajectory is simple, both of these maps illustrate the chaotic structure near the radial spokes that separat e the basins. We refer to these regions as separators . Each spoke is characterise d by a principal sequenc e of nodules extending apparently to infinity and getting closer together and smaller towards the origin. Between them, there are sequence s of smaller nodules. Inside each nodule, the coloring according to Fig. 2 shows that the iteration will not, in general, lead to either of the adjacent roots but to one of the other five more distant ones. Figure 2a is a detail of one of the nodules on the unit circle, at the point - 1 , 0 in the complex plane, with distance coloration, and Fig. 2b is the same nodule with target coloration. The striking feature is that the nodule is constructe d of circular arcs, and it contains two seven-fold equi-
angular hubs, like the pattern at origin of the complex plane. This suggest s that the whole plane is reflected here by a bilinear conformal transformation of general form z' =^ Az + B/Cz -\- D, which transforms circles to circles. The adjacent septants have mapped into the upper and lower half planes, and the other five septants map to thefiveinterior regions of the nodule, which explains the target coloration there. The nodules that were originally seen along the radial spokes are reproduce d along the spokes of each nodule, and it can be seen that these nested nodules, too, have the same form. This is the characteristic fractal self-similarity typically encountered. A question remains: what is the form of the forward orbit starting from a point within a nodule? In this example, only the nodules on the unit circle seem to have the distinguished property of allowing the trajectory to escape to the final basin. We call them director nodules. Starting from another nodule in the principal sequenc e will result in stepping along the nodules until the director nodule on that spoke is reached , where the trajectory will be directed to a basin. Starting points further out than unit circle will move inwards, and those within unit circle will move outward. Thus, coloring nodules according to the distance criterion will produce, in adjacent principal nodules, adjacent colors on the count spectrum, in correspondin g areas. Starting at a secondar y nodule will also orbit along a path towards the director nodule, but will exhibit an overshoot before arriving. Starting at a nodule within a nodule will step to correspondin g inner nodules on the way to the director. The node in Fig. 2 is on the unit circle, as are its directors. Since the nodules in this sequenc e are diminishing in size, it follows that there is a sequenc e of nodules converging to points on the unit circle (and elsewhere ) where all the roots and indeed, every point in the plane, is represente d in an arbitrarily small neighbourhood . We refer to this limit of a sequenc e of nodules as an essentia l complexity, and these points collectively constitute the Julia set for this function. By plotting the spectrum of target colors on a locus along the unit circle one can see the fluctuationsin the
Reprinted from Comput. & Graphics Vol. 15, No. 1, pag. 89-90, 1991
254
RAY REEVES
Fig. la. z**7-1 Distance coloration.
Fig. 2a. z**7-1 Distance detail at -1,0.
Fig. lb. z**7-1 Target coloration.
Fig. 2b. z«*7-l Target detail at -1,0.
colors at these points as the locus is perturbed by a very small amount.
the roots to allow the basin belonging to the root at the origin to extend continuously to infinity. However, a similar map of:
GENERALIZATION
Looking at maps of different roots of unity merely supports the observations made so far, but adding another root at the origin prevents all the separators from meeting there, and produces a different kind of map. A map of z ( z * * 3 - 1)
shows a parabolic separator around each root on the unit circle, and these do not meet. There are now two director nodes on each parabola, symmetrically disposed about the apex. There is sufficient space between
z(z**4 — 1) show that this origin basin is getting pinched. And when there are five or more roots on the unit circle webbing sets in between the separators, so that the number of chaotic spokes appears to be halved; but each contains a sequence of disjoint basins that belong to the root at the origin. Such a map is more easily understood in the light of the simpler cases. REFERENCE
1. Clifford A. Pickover, A Note on Chaos and Halley's Method, Comm. y4CM 31 (11), November (1988).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
255 Chaos and Graphics
A NOTE ON SOME INTERNAL STRUCTURES OF THE MANDELBROT SET KENNETH J. HOOPER
Southern California Edison Co., P.O. Box 128, San Clemente , CA 92084 Abstract—This article present s two simple methods for creating images which reveal some of the "interior" d here monitor the patterns of the Mandelbrot Set. The "epsilon cross" and "star trails" methods describe trajectory of a point, as calculated by the Mandelbrot Set algorithm, on a complex plane. A portion of this d along with a discussio n of the change s required to create the images in the accompanyin g algorithm is presente figures. The traditional algorithm [1-3] for generating graphic representation s of the Mandelbrot Set reveals the richness of the exterior region while the interior is often shown in black and largely ignored. By modifying the existing Mandelbrot Set algorithm, it is simple to create new displays that are unlike those seen in the traditional images. This study is a tutorial on artistic methods revealing "interior" Mandelbrot Set structures. The two methods to be described are based on examining the results of each iteration of the inner loop of the Mandelbrot Set algorithm. The inner loop produces the variables x and y which correspon d to the X and y coordinates of a point on a complex plane. The behavior of this point as it moves about the plane on successiv e iterations of the inner loop can be analyzed in various ways to create new images. Only the algorithm for the inner loop is presente d here. Readers may refer to refs. 1, 2 and 3 for further information on the Mandelbrot Set. Simplified code for the Mandelbrot Set inner loop is shown below. jc = 0, >; = 0
for j = 1 to 100 xx^ x^ — y^ -^ a yy = 2*x*y + b ii xx^ + yy^ > 4, exit loop X = XX
y = yy end loop color = colortable(j) setpixel (column,row)
Note: The variables 'a' and 'f are the starting points. They range from —2 to 2 and are incremente d over this range by the outer loops. The pixel position as defined by column and row is also supplied by the outer loops.
Figs. 1 and 2 are examples of Pickover's "epsilon cross" technique [4, 5 ]. Both images were made on an IBMAT clone using VGA 640 X 480, 16-color mode. Fig. 1 is a typical "bud" located near a = 0.308 and b = 0.544. The blue regions represen t the interior of the Mandelbrot Set and the black regions the outside. The green and yellow patterns are based on the location of the point (x,y) calculated by the inner loop. The pictures show that the resulting patterns are not confined to the interior (blue region) of the Mandelbrot Set. Note that the green patterns are not quite symmetrical but that the yellow patterns are. Also, notice how the
yellow and green arcs interweave in Fig. 2 giving the illusion of a 3D object. Fig. 2 is located near a bud at a = 0A5, b = 0.65. The patterns are present in buds at different scales,as Fig. 1 shows, and exhibit increase d branching as the boundary is approached . The epsilon cross method adds a test at the end of the inner loop to check the position of the point (jc, y) after each pass through the inner loop. If the point falls close to the X axis, we exit the inner loop, and the pixel for the current row and column is colored green. Likewise, if the point falls close to the y axis, the pixel is colored yellow. Epsilon is the name of the variable that defines a tolerance band on either side of the X and Faxes within which the point must fall to be considered close to an axis. Typical values of 0.01 to 0.005 are used depending on the magnification of the display. The inner loop is modified as shown below for the epsilon cross.
ifxx^ + yy^ > 4 then color = black and exit loop if XX > -.01 and xx < .01 then color = green and exit loop else if yy > -.01 and yy < .01 then color = yellow and exit loop X ^ XX
y = yy end loop if 7 > 99 then color = blue setpixel (column, row)
Another technique, which I will call "star trails," is based on the patterns formed by plotting points calculated from several iterations of the inner loop on an X - y plane. Some locations inside (and outside) the Mandelbrot Set yield clusters of points occurring alone or in groups. In the case of multiple clusters, each iteration of the inner loop adds a point to each cluster by jumping from one to another within the group in a continuous orbit. When a starting point inside the Mandelbrot Set is used, the orbit is stable around an attractor with cluster sites forming along the orbital path. The number of clusters in a group varies accord-
Reprintedfrom Comput & Graphics Vol. 15, No. 2, pag. 295-297, 1991
256
KENNETH J. HOOPER
Fig. 1. Three levels of "buds" using the epsilon cross method.
Fig. 3. Star trails crossing the boundary of the Mandelbrot Set.
Rib-like structures Fig. 4. Here, some stars are transformed into graceful forks.
ing to the starting point in the Mandelbrot Set.' Figs. 3 and 4 can be considered maps which define the cluster count in a given group and were made on the same VGA system. The coordinates for Figs. 3 and 4 are: a = - 0 . 2 , b = 0.8; and a = - 0 . 4 , b = 0.65, respectively. In each picture, self-similar patterns appear as the larger stars, that seem to be foreground objects, trail off into smaller stars. Notice how the tips of some stars break into streaks, mimicing the velocity lines cartoonists use to give the illusion of motion. Both figures cross the boundary between the interior and exterior of the Mandelbrot Set. However, do not misinterpret the points where the star tips streak off as the boundary. The stars themselves cross the boundary without apparent change. The points where the streaks occur seems to coincide more with the region surrounding buds that resemble flames in the more familiar Mandelbrot Set images. In order to count the clusters, it is not necessary to repeat the inner loop very many times. I have chosen ' These clusters can be viewed by modifying the inner loop so that each point defined by x and y is plotted, i.e., use setpixel (jc, y) instead of setpixel (column, row). This requires that the programmer scale the viewing window to span approximately -1.0 to 1.0, horizontally and vertically. Run the program with a starting point at A = -.5 and b = .55 to view a five-cluster site.
16 iterations because high resolution VGA mode provides 15 colors (plus black as background), and the loop count is used to define color. Also, I assume that the clusters are not positioned around the origin (0, 0) symmetrically, and that two clusters do not share a common angle with respect to the origin. Therefore, each cluster has a unique tangent value which defines its position.^ Each x and y value is used to find the tangent of the angle of a vector between the points (0, 0) and (x,y). This value is stored in a table for subsequent use. After completing the inner loop, another loop is entered which compares the first tangent table entry with each of the remaining entries. If, for example, the comparison shows that entry number 4 differs from the first by less than .05 we have returned to the first cluster, and can conclude that three clusters occurred within this group. The value of .05 can be reduced so that foreground stars do not obscure the ^ Of course, there are exceptions to these assumptions. For example, the starting point at A = -.42 and b = .25 actually has six clusters but three of them share approximately the same angle. This program only resolves four clusters in this case but the continuity of the patterns remains intact as it blends in quite well with genuine four cluster sites nearby. Perhaps clusters tend to align themselves along the same angle eventually blending together, thereby providing the transition between differing cluster counts.
257
Internal structures of the Mandelbrot Set receding stars as much. The comparison loop is exited here and the loop count is used to define the color of the current pixel. If no cluster count is found, then color the pixel black. This method gives relatively quick results since the usually time consuming inner loop is limited to 16 iterations. Instead of finding the tangent, the X and Y values could also be stored in a table and processed similarly, possibly giving a different image. Here is the modified inner loop for star trails. forj = 0to 15 xx = x^ - y^ + a yy = 2*x*y + b X = XX
y = yy Tantable(j) = 3;/(x+.000001) end loop
Note: In case x = 0.0, this prevents divide by zero, color = 0 Note: Colors are defined by the numbers 0-15. fork = 1 to 15 Diff = Tantable(O) - Tantable(k) Q = black 1 if Diff < .05 and Diff > -.05 then = 51^^ ^^^ color = k and exit loop
end loop setpixel (column, row) These two examples show how to extract interesting images from inside the Mandelbrot Set (ref. 4 gives still another method). The reader interested in exploring the interior region further might start by making simple modifications to either of the methods described. REFERENCES
1. B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman, New York (1983). See also: H. Peitgen and P. Richter, The Beauty of Fractals, Springer, New York (1986). 2. A. K. Dewdney, Computer recreations. Scientific American {SeptQmbQT, 1986). 3. R. T. Stevens, Fractal Programming in C, M&T Publishing, Redwood, CA (1989). 4. C. A. Pickover, Computers, Pattern, Chaos and Beauty, St. Martin's Press, New York (1990). 5. C. A. Pickover, Inside the Mandelbrot Set. Algorithm: The personal computer newsletter. (Nov/Dec 1989). (P.O. Box 29237 Westmount Postal Outlet, 785 Wonderland Road South, London, Ontario, Canada N6K 1M6.)
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
259 Chaos and Graphics
THE METHOD OF SECANTS JOHN DEWEY JONES
School of Engineering Science , Simon Eraser University, Burnaby, British Columbia, Canada , V5A 1S6 Abstract—The method of secant s is defined. The convergenc e of the method is discusse d and illustrated for some simple examples . Fig. 2 shares some characteristic s with maps which have been created to illustrate the convergenc e of Newton's method in the real plane[2]. There are regions in the lower left quadrant, for example, where a very small change in the initial conditions can make a large change in the time required to attain convergence; this extreme sensitivity to initial conditions is one hallmark of chaotic behavior. In the lower right f(z''') ^(k+\) ^ ^{k) . (1) quadrant, we see the emergenc e of a curvilinear, neu(k) _ ^(A:-l) ron-like structure; the appearanc e of complex natuiz ralistic forms from apparently simple mathematica l operations is a second indicator of chaos. On the other where z^^^ denotes the approximation to the root obhand, Fig. 2 does not display self-similarity, nor do tained on the (/c + 1 )th iteration, and z^°^ and z^^^ are any of the shapes or boundaries in the figure qualify the two initial estimates . as fractal curves. A graphical interpretation of this method for a realvalued function is shown in Fig. 1. The underlying assumption is that the function whose roots are being 2. EXTENSION TO THE COMPLEX PLANE sought is approximately linear in the region of interest. Showing the sensitivity of the secant method to the Where the method converges , it can be shown [ 1 ] that initial pair of guesse s is straightforward when the pair its order of convergenc e is the "golden ratio" 0 is selected from IR ^, as [R ^ maps naturally to the surface = 1.618- • •: of a display device. The secant method can also be used to find the zeroes of complex-value d functions. l i m \ek+i\ X (2) Algebraically, the calculation procedes as for the real Ac-^oo case, though the equivalent geometric construction is more difficult to visualize as it now occurs in a space However, the method is by no means guarantee d to of four dimensions . The two guesse s z^^^ and z^'^ reconverge for all pairs of initial estimates ; and, where quired to start the calculation have four independen t it does converge,the number of iterations required can components , so the graph representin g the dependenc e change significantly for small changes in the values of of convergenc e time and root on those initial guesse s the initial estimates . must also be four-dimensional . Constructing a full This behavior is illustrated in Fig. 2, which shows graph with the same level of detail as the images above, the use of the secant method to locate the root of JC^ that is, considering 1000 alternatives for each com— 1 = 0 for pairs of initial estimates in the range ponent of the initial guesse s and iterating to a dwell limi t of 64, would require about 64 trillio n repetitions {(a, b): -2.0 < ^ < 2.0, -2.5 < ^ < 2.5} of the iterative step, and the results would be difficult to view on a conventiona l display device. Rather than l Each point on the figure represent s a pair x^^\ x^'\ go to these lengths, we take a series of two-dimensiona l object. This is the horizontal coordinate correspondin g to x^^\ the slices through the four-dimensiona : we must vertical coordinate to x^*\ The color assigne d to each analogous to dissecting a biological specimen point denotes the number of iterations, /c, required to wield the scalpel in such a way as to expose the inner attain convergenc e to within 10~^; dark shades of red structure of the graph, then stain it with a color scheme indicate rapid convergence , while lighter-colored points that will reveal its significant details. Figs. 3, 5, and 6 lead to slower convergence . The mauve-colore d areas are different sections through the four-dimensiona l correspond to pairs of initial estimates for which con- object representin g the application of the secant vergence was not attained within 64 iterations. method to z^ - 1 = 0. 1. INTRODUCTION
The method of secants is an iterative method for finding the roots of an equation/(z) = 0. Two estimates of the root are used to construct a third, this being repeated until successiv e estimates agree to within a specified tolerance. Exphcitly, the formula used is
Reprintedfrom Comput. & Graphics Vol. 15, No. 3, pag. 451-454, 1991
260
JOHN DEWEY JONES
the two methods should become identical as the series of iterates converges on a root. Inspection confirms that the correspondence between Fig. 3 and equivalent maps for Newton's method is most exact in the neighborhood of the roots. Figs. 2 and 3 may be regarded as different crosssections through a single four-dimensional map. The two cross-sections intersect along a single line, which appears in Fig. 2 as the line z^^^ = z^°^ + e, and in Fig. 3 as the real axis. The contrast between the cross-sections is striking. In Fig. 5 we have constrained z^^^ to be zero and colored the points representing z^'^ according to the root they converge to: red (root = 1), blue (root = - 1 / 2 + /V3/2) and green (root = - 1 /2 - /V3/2); as the time to convergence increases, red shades to yellow, blue shades to violet, and green shades to cyan. Black regions do not converge within the preset dwell limit of 80. Fig. 6 shows values of z^°^ in the range Fig. 1. Graphical interpretation of the secant method apphed to a real-valued function. Numbered points correspond to successive values of (A:^*\/(X^*^)).
|R(z^o>)| < 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<°^)| < 110 to convergence, that point is colored black. The result resembles the maps obtained by applying Newton's method to complex-valued functions [ 3 ]; Fig. 4 shows Different hues denote the roots (0, ±ir, ±27r, • • •), and the results of using Newton's method to solve the same the saturation of each hue varies with the number of problem over the same range of initial values. The two iterations required for convergence. The white and figures share the property that at every point where the black zones correspond to convergence to afixedvalue striped zones corresponding to two distinct roots meet, which is not a legitimate root, and to nonconvergence, the third zone also meets [ 3 ]. This resemblance is not respectively. altogether surprising, given the method we have seFig. 8 is an enlargement of the central region of Fig. lected for generating the second guess; as e ^- 0, we 7 (the area lying within the values ±7 on each axis). have for the denominator in the first iteration of the We note that the basins of convergence are streaky and* secant formula: soft-edged. Also, there are small stitch marks on the borders between the coloured zones. Fig. 9 shows a close-up of one of these stitch marks, which is seen to /(z^'))-/(z<^>-0 have a complex antisymmetric structure with black ^fW) (Z^^>+6) zones of nonconvergence, rather similar to the shape found at the center of Fig. 3. Thus, on thefirstiterative step, this application of the secant method approximates to Newton's method. On 3. SUGGESTIONS FOR FURTHER WORK subsequent iterations, one would expect the approxiIt would be of interest to apply the techniques used mation to become more or less good, depending on the distance between successive iterates; in particular. here to investigate the convergence of the false-position |D(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 z<^^ + e. Fig. 7. The secant method applied to find the complex roots of sin(z) = 0: z^'^ obtained by interchanging real and complex parts of z^°\
Fig. 4. Newton's method appHed to find the three complex roots of z^ - 1 = 0 .
Fig. 8. Enlargement of central region of Fig. 7.
Fig. 5. The secant method applied to find the three complex roots of z^ - 1 = 0; z<^^ set to 0.
262
JOHN DEWEY JONES
REFERENCES A. Ralston and P. Rabinowitz, A First Course in Numerical Analysis (2nd ed.), McGraw-Hill, New York (1978). H. O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer-Verlag, Berlin, 103-108 (1986). H. O. Peitgen, D. Saupe, and F. v. Haeseler, Cayley's problem and Julia sets. The Mathematical Intelligencer 6(2), 11-20(1984). W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling, Numerical Recipes, Cambridge University Press, Cambridge, UK, 248-251 (1986). APPENDIX Computer details The calculations for Figs. 2, 3, and 4 were performed on a Fig. 9. Enlaragement of a "stitch" from Fig. 8. Cray X-MP 24, using an IBM 3084 as a front-end. The figures are displayed on the 1024 X 1280 screen of a Tektronix 4115, method[4]. Where the secant method uses the two using the ADDSYS extension to the DI-3(X)0 graphics package most recent values of z^^^ to generate the next, the marketed by Precision Visual, Inc., and photographed using a matrix camera. false-position method uses the most recent z^^\ toCalculations for Figs. 5 through 9 were performed on a Sun gether with the most recent earlier value for which/(z) SparcStation 1. Thefiguresare displayed on the 1280 X 900 is of opposite sign. It converges more reliably but more screen of the SparcStation, using the PIXRECT graphics program marketed by Sun. slowly than the secant method.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
263 Chaos and Graphics
A GENERALIZED MANDELBROT SET AND THE ROLE OF CRITICAL POINTS MICHAEL FRAME* and JAMES ROBERTSON**
*Department of Mathematics and **Department of Computer Science, Union College, Schenectady, NY 12308-2311 Abstract—We examine the Julia sets for certain cubic and quartic polynomials and observe the structure of the Julia set as determined by the orbits of the critical points. In examples where the orbits of some critical points diverge and others converge, or where orbits converge to different cycles, we note the local structure of the Julia set is dominated by the behavior of the nearest critical point. This information is encoded in a generalized Mandelbrot set reflecting the behavior of all the critical points. 1. INTRODUCTION
Since the appearance of high-resolution images of the Mandelbrot set and Julia sets [6], [9-11], a considerable amount of computer time has been devoted to exploring the detailed structure of these sets. The usual Mandelbrot and Julia sets are generated by iterating the function Fdz) = z^ + c, for the Mandelbrot set always starting the orbit at z = 0. Taking z = 0 for a starting point is the natural choice since work of Fatou and Julia shows the iteration sequences generated from the critical points (points at which the derivative of the function is zero) dominates the dynamical behavior, and for Fdz) the only critical point is z = 0. In this paper we investigate the structure of Julia sets for two families of polynomials, each with more than one critical point, and consider a generalization of the Mandelbrot set to the case of several critical points. 2. THEOREMS OF FATOU AND JULIA, CRITICAL POINTS, AND A GENERALIZED MANDELBROT SET
General background references for this material are [1, 4, 5, 8]. Given a polynomial p{z) = a„z" + a„-iz"~^ + • • • + fliz + ao,
point ZQ ofp(z) is attracting if \\p'(zo) || < 1. For every polynomial the point at oo is attracting: PROPOSITION 2.1. The point z = oo is an attracting fixed point for any polynomial p(z). Proof. A fixed point ZQ is attracting if ||/7'(zo)|| < 1. To take the derivative at z = oo, we change variables by z = //(w) = l/w. Then Q(W) = h~^ph(w) has the same dynamics for points w2Lsp(z) has for z = h(w). In particular, z = oo corresponds to w = 0 and so we test whether the fixed point n^ = 0 is attracting for g{w). Assuming « ^ 2 and a„ ¥= 0, a straightforward computation shows ^'(0) = 0. That is, w = 0 is an attracting fixed point for q{w) and so z = oo is an attracting fixed point for p{z). /// Recall the basin of attraction of a fixed point ZQ is the set of all points w for which p°"(w)-^zo, where we have used the notation /7°"(z) for the «-fold composition p{p{' • ' p{z)' • •))• The basin of attraction of Zo is denoted ^(zo), so Proposition 2.1 can be viewed as stating ^(oo) is nonempty. For a polynomial p{z), the filled-in Julia set Kp consists of all points not converging to oo under iteration of/7(z). That is,
A-;, = {z: p°''(z)-7*^ 00 } = C - ^(oo). and a complex number ZQ, a natural question is to ask what is the asymptotic behavior of the orbit { ZQ, /7(zo), p(p(zo)), • • •} of this point under iterated appUcation One way a point can fail to be attracted to oo is to be ofp{z). Will this orbit diverge to oo, converge to some attracted to some finite point or cycle of points. For fixed point, converge to a cycle of points, or wander example, p(z) ^ z^ - 1 has a cycle {0, -\}: p(0) chaotically? Work by Pierre Fatou and Gaston Julia = - 1 , j 7 ( - l ) = 0. Both 0 and - 1 are fixed points for in the 1910s-1920s shows these questions can be ap- p°^{z), and this 2-cycle for p(z) is attracting if its points proached by studying the orbits of the critical points are attracting as fixed points for /7°^(z). By the chain of/7(z). In this section we estabUsh some preUminary rule, either fixed point can be used to test attraction: notions, review the results of Fatou and Julia, and de(/7°2y(0) = p'{p(0))'p'(0)=p'(-l)'p'(0) scribe the families of polynomials to be studied. To begin, polynomials take large numbers to large = p'(0)'p'(-l)=p\p'{-l))'p\-l) numbers and so it will be convenient to "add the point at infinity" to the complex plane and extend our poly= (/?°')'(-l). nomials to this larger set by taking /?(oo) = oo. That is, the point at oo is a fixed point for any extended In fact, this is true in general. Say {zi, Z2, • • • , z„} polynomial. Recall (e.g., [4], p. 78) that a (finite) fixed is an n-cycle for p(z) if/?(zi) = Z2, p{z2) = Z3, • • • , Reprintedfrom Comput. & Graphics Vol 16, No. 1, pag. 35-40, 1992
264
MICHAEL FRAME and JAMES ROBERTSON
p(z„-i) = z„, and p{z„) = Zi. The 2-cycle argument above can be rewritten directly to prove (e.g., [4], p. 78).
3. Kp is disconnected, but not necessarily a Cantor set, if some critical points are attracted to oo and some are not.
PROPOSITION 2.2. The n-cycle {zu Z2, - - - , z„} for
There are several ways to extend the notion of Mandelbrot set to higher-order polynomials. We select one, not necessaril y the most natural, but nevertheles s allowing easy visualization. A more general extension is discusse d in [ 3 ]. Let p{z) be a polynomial without constant term, i.e., p(0) = 0. We consider the family of polynomials t Pd^) ^ p{z)-\- c. As we did with Fc{z), let Kc represen thefiUed-inJulia set for the polynomial pc{z), that is, Kc = {z: Pc"{z)-^ oo). Denoting by Zi, • • • , z„ the critical points of p{z), define the z,-Mandelbrot set of p(z) by
p(z) is attracting if and only if
Upn'(z,)\\ \\p'iz„)'p\z„-i)'
• P ' ( z i ) | | < l.
p'(zi) is called The product p'(z„)• p'{Zn-\) the multiplier of the «-cycle. The multipUer is a useful tool; for example, with it we can locate the centers of the discs and cardioids of the Mandelbrot set ([4] , p. 86). A surprising (and relatively difficult) theorem of Fatou and Julia is that for every polynomial, even those without attracting (finite) cycles, there are points not diverging to oo under iteration of p{z) that is, (e.g., [8] , p. 60). THEOREM 2.3. For every polynomial p{z), Kp is nonempty. Fatou's and Julia's analysis of the structure of Kp is based on their showing that many aspects of the dynamics of p(z) are determined by the orbits of the critical points of p{z)\
M(z,)={c:/?r(^/)^oo}. By the Trichotomy Theorem, if c ^ M(zi) U • • • U M(z„ ) then under iteration of pdz) the orbit of no critical point stays bounded and so Kc is a Cantor set.
FATOU'S THEOREM. Every {finite) attracting cycle of p{z) has in its basin of attraction a critical point of /7(z).(e^., [4],p.79). Before discussing the complications arising from higher-order polynomials, we review a familiar example. The standard Mandelbrot set is constructe d using iterations of the quadratic polynomial Fdz) = z^ + c. Let Kc denote thefiUed-inJulia set for Fdz). For each c, Fdz) has only one critical point, 2 = 0, and so by Fatou's Theorem Fdz) can have at most one attracting cycle. The existence of an attracting cycle determines the structure on the Julia set Kc in this sense : DICHOTOMY THEOREM (Fatou and Julia). The Julia set Kc is connected or is a Cantor set. Moreover, Kc is connected if and only if the orbit ofz = 0 is not attracted tooo.ie.g, [4], p. 80 and [5], pp. 313-314). The Mandelbrot set is the set of those c for which Kc is connected . Since the Julia set of Fc(z) is either connected or a Cantor set, the Mandelbrot set is a natural object to study. Of course, testing the connectivity of Kc for each c is not a reasonabl e way to draw a picture of the Mandelbrot set; instead we test the divergence of the orbit of z = 0 under iteration of Fdz). For polynomials with more than one critical point, Julia sets admit a third kind of structure in addition to being connecte d or being Cantor sets. Again, the orbits of the critical points are the determining features, and Fatou and Julia proved ([ 2 ], p. 181). TRICHOTOMY THEOREM. For any polynomial
p(z)
(with n>:2), the Julia set Kp satisfies 1. Kp is connected if no critical point is attracted to oo, 2. Kp is a Cantor set if all critical points are attracted to 00, and
Fig. 1. The Mandelbrot sets M{0) (above) and M(-10/3) (below) for the cubic polynomial p{z). The points A = -2.3363 + 0.0475/, if = -0.4125 + 1.0687/, and C= 0.015 + 0.7837/ are the points at which the Julia sets of Figs. 3, 4, . and 5 are computed
265
A generalized Mandelbrot set
Fig. 4. The Julia set for -0.4125 -I- 1.0687^(6 in Fig. 1). The orbits of both critical points diverge to oo. or where the orbits of different critical points converge to different cycles. We examine several examples of this behavior for the polynomials 1
p(z) = jz' + z\ and Fig. 2. The Mandelbrot set M{p) (upper) and a magnification of itsrightcentral region (below).
On the other hand, if c E M(zi) D • • • fl M(z„) then the orbits of all critical points stay bounded and so Kc is connected. As our generalization of the (quadratic) Mandelbrot set we shall take the set of all c for which Kc is connected—that is, the Mandelbrot set for the family of polynomials/7c( 2) is M(/7) = M ( z i ) n - • -OMCzJ. Structures unlike any exhibited by Julia sets of z^ + c can be seen for polynomials where the orbits of some critical points remain bounded while others diverge.
,.|,9(z) = - z ' '
•r-(-l'>.
and we use the location of c in the M(z,) to deduce a rough understanding of the symmetry features of the Julia set Kr. 3. A CUBIC EXAMPLE
The polynomial p(z) has derivative p'(z) = fz^ + 2z, hence critical points Zi = 0 and Z2 = —10/3. Figure 1 shows M(0) and M(-lO/3), together with the three c-values at which Julia sets are shown in Figs. 3, 4, and 5. Figure 2 shows M(p) in black, along with a magnification of the right central region. The colors outside the set are assigned by the average escape rate
Fig. 5. The Julia set for 0.015 -K 0.7837/ (C in Fig. 1). The Fig. 3. The Julia set for -2.3363 + 0.0425/ (A in Fig. 1). The orbit of 0 converges to a 3-cycle, while the orbit of -10/3 diverges to oo. orbits of both critical points converge to a 4-cycle.
266
MICHAEL FRAME and JAMES ROBERTSON
for the two critical points.Notice how the color pattern is similar to the contours of M(0) and Af(-10/3). Figure 3 shows the Julia set for c = -2.3363 + 0.0425/. The orbits of both critical points converge to a 4-cycle, as can be understoo d from Figure 1 by noting this value of c lies in 4-cycle component s of both M(Q) and M ( - 1 0 / 3 ). In fact, both orbits converge to the same 4-cycle: -1.97211 +0.0189657/, 0.0189961 +0.0119508/ -2.33608 + 0.0429563/, 0.57199 - 0.01756/ though with a phase difference of two {i.e., the 200-th term of the orbit of 0 is -1.97211 + 0.0189657/ while the 200-th term of the orbit of - 1 0 /3 is 0.57199 - 0.01756/). This Julia set looks connected , and from case (1) of the Trichotomy Theorem we see this is the case. Figure 4 shows the Julia set for c = -0.4125 + 1.0687/. Here the orbits of both critical points diverge to 00, and the Julia set is a Cantor set. In Figure 1 we see this c is outside both M(0) and M ( - 1 0 / 3 ). For Fig. 5 we take c = 0.015 + 0.7837/. Again referring to Fig. 1 we see this c lies outside of M(-10/3) but in a 3-cycle componen t of M(0), so not surprisingly the orbit of 0 converges to a 3-cycle and the orbit of - 1 0 /3 diverges to oo. This falls in case (3) of the Trichotomy Theorem, and indeed the Julia set is not a Cantor set but consists of infinitely many islands, each of which is similar in appearanc e to the well-known "Douady rabbit" Julia set of z^ - 0.122 + 0.745/. The 3-cycle to which the orbit of 0 converges is reflected Fig. 6. The Mandelbrot sets Af(-1) (top), A/( 1) (middle), in the three-fold branching symmetry of each island. and M{~\ + (2/5)/) (bottom) for the quartic polynomial q(z). The points A = -0.1395 + 0.527/, B = 0.465/, C = 0.1395 + 0.744/, D = 1.1935 + 0.3565/, and E = 1.2245 4. A QUARTIC EXAMPLE - 0.6355/ are the points at which the Julia sets of Figs. 12, 9, 11,8, and 10 are computed . The polynomial q(z) has derivative q'{z) •• (1 + (2/5)/)z2 + (1 + (2/5)/) = (z + l ) . ( z - l ) - ( z - ( 1 + (2/5)/)), hence critical points Zj = - 1 , Z2 = 1, and Z3 = 1 + (2/5)/. Figure 6 shows M ( - l ) , -0.994918 + 0.197039/ A/(l) , and M{1 + (2/5)/), together with the five c-values whose Julia sets are given in Figs. 8-12. Figure 7 shows the Mandelbrot set M(g). As with the cubic while the orbits of 1 and 1 + (2/5)/ converge to the JuHa sets, any cyclic behavior to which the orbit of z, 4-cycle converges can be read from the componen t of Af(z/) 0.802156 + 0.42222/, 0.409652 + 0.768738/, to which the c-value belongs. Figure 8 shows the Julia set for c = 1.1935 + 0.3565/. 0.469522 + 1.05952/, 0.880189 + 1.12601/. The orbits of all three critical points converge to the 3-cycle Observe that the largest features on only the right side of the Julia set exhibit four-fold branching. Again, this 1.48879 + 1.00252/ 0.965602 + 0.542445/ c belongs to A/(^). 1.61555+0.636692/ , Figure 10 shows the Julia set for c = 1.2245 - 0.6355/. The orbit of - 1 diverges to oo, while the with the orbits of 1 and 1 + (2 / 5) / converging in phase, orbits of 1 and 1 + (2/5)/ converge to a 3-cycle. As and the orbit of 1 lagging behind by one step. Notice in Fig. 5, the JuHa set consists of infinitely many islands, that every branch point has three-fold symmetry. Since each with a 3-fold branching structure. the orbits of all three critical points are bounded, this Figure 11 shows the Julia set for c = 0.1395 c belongs to Af(^) . y + 0.7440/. As with the previous example, the orbit of Figure 9 shows the Julia set for c = 0.465/. Here the - 1 diverges and the orbits of the other two critical orbit of - 1 converges to the fixed point. points converge to a 3-cycle. Again the JuUa set consists
A generalized Mandelbrot set
Fig. 7. The Mandelbrot set M{g).
267
Fig. 10. The Julia set for 1.2245 - 0.6355/ (E in Fig. 6). The orbit of -1 diverges to oo, while the orbits of the other critical points converge to a 3-cycle.
Fig. 8. The Julia set for 1.1935 + 0.3565/ (D in Fig. 6). The orbits of all three critical points converge to a 3-cycle. Fig. ll.TheJuliasetfor0.1395 +0.7440/(CinFig.6).The orbit of -1 diverges to oo, while the orbits of the other critical points converge to a 3-cycle.
Fig. 9. The Julia set for 0.465/ (B in Fig. 6). The orbit of -1 converges to afixedpoint, while the orbits of the other critical points converge to a 4-cycle. of infinitely many islands, each with a 3-fold branching structure. The most obvious difference between this and the previous example can be seen in the spiral patterns in Fig. 11. Figure 12 shows the Julia set for c = -0.1395 + 0.527/. Here the orbits of 1 and 1 + (2/5)/ diverge, while the orbit — 1 converges to a fixed point. Comparing Figs. 10-12 suggests some interesting behavior. In Figs. 10 and 11 the orbits of 1 and 1 + (2/ 5)/ converge to 3-cycles, while the orbit of - 1 does not. The largest features on the right side ofKc (near 1 and 1 + (2/5)/) exhibit a three-fold branching sym-
Fig. 12. The Julia set for-0.1395 -l-0.527/(AinFig.6).The orbit of-1 converges to afixedpoint, while the orbits of the other critical points diverge to oo.
metry, while the largest features on the left side of Ac (near - 1 ) are chains of islands. In Fig. 12 the largest features on the right are chains of islands, while the largest feature on the left is the major island of i^:. In Figs. 10 and 11 the orbits of 1 and 1 +(2/5)/converge to 3-cycles, while the orbit of - 1 diverges to oo; in Fig. 12 the orbits of 1 and 1 + (2/5)/ diverge to oo while the orbit of - 1 converges to a fixed point. We are lead
268
MICHAEL FRAME and JAMES ROBERTSON
to conjecture that for polynomials with more than one critical point, the structure of the Julia set near a critical point is dominated by the behavior of that critical point. Figure 9 provides additional support for this (admittedly vague) conjecture. A proper formulation will use the theory of polynomial-like maps [7] and is still evolving. 5. CONCLUSION For polynomials pdz) with more than one critical point (and parameterized by a single additive constant (c), the local structure of the Julia set Kc seems to be determined by the orbit of the critical point "nearest" to c. This can be visualized by plotting the Mandelbrot set for each critical point z, (the c' for which the orbit p°"(Zi) does not diverge to oo) and analyzing the structure of this set near c. If for a given c critical points exhibit different asymptotic behavior, then the branching symmetries and patterns of islands can be knitted together in complicated ways. In the case where the orbits of some critical points diverge and others converge, this knitting can be analyzed using kneading theory. For cubic polynomials this is treated in [ 2 ] ; in a later paper we shall investigate the case that different critical points have different kneading sequences.
ample. Coordinates of the critical points are entered in the array cy. The drawing window is taken to occupy -2 < c <2,-2
for /: = 1 to /z_screen_size do for 7: = 1 to u__screen_size do begin c: = -2 + //round(/i_screen_size/4); d: = -2 +j/ round (i;_screen_size / 4); for critical: = 1 to number_of_critical_points do begin x: = cy [ critical,0 ]; {real critical point} >^ = cy [ critical, 1 ]; {imaginary critical point} for count: = 1 to maxdwell do if not test—distance (x, y) then begin; {This function tests to see if (x*x + y*y)> escape_radius*escape_radius} newx: = Re(/(x + yi) + c\ newy: = Im(/(x + yi)) -I- d\ x". = newx, REFERENCES y. = newy; 1. P. Blanchard, Complex analytic dynamics. Bull. Amer. color: = count; Math.Soc. 11,85-141 (1984). end; 2. P. Blanchard, Disconnected Julia sets. In Chaotic Dytemp—color: = temp_color + color; namics and Fractals, M. F. Bamsley and S. G. Demko end; (Eds.), Academic Press, Orlando, FL, 181-201 (1986). temp_color: = (round (temp_color/number 3. B. Branner, The parameter space for complex cubic poly_of_critical_points)); nomials. In Chaotic Dynamics and Fractals, M. F. {taking average of total color} Bamsley and S. G. Demko (Eds.), Academic Press, Orplot (/•, 7, temp—color); lando, FL, 169-179(1986). {Places a pixel in the (i,j) spot on the screen in color 4. B. Branner, The Mandelbrot sets. In Chaos and Fractals: of temp_color} The Mathematics Behind the Computer Graphics, R. L. temp_color: = 0; Devaney, L. Keen (Eds.), American Mathematical Soend; ciety, Providence, RI, 75-105 (1989). end; 5. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, 2nd Ed., Addison Wesley, Menlo Park, CA Julia pseudocode (1989). for /: = 1 to /i_screen_size do 6. A. K. Dewdney, Computer recreations. Sci. Amer. 253, for 7: = 1 to u_screen_size do begin 16-21, 24 (August, 1985). x: = -2 + //round (/z_screen_size/4); 7. A. Douady and J. H. Hubbard, On the dynamics of polyy: = -2 +7/round(t;_screen_size/4); nomial-like mappings. Ann. Sclent. Ec. Norm. Sup. 18, for count: = 1 to maxdwell do 287-343(1985). if not test—distance (jc, y) then begin; {This function 8. L. Keen, Julia sets. In Chaos and Fractals: the Mathetests to see if matics Behind the Computer Graphics, R. L. Devaney, (x*x + y*y)> escape_radius*escape_radius} L. Keen (Eds.), American Mathematical Society, Provnewjc: = Re{f{x + yi) + c; idence, RI, 57-74 (1989). new y. = Im{f{x-\- yi)) + d; 9. B. B. Mandelbrot, The Fractal Geometry ofNature, Freex: = newx; man, New York (1982). y. = newy; 10. H-O Peitgen and P. R. Richter, The Beauty of Fractals, color: = count; Springer-Verlag, New York (1986). end; 11. H-O Peitgen and D. Saupe (Eds.), The Science ofFractal temp_color: = temp_color + color; Images, Springer-Verlag, New York (1989). end; temp_color: = (round (temp_color/number APPENDIX _of_critical_points)); Multiple critical point pseudocode {taking average of total color} This pseudocode describes our program for drawing the plot (/, 7, temp—color); generalized Mandelbrot set for the polynomial/(z). For the {Places a pixel in the (ij) spot on the screen in color cubic example/(z) = \z^ + z^, we have Re{f{x + yi)) = x^ often^p—color} 3xy^ 3x^y Z3 temp_color := 0; / — and Im{f{x + yi)) -• 2xy + end; end; The analogous formula must be derived for the quartic ex-
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
269 Chaos and Graphics
A NEW SCALING ALONG THE SPIKE OF THE MANDELBROT SET MICHAEL FRAME,' A. G. DAVIS PHILIP^ and ADAM ROBUCCI^
'Mathematics Department, ^Physics Department and ^Computer Science Department Union College, Schenectady, NY 12308 Abstract—Using the zeros of a family of real polynomials, we locate a sequence of midgets along the spike of the Mandelbrot set. By this method we can readily find midgets (tiny copies of the Mandelbrot set) of high cycle number; we include a picture of a 200-cycle midget magnified by a factor of 5.68 X 10^^*. The ratios of distances between the cardioid centers for successive midgets in this sequence exhibit an asymptotic scaling, as does the ratio of head-to-center distances. We present evidence supporting a pattern of scalings for some "generalized Mandelbrot sets." 1. INTRODUCTION
The Mandelbrot set, M, is the collection of complex numbers c for which the Julia set Jc of Fdz) = z^ + c is connected. From classical theorems of Fatou and Julia {e.g., Theorem 2, p. 80 of [1]) we know that Jc is either connected or a Cantor set, and that Jc is connected if and only if the sequence 0, F,(0), FciFciO)) = F°2(0), F!HO),
(M)
remains bounded. (By the theorems of Fatou and Julia, the orbit of the critical point of Fc(z) determines the structure of Jc. For Fc(z) the critical point is z = 0, hence the sequence (M) starts with z = 0.) Being the set of c values for which the Julia sets exhibit one of their two possible kinds of connectivity structure, the Mandelbrot set is a natural object to study. Moreover, the boundary of M, denoted dM, can be thought of as the "bifurcation" set for the Jc—the set on which the structure of Jc changes—so we would expect it to be geometrically interesting. Presumably no one, not even Mandelbrot, expected dM to be as fascinating as it is. There appears to be a limitless variety of features revealed as we probe ever more closely to dM. Indeed, investigating dM has used thousands of hours of CPU time on the full spectrum of machines from the humblest of PCs to supercomputers. Looking more deeply into dM captures, in part, the spirit of the explorer, wondering what lies over the next hill. Some (but not all!) of the authors of this paper are in danger of being lost forever in these regions. Part of the allure of this intricacy of dAf lies in Mandelbrot's discovery that a cloud of infinitely many tiny copies of M(commonly called midgets) surround dM. In fact, these midgets are dense in dM: Every neighborhood of every point of dM contains infinitely many midgets (see 9.2, p. 100 of [1]). The midgets are not exact shrunken copies of Af; all have patterns of decorations reflecting the location of the midget relative to the large features of M, and some midgets are significantly distorted. Nevertheless, these midgets manifest the self-similar nature of the Mandelbrot set. There are many sequences of midgets, related through scalings of size. In Section 2, we review some of the known
sequences; in Section 4 we report on a new scaling of midgets, discovered along the real axis, progressing toward c = - 2 . Before discussing scalings, we review some of the main features and properties of the Mandelbrot set. (See [1] for more details). One way the sequence (M) can remain bounded is by converging to an «-cycle. For each n^ 1, the set of c-values for which (M) converges to an «-cycle is an open set, the connected components of which are called hyperbolic «-cycle components. These can be described analytically through the stability of the «-cycle, determined by the derivative: If PFis a hyperbolic «-cycle component, then for each cGW
P ^ ^ ( c ) - ~ ( F r ) | z . = 2"
Zn' Z„-r
Zl'Zl
satisfies ||pW^(c)|| < 1, where the «-cycle is {zi, Z2, . . . , z„}. (The first equality results from an «-cycle's being a fixed point for the «-fold composition F?" of Fciz), the second from the chain rule.) Douady and Hubbard [ 5 ] show p w is SL conformal isomorphism, and so W contains a unique point c, the center of W, for which piv(c) - 0. Centers are also called superstable points; observe that c is superstable if and only if the critical point c = 0 belongs to the «-cycle. For the quadratic polynomial z^ + c, hyperbolic components are either cardioids or discs. Every «-cycle cardioid has infinitely many disc components tangent to it, one 2ndisc, two 3«-discs, two 4«-discs, four 5«-discs,... (details in [1]). By the head of an «-cycle cardioid we mean the unique 2«-cycle disc tangent to the cardioid. Figure 1 illustrates the main cardioid and its head (the 2-cycle component), 3-cycle components, and several midgets. 2. REVIEW OF SOME SCALINGS
Recall the bifurcation sequence of the logistic function Lr(x) = r • x • (1 — Jc) for A: in the interval [0, 1]. As long as 0 :^ r :^ 4, if JC E [0, 1] then Lr(x) E [0, 1] and so the logistic function can be used to generate a sequence of points in [0, 1]:
Reprintedfrom Comput. & Graphics Vol. 16, No. 2, pag. 223-234, 1992
270
M. FRAME, A. G. D. PHILIP, and A. RoBUcri
* V/ 3-cycl* ""disc
r 7 /
4. \
/ ^^nMlin 2-cycledisc / 1 ^ 7 * ' -h»adofth»'^ ' ^ main cardioid 3-cycl* disc
^
-?
JT
Fig. 1. The Mandelbrot set, with the main cardioid, 2-cycle disc, and 3-cycle discs labeled, and with three midgets magnified. The magnifications along the spike do not illustrate the sequence reported in this paper.
X2 = LriXi),
Xi =
Lr{X2),
(L)
(The critical point for Lr(x) is {, which is why the sequence (L) starts with i ) . The character of this sequence depends upon the value of r. For 0 ^ r ^ 3, (L) converges to a fixed point, while at r = 3 the fixed point disappears (actually, becomes unstable, hence numerically invisible) and a 2-cycle arises. The change from fixed point to 2-cycle is a period-doubling bifurcation, so we say the first bifurcation value is ri = 3. The sequence (L) converges to a 2-cycle for ri < r < r2 = 3.449490, to a 4-cycle for r2
8 = lim„-H fn+l
= 4.669201609 . . . ,
~ fn
and produced arguments supporting his claim that this limit is universal over a large class of functions. A rigorous proof of this conjecture was provided by Lanford[l 1]. For r> r^ the behavior of (L) is very complicated. There is a set of r-values of positive measure on which (L) is chaotic[10], while woven in among these chaotic regions are "windows" of periodicity, each with its own period-doubling cascade. The largest of these periodic windows corresponds to a 3-cycle arising at r = 3.828427. This is the only 3-cycle window; there is only one 4-cycle window, there are three 5-cycle windows, Milnor (pp. 230-231 of [14]) gives a method for determining the number of «-cycle windows for each « ^ 3, and the ordering in which these periodic windows occur was analyzed by [13]. The dynamics of maps of the interval is a very active area of study, the modem efforts, perhaps beginning with the Ulam's and von Neumann's [20] use of L4 as a
random number generator, and including the work of Misiurewicz[16], Sarkovskii[19], Collet and Eckmann [ 2 ], and Milnor and Thurston [15]. These observations are relevant to our study of Mandelbrot midgets centered along the real axis because the linear transformation JC = ( — l/r)«z + ( i ) conjugates Fdz) to Lrjx) with the correspondence of parameters r = 1 + Vl - 4c. It follows that the Feigenbaum scaling is reflected in the features of the Mandelbrot set along the real axis, in particular, the sequence of period-doubling bifurcations at ri = 3, r2 = 3.449490,... mentioned above corresponds to the points of tangency of the 2-cycle disc to the main cardioid, of the 4-cycle disc to the 2-cycle disc, and so on. Moreover, the periodic windows for Lr(x) correspond to the hyperbolic components of midgets centered along the real axis. Each midget along the real axis exhibits its own sequence of period-doublings, though here, the main cardioids of the midgets correspond to w-cycles rather than fixed points. Attached to the left of an «-cycle cardioid is a sequence of increasingly smaller disc components, first a 2«-cycle disc, then a 4/2-cycle disc, followed by an 8«-cycle disc, and so on. For example, the main cardioid for the largest midget is a 3-cycle component; attached to the left of this cardioid is a 6cycle disc, attached to the left of that is a 12-cycle disc, etc. Computing the Feigenbaum constant 6 for any of these sequences of period-doublings yields 6 = 4.669201609. . . . Using a construction of Douady and Hubbard[5], recently Milnor[14] has applied these ideas to other sequences of scalings along the real axis, and to scaling off the real axis. (Milnor's work extends [3], [6], [7], and [9].) For each superstable point c, Douady and Hubbard show there is a topological embedding of M into a subset of itself, taking 0 to c. Denote by WQ the main cardioid of Af, and say Wc is the hyperbolic component with center the superstable point c. Then the Douady-Hubbard function sending 0 to c sends WQ to Wc. The most obvious example of these functions is the map from Af to the 3-cycle midget, carrying 0 (the center of WQ) to -1.754878 (the center of the main cardioid of this midget). Another example carries 0 to - 1 , the center of the 2-cycle disc, and consequently carries WQ to the 2-cycle disc W-i. This function takes the 3-cycle discs attached (above and below) to WQ to the 6-cycle discs attached toW-i, the 4-cycle discs attached to Wo to the 8-cycle discs attached toW.i, and similarly for other correspondences. By sending the entire Mandelbrot set to its pieces, the Douady-Hubbard functions act to express the self-similarity of the Mandelbrot set, though to be sure, the existence of distorted midgets guarantees these need not be linear self-similarities. Milnor's generalization of the Feigenbaum sequence is illustrated by the following example. Let C\ = -.122561 -f .744862i denote the center of the upper 3-cycIe disc, Wd, attached to the main cardioid WQ, Let T denote the Douady-Hubbard function taking Wo to Wci. Being the image of a 3-cycle disc now at-
271
Scaling along the spike of the Mandelbrot set tached to a 3-cycle disc, T(Wci)isa 9-cycle disc. Similarly, T^'^iWci) is a 27-cycle disc, T°\Wci) is an 81. cycle disc, and so on. Figure 2 illustrates this sequence Let C2 denote the center of T{Wci), Ci the center of T^^{Wc\), . • ., and form the sequenc e of complex numbers (C2 - c,)/(C3 ~ C2), (C3 - C2)/(C4 - C3), ( Q " C3)/(C5 - C4), Milnor (and also [9] and [3]) argues that this sequenc e converges in the same way as the original Feigenbau m sequenc e (geometrically); in this example to the limit 4.6002246 + 8.98122591 . This suggest s that the Mandelbrot set exhibits many types of scaling. More complicated sequence s can be used. Let Wc and Wd denote a 3-cycle and a 7-cycle disc attached to the main cardioid, and let Tx and T^ denote the Douady-Hubbar d functions taking the main cardioid e of discs to Wc and to Wa. Now consider the sequenc generate d by alternately applying these functions. That is, again denoting by WQ the main cardioid, TX{WQ) is a 3-cycle disc (in fact, W^) attached to WQ, TX(T2{WQ)) is a 21-cycle disc attached to r,(H^o), TX{T2{TX{WQ))) is a 63-cycle disc attached to r i ( 72(^^0)), and so on. The centers of these hyperbolic component s converge to another Feigenbaum-lik e limit, and Milnor conjectures that any infinite sequenc e of these functions, whether or not produced by iterating a finite string like T\T2, gives rise to a generalize d Feigenbau m limit. In this paper, the sequenc e of midgets we located is simply the left-most«-cycle midget along the real axis. That is, we found the left-most 3-cycle midget (there
is only one 3-cycle midget), the left-most 4-cycle midget, the left-most 5-cycle midget, the left-most 6cycle midget, and so on. Plotting the log of the headto-center distance against the cycle number of the midget cardioid yields a remarkably straight line over many, many orders, and so it appears this sequenc e of midgets represent s another kind of scaling in the Mandelbrot set. To see this is different from the Milnor scalings, let ^3, Q, C5, C 6 , . . ., denote the centers of the main cardioids of the sequenc e of midgets we generate . That is, Cn is the center of the main cardioid of the left-most «-cycle midget along the spike. Since the Milnor scheme of generalize d Feigenbau m points is constructed by successiv e applications of Douady-Hubbar d functions, the second point correspondin g to the sequence C3, C4, C5, C6, . . ., would not be the center of the left-most 4-cycle cardioid along the spike, but rather the image of that point under the function taking the whole Mandelbrot set to the 3-cycle midget. In particular, the second point would be a superstabl e 12-cycle, the third a superstabl e 60-cycle, and so on. For all of the Milnor sequences , the periods of the points are multiples of the periods of the previous periods; for our sequence , the periods go up by 1. 3. ELEMENTARY PROPERTIES OF SOME POLYNOMIALS
As we observed , the centers of the n-cycle hyperbolic components along the spike can be found by locating
1
^^^.^-^
ri II
T(\U
*^^'
i*.
Yi^Jj»^ f
\-r\Kl
1 1
^ B » ^ -jiL^^9H^EL*j^-jy
Wr It ^jftl* '^^s^ip' 1 T*»(We^^__
H H J ^ H H I H H I H B s . i^HHEF^^
^ IP^HBpW^HKSi^'™
it
nWlWnlBl&iSn
i
^_^„*Kii iKg*^ ^^bjbt '*'
I X
[f!^T^yfH|BE8iM|lffl?t ^
/
r^cwc.) 1
_ ^ i Fig. 2. A hierarchy of hyperbolic components , under repeate d application of the Douady-Hubbar d map taking the main cardioid to the upper 3-cycle disc. The centers of the component s are marked with crosses .
272
M. FRAME, A. G. D. PHILIP, and A. ROBUCCI
the real solutions of 0 = F?"(0) = F?"-\c). In this section, we derive some elementary properties of a family of polynomials and use these properties to establish the correctness of our Cycle Finder program for locating centers. In particular, we study polynomials, with which we can locate the left-most «-cycle midget for each « ^ 3 along the spike of the Mandelbrot set, and locate the center of the head of these midgets. To avoid a multitude of compositions, we introduce the following notation:
of intersection of the f„(c). This point is marked with a star in the top and bottom diagrams. This sequence of functions/,(c), each mapping the parameter plane to itself, provides a simple tool for locating the centers of the hyperbolic components. Now we restrict our attention to locating for each « ^ 3 the left-most «-cycle midget along the real axis. Definition 2: For each n^3 denote by c„ the left-most zero along the real axis off„(c). That is, f„(c„) = 0 and for any real number c,f„(c) = 0 implies c„ <. c.
Definition J: Define fi(c) by/Kc) = c, and for « ^ 2 We begin with some elementary observations about define/„(c) by/„(c) = (f^-dc))' + c. the behavior of the functions/, (c) for c real. With these That is, F?"{0) = f„(c). Recall for c and z real, the results we establish the correctness of our method for bifurcation diagram for the quadratic function Fc(z) locating midgets along the spike. Part of the motivation is obtained by plotting for - 2 ^ c :^ | the eventual for providing the details of these arguments is pedaorbit { F r ( 0 ) , F r ^ ' ( O ) , . . . , Fr^'CO)} = {/„(c), gogic, illustrating that students can be shown rigorous f„+i{c),... ,f„+mic)} for large n and m. Even though yet elementary derivations of some properties of the it is the eventual orbit of the critical point that we plot, Mandelbrot set. the initial orbit provides a sequence of "envelopes" Proposition 1: For each « ^ 3 we have delineating the major features of the bifurcation diagram. The top left of Fig. 3 shows a "weighted" bifur- (1) - 2 < c „ , cation diagram, only plotting a pixel after it has been (2) c„+, < c„, visited some fixed number of times by orbit points. (3) forc0,and (This weighting emphasizes the main features of the (4) f o r c ^ c „ , / ; ( c ) < 0 . diagram.) The bottom left superimposes the orbits {Fc°2(0),..., F,°'(0)}, while the right graphs/2(c) Proof: For thefirst,a simple inductive argument on n (top) through flic), at \ scale of the left. Since shows/,(c) ^ I c\ when c ^ - 2 , since c^ + c 2t \c\ Fc"iO) = fn(c) we see the initial orbits are just the for c ^ -2, Consequently, no zero off„(c) can occur graphs of the corresponding polynomials, so the f„{c) 2Xc^ - 2 . For the second, observe that c = 0 is the right-most give analytic expressions for the envelopes. For example, the main "band-merging" point, or 2 to 1 re- zero of each/«(c), so c^, < 0. Then/„+,(c„) = (f„(c„))'^ verse bifurcation, is a Misiurewicz (eventually periodic, •\- c„ = c„ < 0, and since we know for c sufficiently but not periodic) point of the diagram, and is a point negative/,+1(c) is positive (for « ^ 3,/,(c) ^ | c| if c ^ -2),f„+i(c) must have at least one zero between - 2 and c„. It follows that c„+i lies between - 2 and c„. The third and fourth also follow by induction. To begin, observe that for c < Ci,fy(c) > 0, / 3 ( c ) < 0, and / 3 ( c ) > 0. k\so,f„(c) > 0 for c < c« since c„ is the left-most zero of f„(c). For the third, suppose / J ( c ) > 0 for c < c„. Then for c < c„+i < c„, we see fUi(c) = ((/„(c))2 + cY 2'{fn(c)y 2-/„(c)./;(c)>0. 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
273
Scaling along the spike of the Mandelbrot set ( - 2 , / , ( - 2 ) ) intersect the c-axis at points di and d2 to the left of c„. In addition, by concavity we know the secant line through the two guesses intersects the caxis at a point ei between di and d2. This point d is the first in the sequence converging to c„. In the secant method, this procedure is repeated using (-2,/,(~2)) and (ei ,f„(ei)) as guesses. (Our Cycle Finder program obtains/,(^i) by iterating /v(z) n times, using c = ei and starting with z = 0.) As before, the new point ^2 lies between Ci and c„, and since /«(C/i) < 0, we see the sequence {^1, ^2, • • •} converges to c„. D Our Cycle Finder program uses the secant method and initial guesses - 2 - c and - 2 , so Proposition 2 assures us the Cycle Finder will produce a sequence of ever more refined guesses, converging to c„. In practice, the iteration stops when the difference between the old and new guesses is less than the user-defined accuracy bound e. The final value output by the program is an approximation of a root of the equation/,(c) = 0 and corresponds to the left-most superstable «-cycle along the spike of the Mandelbrot set. In addition to locating the centers of the cardioids of our sequence of midgets, we want the centers of their heads. The next proposition allows us to modify our scheme forfindingcenters of cardioids to also find centers of heads.
Now/„(co) = 0 implies/„+, (Co) = (/„(co))^ + cb = Co = yi(co). Similarly,/„+2(co) ^fiico),... Jin-iico) = fn-i(co) from which we see d Y^f2n(c)\Co = 2/„_,(Co)-(2/„_2(Co)
X(....(2/,(co)+l)...+ l)+l.
(1)
Now compute — f„(c)\ Co, obtaining ac 2/,-,(Co)-(2/„_2(Co)-(...-(2/,(co)
x(£(/,(c))ko)+l)+l)...+ l ) + l
(2)
Since T fi(c) = 1 (recall/i(c) = c), (2) reduces to dc 2f„.dCo)'(2f„.2{co) X(...-(2y;(co)+l)+l)...+
l)+l.
Comparing this with (1) we see j/2n(c)\Co
= £Mc)\Co.
D
The left side of the top of Fig. 4 shows the graph of f3{c), the right side, the graph off(,(c). The zero at c = 0 corresponds to the center of the main cardioid, (1) iff„{c) = 0, then fk„(c) = 0 for any positive integer both graphs cross the axis there because, of course, a k. fixed point is also a 3-cycle and a 6-cycle. The other zero of the ^(c) graph is the center of the 3-cycle car(2) if/,(co) = 0, then ~ / . ( c ) | Co = ~/2„(c)| Co. dioid. The zeros of the fe(c) graph correspond to the centers of the main cardioid, 3-cycle and 6-cycle carProof: Observe (1) follows by writing dioids, and to the 6-cycle period-doubled disc off the 3-cycle cardioid. The right side of the bottom of Fig. F?^"(0) = F?"(F?"(... F!"(F?"(0)) • • • ) ) , 4 superimposes these two graphs, and the left side A: copies of F®". magnifies the picture around the 3-cycle cardioid center and its period-doubled 6-cycle disc. The shapes revealed For (2), first note in this magnification provide the key for our approach. From this, tofindthe period-doubling 2n-cycle center simply decrease c (with a step-size chosen using the ^/2n(c)ko = ~((/2„-,(c))2 + c)ko standardization described in Section 5) until ^;,(c) changes sign from positive to negative. We resort to = 2/2„-,(Co).(^(/2.-,(c))|Co)+ 1 = . . . this approach for finding the center of our «-cycle midget head since in general there will be many real = 2/2„-.(Co)-(2/2„-2(Co).(...-(2/„^,(Co)-(2/„(Co) solutions o f ^ ( c ) = 0 to the left of the w-cyde midget's cardioid center. x(£(/„(c))|co)+l)+l)...+ l ) + l Proposition 3:
4. NEW SCALINGS
Since f„(co) = 0, the middle factor 2/,+,(co) '(2Mco)4£
(f„(c))\co)
+ l)+l
reduces to
2f„+i(Co) + 1 and so -j-finic) I Co becomes ac 2/2„-,(Co)-(2/2.-2(Co)
X(....(2/„+,(Co)+l)...+ l ) + l .
Since f„(c) = 0 is a polynomial equation of degree 2''"\ we must be careful when searching for centers of even modest cycle number, n. To approach this problem of accuracy, our Cycle Finder program, written in Turbo C, manipulates numbers as strings. This gives us effectively unlimited precision; typically computations were carried to many more places than we report here, and we verified many of the centers by generating pictures at these locations and observing midgets there. Unlike the scaling sequences reviewed
274
M. FRAME, A. G. D. PHILIP, and A. ROBUCCI
Fig. 4. Top: the graph offiic) on the left; the graph off(,(c) on theright.Bottom: therightside superimposes the two graphs of Fig. 3; the left side magnifies the this picture around the 3-cycle cardioid center and its period-doubled 6-cycle disc.
in Section two, we investigated a sequence that was not a manifestation of the self-similarity of the Mandelbrot set, but rather identifies "geographically similar" features, here the left-most «-cycle midget along the spike, for each « ^ 3. In this section, we present some new scaling data which appeared during our investigation of this sequence of midgets. Recalling from Definition 2 that c„ denotes the center of the left-most«-cycle midget cardioid, Table 1 presents the values of the ratio
for « = 3, . . . , 101, and the bottom of Fig. 5 shows the graph of ln(c„ - /2„) as a function of «. 5. TINY MIDGETS
Figures 6 and 7 show the 85- and 200-cycle midgets in this series. (These pictures were printed on an HP LaserJet using the program Pizzaz Plus by Applications Technologies, Inc.) The first picture of the 175-cycle midget appeared in [17], so the 200-cycle now suc„ - c„+i persedes this as the smallest midget pictured along the Cn + \ - Cn^l spike, as far as we know. Throughout this project, we have generated pictures of midgets 3 through 86, 95 for « = 3, . . . , 101. The limit of the ratio appears to through 125 by 5s, 150, 175, and 200. The images are be 4, and in Section 6 we present an argument sup- standardized by using for the picture height five times porting this. the head-to-center distance of the midget, noting each The top of Fig. 5 shows the graph of ln(c„+i - c„) successive head-to-center distance is ^ of the previous as a function of «. Linear regression gives the relation (the second scaling mentioned in the last section). In this way, all the midgets in our series appear to be the same size, so features and decorations are presented ln(c„+i - Cn) = -1.386 • n + 2.412 (3) in the same level of detail. More thorough description of the procedures used here, and many more pictures, with correlation coefficient 1.000, hardly a surprise can be found in [ 18 ]. By the magnification of a picture, we mean 2.5/(height), where height is the difference considering the straightness of the graph. Letting hn denote the location of the center of the in the imaginary coordinates of points of the top and head of the «-cycle midget head. Table 2 gives the the bottom of the picture. The scaling described in this paper was discovered while generating the pictures of ratio of head-to-center distances
275
Scaling along the spike of the Mandelbrot set the midgets in this sequence. The original motivation was simply to produce pictures of a coherent collection of very tiny midgets. While trying to standardize the size of the pictures, the head-to-center scaling appeared.
we obtain results supporting the claims m
lim„_.oo^m(«)
6. EXTENSIONS TO SOME GENERALIZED MANDELBROT SETS
A "generalized Mandelbrot set," M(m), can be constructed by following the orbit of z = 0 under iteration of z'" + c for fixed m > 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) <4 and - 3 ^ Imino) ^3.
Fig. 2. The Rayleigh Quotient Iteration on matrix (//) with - 1 4 ^ Re ifio) ^ 10 and -9 ^ Im(Mo) ^ 9.
ponent. Note the magenta crescent-shaped side component. Figure 6 arises from the symmetric matrix (VI) and shows basins with many components. Which basin(s) dominate globally is perhaps not immediately apparent, but, heuristically, the global
behavior is the same as the behavior in the neighborhood of the Rayleigh Quotient X ^AXQ where XQ is assumed to be unit length. This is because for very large magnitude /JLQ the matrix A - IIQI is dominated by -/Lio/, thus the y found at the first step is very close
Table 1. Matrices used to construct the figures. Approximate Eigenvalues
Matrix
0 0 0 0 1
0 0 0 1 0
1 +0.95i - 0.95i +0.59i - 0.59i
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
1 9 5
1 8 6
1 4 2
-0.53 + 0.62i -0.53 - 0.62i 12.05
1 9+i 5
1 8 6
1 4 2
-0.73 +0.6 li -0.32 -0.71i 12.05 +0.1i
-6 7 1 -5
7 10 3 -4
1 3 8 -7
-5 -4 -7 8
-9.43 1.32 7.87 20.23
2 - 9 + 6i -3 + i -3-i (VI) 1 2 3 4 (VH) -14 21 -15 10 (VIII) 12 7 -10 -18
-9-6i -4 -9-2i -6-6i
-3-i - 9 + 2i 2 3i
-3 + i - 6 + 6i -3i 2
-19.45 -0.09 7.32 14.22
2 5 6 7
3 6 8 9
4 7 9 10
-0.81 0.18 0.56 24.06
-10 12 -9 7
0 -4 3 -1
0 0 1 -1
1 1 -1 -1
+i -i +i -i
-14 -6 12 22
0 -2 -2 -3
4 4 -2 -4
1 1 -1 -1
+i -i +i -i
(//)
0.31 0.31 -0.81 -0.81
(III)
(IV)
(V)
Visualizing the dynamics of the Rayleigh quotient iteration
285
Fig. 3. The Rayleigh Quotient Iteration on matrix (///) with - 1 4 ^ Re(Mo) :^ 10 and - 9 <. Im(/io) < 9.
Fig. 6. The Rayleigh Quotient Iteration on matrix (VI) with -18 ^ Re(Mo) < 14 and - 1 2 ^ Im(/io) ^ 12.
Fig. 4. The Rayleigh Quotient Iteration on matrix (IV) with - 3 0 < Re(Mo) ^ 70 and -37.5 ^ Im(/xo) ^ 37.5.
Fig. 7. The Rayleigh Quotient Iteration on matrix (VII) with -.0006 < Re(Mo) ^ .0006 and -.00045 ^ Im(Mo) ^ -00045.
Fig. 5. The Rayleigh Quotient Iteration on matrix (F) with - 2 0 ^ Re(/io) ^ 60 and - 3 0 :^ Im(Ato) ^ 30.
Fig. 8. The Rayleigh Quotient Iteration on matrix (VII) with - 4 < Re(/io) ^ 4 and - 3 < Im(Mo) < 3.
to a complex multiple of XQ. If XQ is unit length, then the next estimate for the eigenvalue is very close to the Rayleigh Quotient X^AXQ and the eigenvector is in nearly the original direction. In particular, consider Fig. 4. Let Xo = ( H H ) a n d ^ be matrix ( / K ) , then X^AXQ = 2.5 and that lies within the basin of attraction of the second eigenvalue from the left (near 1.32), hence that basin dominates globally. Figures 7-9 give examples where features recogniz-
able at a global level can also be viewed at a zoom around the value of the Rayleigh Quotient. These images are generated by a real matrix whose eigenvalues are ±1 ± /; these fall symmetrically in the four quadrants around zero. Moreover, the Rayleigh Quotient with the initial eigenvector is zero. So the global behavior should be the same as the behavior centered between the eigenvalues at zero. Figure 7 is a zoom into the origin. Notice the red and magenta ring of
286
CLIFFORD A. REITER
Fig. 9. The Rayleigh Quotient Iteration on matrix (VII) with -4000000 ^ Re(Mo) ^ 4000000 and -3000000 :^ Im(Mo) ^ 3000000.
Fig. 11. The Rayleigh Quotient Iteration on matrix {VIII) with - 8 0 :^ Re(Mo) ^ 80 and - 6 0 ^ Im(Mo) ^ 60.
Fig. 10. The Rayleigh Quotient Iteration on matrix (VIII) with - 4 <, Re(Mo)(Mo) ^ 4 and - 3 :^ Im(/io) ^ 3.
Fig. 12. The Rayleigh Quotient Iteration on matrix (VIII) with -8000 ^ Re(/iio) ^ 8000 and -6000 :^ Im(Mo) ^ 6000.
basins on the left and green and blue six way crossover between the heads of the red and magenta pinchers on the right. Fig. 9 is a high scale antizoom. The six way crossover is visible inside the pinchers and the red and magenta ring is visible. Figure 8 shows the behavior on a scale where the eigenvalues are visible. The four basins nearly form quadrants with a bit of turbulence on the boundary. Figures 10-12 are generated by matrix (VIII), which has the same eigenvalues and Rayleigh Quotient as matrix (VII). Figure 10 is an image on a scale where the eigenvalues are visible and the four basins nearly form four quadrants with some turbulence. Figure 11, "A Butterfly in a Lightning Storm," is an antizoom, showing much turbulence, and the green and blue basins for — 1 ± / appearing to dominate. While Fig. 11 shows considerable complexity, the iteration counts appearing are not very large. The mode of the frequency table for iteration counts for this image is 12 iterations and the maximum number of iterations is 33. Figure 12 is a large scale antizoom where turbulence is still visible, but the red and magenta basins associated with 1 ± / are seen to dominate.
an eariier version of the code used to generate images of the Rayleigh Quotient Iteration.
Acknowledgement—The author appreciates the efforts of a summer student research assistant, Kenwyn Pilgrim, who was supported by Lafayette College. Kenwyn Pilgrim programmed
REFERENCES 1. M. Bamsley, Fractals Everywhere, Academic Press, New York (1988). 2. R. L. Devaney, Chaos, Fractals, and Dynamics, AddisonWesley, Reading, MA (1990). 3. B. Mandelbrot, The Fractal Geometry of Nature, Freeman, New York (1982). 4. H.-O. Peitgen, P. H. Richter, The Beauty ofFractals, Images of Complex Dynamical Systems, Springer-Verlag, Berlin (1986). 5. C. A. Pickover, Computers, Pattern, Chaos and Beauty, St. Martin's Press, New York (1990). 6. M. A. Motyka and C. A. Reiter, Chaos and Newton's Method on Systems, Computers and Graphics, 14, 131134(1990). 7. H.-O. Peitgen, D. Saupe, and F. V. Haeseler, Cayley's Problem and Julia Sets, Mathematical Intelligencer, 6, 11-20(1984). 8. C. A. Pickover, A Note on Chaos and Halley's Method, Communications of the ACM, 31, 1326-1329(1988). 9. C. A. Reiter, Easy Algorithms for Finding Eigenvalues, Mathematics Magazine, 63(3), 173-178 (1990). 10. B. Pariett, The Rayleigh Quotient Iteration and some Generalizations for Nonnormal Matrices, Mathematics of Computation, 28, 679-693 (1974). U . S . Batterson and J. Smillie, The Dynamics of Rayleigh Quotient Iteration, SIAM Journal on Numerical Analysis, 26,624-636(1989).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
287 Chaos and Graphics
THE "BURNING SHIP" AND ITS QUASI-JULIA SETS MICHAEL MICHELITSCH and OTTO E. ROSSLER
Institute for Physical and Theoretica l Chemistry, University of Tubingen, D-7400 Tubingen, Germany Abstract—By manipulating the imaginary part of the complex-analyti c quadratic equation, we obtain, by iteration, a set that we call the "burning ship" becaus e of its appearance . It is an analogue to the Mandelbrot . set (M-set). Its nonanalytic "quasi"-Julia sets yield surprizing graphicalshapes 1. INTRODUCTION
The real and imaginary component s of the complex quadratic equation are 2
•yl-
Cx and yn + \=2Xnyn-
Cy.
( 1)
Iterating Eq. (1) in the c-plane (paramete r space) yields for Xo = 0 and 3^0 = 0 under the usual manipulations [ 1, 2 ], the Mandelbrot set (M-set). We arbitrarily replace some elements of the righthand side of Eq. (1) by their absolute values. Thereby, the analyticity of this equation breaks down. A first such case was considere d in [ 3 ]. Here we present results for the following equation: •^«4
yl-
and yn+x = 2\xnyn\ ' Cy (2)
both of the main ship and those of the mini ships, are mostly smooth. Some intervals (in the main keel at .5 1.46. It also includes all upper parts of the mini-ships. There are Eiffel Tower-like superstructure s at low iteration number limits of about 50 (Fig. 3a, b, c). Region 4 lies to the left of Region 3, comprizing the upper—"burning"—par t of the ship. Its boundary is "dusty" in contrast to the correspond ing parts of the mini-ships. Within the dust dumbbell-like voids of all sizes are randomly distributed (Fig. 4). Region 5 is the "bow" of the burning ship, lying at - .8 < Cx< - .5 and 0 > Cy> 1.1. Its boundary is smooth (Fig. 1, left hand edge). 3. CORRESPONDING QUASI-JULIA SETS (QJS's)
Its quasi-Julia sets (QJS's) apply in the x, y plane (state space). The word "quasi" is used becaus e the present maps are not analytic, that is, they do not obey the Cauchy-Rieman n conditions
When iterating Eq. (2), with fixed px and py values replacing the previously variable Cx and Cy values, we obtain QJS's in \\\t x, y plane. Bearing close to the border of ships' bodies, tantalizing pictures can be obtained.
^fx{x,y)ldx=df2{x,y)lby
• All QJS's along the x-axis, i.e. with diflrering/?^-values but Py = 0, are identical with the Julia sets of the Mset. This is becaus e the second variable of Eq. (2) is squared immediately at each iteration step, within 2. STRUCTURE AND PROPERTIES the first part of Eq. (2). OF THE "BURNING SHIP" d to smooth Figure 1 shows an analogue to the M-set in param- • All pairs of ;?-values that correspon boundar y points of the burning shi p in Fig. 1 yield eter space. We arbitrarily put Xo = yo = 0. The main smooth QJS's. They explode when the borders of body in this figure is called the burning ship. the ship are crossed from the inside, similarly as this is known from the Julia sets of the M-set. (A differ1. The length of the main body in the c^-direction is ence is that the coincidenceis not perfect this time the same as for the M-set. Along the G-axis (antenna becaus e different Xo, yo pairs yield slightly different region of the M-set), at identical positions, occupied canonical boundaries for the ship.) QJS's that corby the small M-sets, "mini-ships" are located. respond to the beard-Uke intervals of Region 2 exhibit 2. The main body can be divided intofiveregions that highly esthetical, self-similar fractal ornaments (Figs. each exhibit different properties (Fig. 1): 5,6,7). Region 1 of Fig. 1 is below the "water fine" of the • Eiffel Tower-like superstructure s above the Regionship, Cy < 0. The range - .5 < Cx < -.25 we call the 3 ships gives rise to correspondin g features in the "bump." Its boundary is slightly irregular; in its QJS's (Fig. 8a, b, c). Its ordered Eiffel-Tower sufront range, -.43
dfi^x,y)ldy=-df2{x,y)/dx
Reprintedfrom Comput. & Graphics Vol. 16, No. 4, pag. 435-438, 1992
288
MICHAEL MICHELITSCH and OTTO E. ROSSLER
Fig. 1. Computer scan of the "burning ship". Eq. (2) with Xo = yo = 0; maximum iteration number = 250; explosion threshold x^ + y^ = 200; coordinates: -1.25 < c^ < 2.25; - . 7 5 < C v < 1.75.
Fig. 3b. The largest of the mini ships, antenna region. Note the Eiffel Tower superstructures. Maximum iteration number = 50; explosion threshold = 50; 1.7 < C;^ < 1.8; -.01 < c^ < .1.
Fig. 2. "Beard-like" structures (arrows) in the keels in Region 3. Vertical blow-up; .3 < C;^ < 1.8; -.01 < c^ < .1.
Fig. 3c. Detail of Fig. 3b, main left hand Eiffel Tower; 1.74 < c, < 1.75; -.043
•
Fig. 3a. Eiffel Tower-like superstructures above the "water line" near the rear end of the ship (main body) and the mini ships of the antenna region (Region 3). 1.4 < c^ < 1.75; -.01
.1.
.
.
^
Fig. 4. "Dusty" area of Region 4, showing dumbbell-like voids and randomly distributed mini-ships. Maximum iteration number = 250; explosion threshold = 250; .6 < C;c < 1.01; .6
The "burning ship" and its quasi-Julia sets
fr^:''^ «l>"€|
'•m,^^""^
289
•4P*
eij^^^i^kiS Fig 5 Exploding quaa-Julia set (QJS) of Region 2. Note the dust-like self-similar rhomb-shaped ornamental structures: P^ „._„_..„„_^^^^^ «i^c;/« *K^oei,«M - onn. A ^ V - ^ A . A ^ ., ^ A plosion threshold = 200; ~.b < x < .o; —A < y < A.
„ ^„ , . ^ ^ ^ ^ g . , TJJ^^ ^ v^u ^ ^ = 02. Maximum it^tion number = 120; explosion threshold = 8 -.33 < x < .33 -.25 _ o^
Fig. 8b. Blow-up from Fig. 8a. "Head" of the gorilla, -.06 < x<.06;.059<3;<.150. Fig. 6. Detail from an exploding QJS in region 2. P^ = .3, Py - -.13. Maximum iteration number = 150; explosion threshold = 8; -.18 < x < .18; .57 < y < .89.
Fig. 7. Detail from an other exploding QJS from Region 2. Px = .5, Py = -.07. Maximum iteration number ^ 150; explosion threshold = 8; -.115 < x < .115; .675
Fig. 8c. DetailfromFig. 8b. "Hole" in the center of the gorilla's chest. -.0052 < x < -.005; .0610
290
MICHAEL MICHELITSCH and OTTO E. ROSSLER
Fig. 9a. "Alzheimer Brain." QJS from Region 4. p^ = .75, Py = .9. Maximum iteration number = 120; explosion threshold = 120; - 3 < jc < 3; -2.2
Fig. 10a. Smooth QJS from Region 5, a "Frog". Px = -.45; py = .70. Maximum iteration number = 150; explosion threshold = 8 ; - 1 . 2 < A :< \.2;-\.3
Fig. 9b. Detail from Fig. 9a; maximum iteration number = 400; explosion threshold = 200; -1.15 < x < -.55; -.31 < >^< .31. Compare text.
corresponding dumbbell structures too. However, they appear completely symmetric now (Fig. 9a, b ). Note that even the outer circumference of these QJS's reproduces the (inverse) shape of these void structures (Fig. 9 a ). Those dumbbell voids are, thus, selfsimilar. • The smooth structures of the Region 5 ("bow") yield smooth QJS's at correspondin g p-values. An example is Fig. 10a. A QJS from the transient zone between Regions 4 and 5 is shown in Fig. 10b. 4. CONCLUDING REMARKS
Nonanalytic, noninvertible maps of two variables exhibit an unexpecte d esthetical and mathematica l richness. There is some hope that they form a link to realistic, both invertible and continuous, systems; for example, in physics, chemistry, and technology. Acknowledgement—^t thank Albert Murle for kindly sharing with us his computer programs, and Professo r J. Encamaga o for his help at a crucial stage. REFERENCES
1. B. B. Mandelbrot, Fractal Aspects of the Iteration of z ^ Xz(X - z) for Complex 2, z. Ann. NY Acad. Sci. 357, 249(1980).
Fig. 10b. Clutch of selfsimilar "Frogs." QJS from upper part of Region 5, close to region 4. p^ = -.7387; py = 1.1. Maximum iteration number = 500; explosion threshold = 500; -\ <x< U-2.2
H.-O. Peitgen and P. Richter(Eds.), The Beauty ofFractals, Springer-Verlag , Berlin (1986). M. Michelitsch and O. E. Rossler, Spiral structures in Julia sets and related sets. In: Spiral Symmetry, I. Hargittai and C. A. Pickover (Eds.), World Scientific, Singapore 123-134(1992) . O. E. Rossler, C. Kahlert, J. Parisi, J. Peinke, and B. Rohricht, Hyperchaos and Julia sets, Z Naturforsch. 41a, 819-822(1986) .
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
291 Chaos and Graphics
FIELD LINES IN THE MANDELBROT SET KENELM W. PHILIP
Institute of Arctic Biology, University of Alaska, Fairbanks, AK 99775 Abstract—A technique for displaying color images offieldlines surrounding the Mandelbrot Set using angleslicing decomposition and a "contrast color lookup table," is described. A modification of this method, which compensates for the spatial-frequency doubling inherent in angle-slicing decomposition, can produce black and white images that even more accurately portray thefieldlines. Plotting the Mandelbrot set using the level set method[l] involves iterating the following equation:
>Z'^C,
(1)
where Z and C are complex numbers, and testing whether Z is farther from the origin than a previously assigned escape radius. It is well known that if the escape radius is large compared to the size of the set, the iteration-number contours map out equipotential lines in the electric field that would be present if the M-set carried an electric charge[2]. The usual escape radius of 2, on the other hand, gives a very different set of
Fig. 1. Mandelbrot set showing iteration number contours, (a) escape radius=2; (b) escape radius= 100.
contours. Figure 1 shows two views of the M-set with different escape radii—2 in Fig. 1(a), and 100 in Fig. 1(b). Figure 2 shows an enlarged view of these contours for the spike of the M-set, and it is clear that the contours in Fig. 2(b) are appropriately shaped for equipotential lines. It would be interesting to have a simple way to display the "field lines" of this hypothetical electric field, for the Mandelbrot set or for other images involving the level set method. A first approximation to these field lines may be obtained through binary decomposition[3]. Figure 3(a) shows an image of the M-set, using an escape radius of 10, where each pixel outside the set has been set to either black or white, depending on whether the value of the imaginary part of Z was positive or negative when Z passed beyond the escape radius. The transitions from black to white that run orthogonal to the iteration-number contours are short sections of field lines, but the broken-up nature of the plot, and the wide separation between adjacent transitions, tend to overshadow the rendition of the electric
Fig. 2. Spike of Mandelbrot set showing iteration-number contours, (a) escape radius=2; (b) escape radius=100.
Reprintedfrom Comput. & Graphics Vol 16, No. 4, pag. 443-447, 1992
292
KENELM W. PHILIP
Fig. 4. Mandelbrot set using angle-slicing decomposition.
slicing decomposition[4]. Rather than testing for the sign of the imaginary part of Z, this method computes the arc tangent of zi/zr, and then assigns black or white to the pixel according to the value of the angle as the escape radius is passed. Along any given iterationnumber band, the number of black/white alternations is a function of thefinenessor coarseness of the angleslicing, which may be set by the programmer—and a fine slicing can produce blocks that are (locally) a series of parallel lines orthogonal to the iteration-number bands. Note, however, that the spatial frequency of the (b)| resulting pattern doubles each time you move one itFig. 3. Mandelbrot set with binary decomposition, (a) escape eration band closer to the set. Angle-slicing decomradius= 10; (b) escape radius= 100. position is admirably suited to displaying thefieldlines, as Fig. 4 indicates, and can be set to yield blocks of field. Figure 3b shows another M-set image where the any desired width at any given iteration-number band, escaperadiuswas set to 100, and binary decomposition for any choice of the escape radius. produces somewhat narrower blocks that give a slightly To this point we are on well-trodden ground, although I have not seen M-set images that utilize anglebetter rendition of the field lines. Recently, I received a block of True BASIC source slicing decomposition specifically to suggestfieldlines. code that used a different kind of decomposition: angle- Two experiments that I carried out resulted in an im-
Fig. 5. Mandelbrot set: Field lines.
293
Fig. 6. "Sea Horse" in Mandelbrot set: Field lines.
Fig. 7, Tail of "Sea Horse": Field lines.
Fig. 8. Midget at Re=-1.99638 on spike: Field lines.
294
KENELM W. PHILIP
Fig. 9. Mandelbrot Set.
Fig. 10. 'Sea Horse' in Mandelbrot set.
Fig. 11. Tail of'Sea Horse'.
proved ability to map M-set field lines, as described below. I incorporated the angle-slicing routine in my own True BASIC color Mandelbrot program, and linked it to the "contrast color lookup table (GLUT)" coloring scheme I was using. In an RGB color system, one can make a simple contrast coloring scheme by taking the six simple colors (red, yellow, green cyan, blue, magenta) and cycling each one in turn through a preset
Fig. 12. Midget at Re=-1.99638 on spike. number of intensity levels. If M-set iteration numbers are then keyed to this so-called contrast GLUT, you get a coloring system that tends to accentuate structures that lie some distance from the M-set boundary. Experimentation with this program yielded some rather striking color images in which thefieldlines can easily be traced. The distinct changes of intensity within each hue allow thefieldlines to be followed even within a block of a single hue, and the lai^ge change of intensity between hues highlights thefieldline at the boundary. When the spatial-fi^uency doubling at higher iteration numbers makes the hue blocks too narrow for the intensity changes to show, the hue blocks themselves map thefieldlines. If the angle-slicing is set to a sufl5ciently small value, the electric field around the M-set is well mapped until one gets so close to the set that aliasing obscures the lines. Figures 9-12 show the field lines around the M-set and various features within the set according to this method. Even angle-slicing decomposition shows a doubling of the number of "field lines" each time you move one iteration number closer to the set. It would be interesting to have a means of showing thefieldlines which, over at least a limited range of iteration numbers, would display a constant number of lines over a given angle independent of distance from the set. For the simpler case of black and white imaging, I was able to arrive at such a scheme by multiplying the color number within a given iteration band by an appropriate power of two to counteract the spatial-frequency doubling. The effect of this correction is shown in Figs. 5-8, which cover the same regions as Figs. 9-12. The decision not to follow the frequency-doubling correction down into the valleys in thesefigureswas deliberate—the weakening of the field in the valleys would have led to the entire valley being colored black or white, with no indication of its interior field structure. The Appendix discusses the code that produced these images. REFERENCES
1. H.-O. Peitgen and D. Saupe, The Science of Fractal Images, Springer-Verlag, New York, 187-188 (1988). 2. H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer-Verlag, New York, p. 163 (1986).
Field lines in the Mandelbrot set 3. H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer-Verlag, New York, 40-44, 64-76 (1986). 4. J. Corbit, personal communication, after J. D. Jones, I>ecomposition: They went thataway—Another way of viewing the object. ^MFGD^L^, 13,2-3 (October, 1988). APPENDIX Code for angle-slicing decomposition Below is the iteration subroutine used to produce the color images. The plotting area used is 500 pixels wide by 4(X) pixels high, on a 640 X 480-pixel screen (Macintosh II). Another subroutine set up 240 colors to a sequence of 10 intensity steps each of red, yellow, green, cyan, blue, and magenta— making 60 different colors that repeat 4 times to occupy 240 successive color numbers. The language being used (True BASIC 2.01) allowed assignation of over 240 RGB colors to color numbers, which could be accessed by the ' ' SET COLOR colornumber' ' statement. Variables are: realcent:
real value of the center of the plotting rectangle. imagcent: imaginary value of the center of the plotting rectangle mag: magnification in relation to a standard view of the region from —2.0 to +0.5 along the real axis, defined as having mag=l. dwell: maximum iteration number ersqr; square of the escape radius SUB Iterate 2r=0 zi=0 FORx=lTO 500 r=-l. 5/mag+realcent+x* (. 00625/mag) PORy=lTO400 i = -1,25/mag+imagcent+y* (.00625/mag) FOR n=l TO dwell zsqr=zr*zr—zi*zi zi=2*zr*zi+l zr=zsqr+r sizesqr=zr*zr+zi*zi IF sizesqr>ersqr THEN nn=n n=dwell
295
phi=atn(zi/zr) 1 compute angle for Z IF zr>0 THEN IF zi>0 THEN theta = phi ELSE theta=360+phi 1 set quadrant ELSE theta=180-l-phi END IF colr=int((theta*240)/360) Imap 240 color # s on to 360 degrees SET COLOR colr/div+1 1 complete angle slicing with parm 'div* END IF NEXTn PLOTx+10,y+10 SET COLOR ' 'black* • zr=0 zi=0 NEXTy END IF NEXTx END SUB To produce the black and white field line images (Figs. 4-7), the line SET COLOR c o l r / d i v + 1 was replaced with two lines: IF nn
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
297 Chaos and Graphics
A TUTORIAL ON THE VISUALIZATIO N OF FORWARD ORBITS ASSOCIATED WITH SIEGEL DISKS IN THE QUADRATIC JULIA SETS G. T O DD MILLER ^
Hartford Graduate Center, Hartford, CT 06120 Abstract—This article presents the use of computer graphics to gain a better understandin g of the dynamics occurring in the Siegel disk Julia Sets. Traditional images of the Julia Sets usually display only the final behavior of the forward orbits of each point in the discretized complex plane. For each pixel in the image, a forward orbit must be computed—usuall y the information contained in the orbit is thrown away. This approach examines the orbit as well as its final behavior.
It turns out that the path of Or^(z) in a Siegel disk is very structured. This type of dynamical behavior was named after the German mathematicia n C. L. Siegel who discovered the case in 1942[ 1 ]. His discovery lead to the Kolmogorov-Arnold-Mose r theory that attempts to explain the stability of the solar system. Figure 2 show seven of the many orbits associate d with the Siegel disk as rings of dots. Basically orbits from smaller peripheral buds make their way to larger and larger buds and finally to one of the many rings that make up the Siegel disk. Once the orbit makesit to the disk, it is trapped and simply revolves about the disk forever, never making it to the center of the disk 2. VISUALIZATION OF A SIEGEL DISK where the fixed point is located. Jc in Fig. 2.0 is the Figure 1 shows a representatio n of the Julia set Jc same as the previous figure except Kc is colored white for the paramete r c = -0.39054 - 0.58679i[l]. This and ^( 00) is rendered as a collection of black and white Jc is one of many possible that have a Siegel disk. The contours called level sets. Some of the buds on Kc are space represente d in the figure is a set of complex colabeled with capital letters. Kc is symmetric about the ordinates z E: 6' where ^ denotes the complex plane. origin (z = 0 + 0/ in the center of image) and the Each pixel on the computer screen is mapped to a labeling of the buds reflects that symmetry. It turns unique z. The algorithm[l, 2] iterateseach z in turn out that the ring associate d with Or^{z) where z origby applying/(z) and in doing so produces a sequenc e inates in a peripheral bud is also associate d with the of complex numbers. (See the Appendix for algorithm symmetric image of that bud. For example, the forward pseudo-code. ) This sequenc e is called the forward orbit of z from the center of the bud labeled C becomes orbit of z and is denoted as Or^{z) = {z, / ( z ), trapped in the same ring (the inner-most, smallest ring) / ( / ( z ) ) ,. . .} . In Fig. 1, if the orbit remains bounded as the forward orbit of z from the center of bud C. (that is |/"(z)| < 2 where/"(z) denotes the nth iterate The associatio n between peripheral buds and displayed off) then the pixel mapped to that z coordinate is rings is as follows (listing in order of increasing ring colored black. If the orbit tends toward infinity diameter): {C, C'} , {B , B'} , {F, F ' } , {G,G'},{A , g pixel is colored ( l/"(^ ) I > 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 - |<2„|) < CO, then it is well known that 5iv(z) con- each number N^z), we get a graphics image that shows e of the sequenc e of partial verges to a nonconstan t analytic function B(z) in D the pattern of convergenc whose only zeros are {a„} (counting multiplicities) products ^iv(z). In practice, we represen t Z> 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\ <2~^'^, proving the 2periodic region is a circle. For n = 3, the 2-periodic region is given by c = ± V(2 + a^ where \a\ >~^'^. This follows from the stability condition | d/dz{{z~^ + c)~^ + c)| < 1, which yields Kz'^ + zc)"M < 3 ~ ' /^ Defining a = (z'^ + zcy^ and algebraically manipulating the 2-cycle condition (z~^ -\- cy^ -\- c = z yields the equation specifying the region. A similar derivation shows that for « = 2, the 3-periodic regions are given by c^ = —(\ -\- a -\a^), where \a\ < 1/2; these are the three orange cardioid-like regions in Fig. 5. The fractals generate d from Eq. (1) have rotation and reflection symmetries . As conjectured by Gujar d with exponent and Bhavsar in [ 1], the fractal generate « is (« + 1 )-way rotationally symmetric. This can be seen since if/(z) = z"" + c, g(z) = z'" + ^2.'/(«+i)^^ and h(z) = ^27r//(«+i)^^ ^y^^^ ^^y ^ ^^^ ^ ^^ / a nd g are topologically conjugate by homeomorphis m h. ThereFig. 5. Fractal generate d from z ^^ z"^ + c, colored according fore the paramete r values c and ^2ir//(«+i)^ result in the to periodicity of the mapping. Short cycles are colored according to length: 1 = white, 2 = red, 3 = orange,4 = yellow, same dynamic behavior and the fractal is (« + 1 )-way 5 = green, 6 = blue. Points that did not converge to a cycle rotationally symmetric. (In other words, rotating c by are colored black. ^2,r/7(«+i) sinf^piy rotates terms in the resulting z sequence by the same amount.) Similarly, if/(z) = z~" + c, g(z) = z~" + c, and h{z) = z, then / a nd g are topologically conjugate. Thus, c and c yield the same c values that result in convergenc e to a fixed point of dynamic behavior, so the fractal is symmetrical by reEq. (1). A fixed point of Eq. (1) will satisfy flection in the real axis. c = z — z
(3)
For a stable cycle, the derivative of Eq. (1) must have magnitude less than 1; that is, \-nz~ < 1 so \z\>n'^^"^'^
2.2. Julia sets A z-plane Julia set can be generate d from Eq. (1) by fixing c and varying the starting z value in the plane. Gujar, Bhavsar and Vangala have used escape-tim e techniques[8 ] to create z-plane fractals from Eq. (1).
(4)
Thus, the fixed point region in the c-plane (the white region in Fig. 5) is given by Eq. (3), where z satisfies Eq. (4). (A similar analysis is applied to the Mandelbrot set by Branner in [ 3 ].) Geometrical analysis of Eqs. (3) and (4) shows that the boundary of the fixed point region forms a « + 1 cusped hypocycloid. (A hypocycloid is the curve formed by rolling a smaller circle inside a larger circle and tracing a fixed point on the circumference of the smaller circle.) The radius of the outer fixed circle for the hypocycloid can be computed as \z\ + \z~"\, where z satisfies Eq. (4), resulting in a radius of (« + J )„-«/(«+!) Yhe radius of the inner moving circle is |z""|, yielding n~"^^"'^^\ Figure 6 shows the fractal generate d from z ->• z""^ + c using the Lyapunov exponent method; note the hypocycloid shape of the outer boundary. For n = 2, the 2-periodic region is a circle with radius 2~^^^; this is the red region in Fig. 5. To see this, note that a point with period 2 must satisfy (z"^ + c)"^ + c = z, and thus {c- z-\- c^z^)( 1 + cz^ - z^) = 0. The
Fig. 6. Lyapunov exponen t fractal generate d from z -*• z-^ + c.
310
K. W. SHIRRIFF
A different way to generate Julia sets that avoids escapetime problems and results in new images is to iterate each z value and examine its cyclical behavior. For example, pick a c value such that if iteration is started with zo = c, the result is convergence to an attractive cycle of length 2. Call the two values in the cycle a and /?. If we now iterate the mapping consisting of Eq. (1) composed with itself, which we will denote as/^(z), the cycle of length 2 becomes afixedpoint, either a or h. Finally, for any z value in the plane, we can iterate /^(z), see if it converges to ^ or to Z), and color the associated pixel one of two colors. Figure 7 shows the result of thefixed-pointcoloring process applied to c = 0.106 + 0.619/. (This c value is near the edge of the central red circle in Fig. 3.) The Julia set is the boundary between the black and white regions in Fig. 7, and consists of z values that don't converge to the cycle. (Note: the exponent in Eq. (1) is « = 2 for all images in this section. Julia sets with other exponents can be generated similarly.) The Julia sets corresponding to longer cycles can be computed in a similar way. Fig. 8 shows the fiUed-in Julia set generated from c = 0.48 + 0.9/. The c value is in the large upper-right orange circle of Fig. 5 corresponding to a cycle of length 3. Thus, most z values converge to a stable 3-cycle, and there are three fixed points of/^(z), resulting in the three colors of regions in Fig. 8. Figure 9 shows the filled-in Julia set for c = 0.72 + 1.05/; the corresponding cycle is of length 7, resulting in 7 regions. Note that the regions never meet along an edge, but only at single points where all 7 regions meet. (This follows from a theorem[9] that the Julia set of a rational function is the frontier of the stable set associated with any fixed point. Thus, any boundary point must be on the border of every region.) Based on experimental image generation, it appears that the Julia sets can be roughly categorized. A c value
Fig. 8. Filled-in Julia set generatedft-omz ^^^ z~^ + c with c = 0.48 + 0.9/. This c value is in the upperrightlarge orange region of Fig. 5 and generates a cycle of length 3. Points are colored according to thefixedpoint of/^(z). that results in convergence to a fixed point {i.e., a c value in the white region of Fig. 5) yields a Julia set that is a Cantor set. A c value that converges to a cycle of length 2 (i.e., the red region in Fig. 5) results in a Julia set that is a simple closed fractal curve between two regions, as in Fig. 7. As the c values approaches the boundary of the red region, the Julia sets becomes more jagged. For c values in one of the large rounded regions centrally located in an arm, touching two white regions in Fig. 5, the Julia sets are resemble Fig. 8. These Julia sets are reminiscent of fractals generated by finding basins of attractions of Newton's method [ 7 ]. For c values in one of the buds off the white region in Fig. 5, the Julia sets resemble Fig. 9, with large regions with complex boundaries that pinch together at various points. Other c values corresponding to stable values result in a Julia set that is somewhat
Fig. 7. Filled-in Julia set generated from z ->- z"^ + c with c = 0.106 -I- 0.61^/. This c value is near the edge of the central Fig. 9. Filled-in Julia set generated from z -^ z~^ -\- c with c red regiori of Fig. 5 and generates a cycle of length 2. Points = 0.72 + 1.05/. This point is in a small bud off the right-hand are colored according to the corresponding fixed point of white region of Fig. 5 and generates a cycle of length 7. Points are colored according to thefixedpoint of/^(z). fHz).
Investigation of fractals foam-like, with many rounded regions of various sizes packed together. For c values corresponding to unstable values, we were unable to generate Julia sets by the cycle-finding method, as the iteration was not cyclical. The Julia set classifications appear to generalize to exponents other than « = 2. The Julia sets generated from Eq. (1) are «-way rotationally symmetric, as conjectured by Gujar, Bhavsar, and Vangala[8]. Since (^^"/"zo)"'' + 0 = 20" + ^, the rotation of ZQ drops out in the first iteration. In general, the Julia sets are not symmetrical by reflection unless c is real. 3. CONCLUSIONS Interesting fractals can be generated from z ^*' z~" + c by computing Lyapunov exponents and by determining the periodicity of cycles. These fractals have a detailed structure that is obscured by the escape-time method of computation. The corresponding Julia sets yield a variety of structures. There are several avenues for future research. Equation ( 1 ) can be analyzed for noninteger or even complex exponents by the use of the Lyapunov and cycle techniques, extending the analysis of Gujar et al The techniques of this paper can also be used with other formulas besides Eq. ( 1 ) ; the techniques may be especially useful for formulas such as z ^^ (z)~" + c or z -^ cosh(z) + c [10] that do not diverge to infinity.
311
Acknowledgments—This research was supported by an IBM Graduate Fellowship. The Pbmplus package of image tools by Jef Poskanzer was of great assistance in generating the figures. Photography was courtesy of Steven Lucco.
REFERENCES 1. U. G. Gujar and V. C. Bhavsar, Fractals from z -^r- z" + c in the complex c-plane. Comp. & Graph. 15, 441-449 (1991). 2. E. F. Glynn, The evolution of the gingerbread man, Comp. & Graph. 15,579-582(1991). 3. B. Branner, The Mandelbrot set, Proceedings ofSymposia in Applied Mathematics, 39. Published as Chaos and Fractals: The Mathematics Behind the Computer Graphics, ed. R. L. Devaney, L. Keen, 75-105 (1989). 4. M. Markus and B. Hess, Lyapunov exponents of the logistic map with periodic forcing, Comp. & Graph. 13, 553-558(1989). 5. S. T. Welstead and T. L. Cromer, Coloring periodicities of two-dimensional mappings, Comp. & Graph. 13, 539543(1989). 6. B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman, New York (1983). 7. H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer-Verlag, Beriin (1986). 8. U. G. Gujar, V. C. Bhavsar, and N. Vangala, Fractals from z <- z" + c in the complex z-plane, Comp. & Graph. 16,45-49(1992). 9. P. Blanchard, Complex analytic dynamics on the Riemann sphere. Bull. Am. Math. Soc. 11, 85-141 (1984). 10. 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
313 C h a os and G r a p h i cs
INFINITE-CORNER-POINT FRACTAL IMAGE GENERATION BY NEWTON'S METHOD FOR SOLVING exp
(-f^)
0
- 1
Y O U N G B O NG K I M , ^ H OI S UB K I M , * H O NG O H K I M , * and S U NG Y O N G SHIN^
^Department of Computer Science and *Department of Mathematics , Korea Advanced Institute of Science and Technology, 373-1 Ku Song Dong Yusong Gu, Taejon 305-701, Korea Abstract—Newton's method is sensitive to an initial guess.It exhibits chaotic behavior that generate s interesting fractal images. Most of them have either a finite number of attractors (attractive fixed points) or unbounde d Julia sets. In this paper, we show that Newton's method for a family of equations exp I -a
1 - 1 =0
(for « > 0 and | f | = 1) has infinitely many attractors and a bounded Julia set. The dynamics of Newton's method for finding their roots are also visualized. 1. INTRODUCTION
Ma^)
Consider the complex polynomial p{z) = z^ — 1. Newton's method is often employed to numerically find a root of the equation p(z) = 0 [ 1 - 3 ]. A root of p(z) = 0 is the limi t of a sequenc e {zk} of complex numbers generate d by this method with a proper initial guess ZQ. Therefore, each of its roots plays the role of an attractor (attractive fixed point) when Newton's method is applied to solve the equation p{z) = 0. In other words, the three roots are competing with each other to attract ZQ. The set of starting points whose generate d sequence s converge to a root forms a basin of attraction for Newton's method. It is well-known that the boundary of each basin of attraction is the Julia set of Newton's method. As illustrated in Fig. 1, this Julia set consists of three-comer-point s with respect to the basins of attraction of the roots ofp{z) = 0 [ 2 ] . That is, three basins of attraction meet at every point i n the set. By the same token, the Julia set of Newton's method for z" — 1 = 0 consists of «-corner-points with respect to the basins of attraction of the n roots of unity. It is natural to expect that more interesting graphical images can be obtained if an equation has infinitely many roots. A suitable limi t ofz"— 1 = O a s « ^' oo is ^^ — 1 = 0 whose roots z = Ikiri, where k is an integer, are unbounded and form attractors of Newton's method for e^ - 1 = 0. Its unbounded Julia set consists of infinite-comer-points, and its inversion with respect to a circle appears in [4, 5 ] . By allowing an equation with singularities, a bounded Julia set of infinite-corner-points can be obtained without a decorative touch such as a circle inversion. In this paper, we consider a family of functions Mf,«(z) = exp
hn
(2)
-1 = 0
turns out to have all its infinit e number of roots on the unit circle. The minor defect is the singularity at f, which can easily be avoided in image generation. The behavior of Newton's method for Eq. (2) is analyzed to present a number of fractal images that are rather complicated and aesthetic. In Section 2, we show that Eq. (2) has infinitely many roots on the unit circle, and Newlon's method for solving this equation also gives an extra attractor at infinity . Section 3 presents color graphical images to visualize its behavior. Concluding remarks are given in Section 4. 2. ATTRACTORS OF NEWTON'S METHOD
Newton's method for the e q u a t i o n / ( z) = 0 has the form Zk+i = N(Zk), where A^(z) = z - / ( z ) / / ' ( z ). The simple roots o f / ( z) = 0 are fixed points of A/^(z), and they act as attractors of Newton's method since the derivative N'{z) = f(z)f"{z)/(f (z))'^ vanishes there. That is, a Newton sequenc e {zk} converges to a root o f / ( z) = 0 if an initial value ZQ is properly chosen. For a simple root z^, the set of initial values where Newton sequence s converge to z* is called the basin of attraction of z* [ 1, 2, 8, 9 ] . The attractors of Newton's method for Eq. (2) are the roots of the equation. For a > 0, the roots f^ satisfy
a -—^
= Ikiri,
k integer.
If we set f = ^"^, then the roots have the form ^k = e'^'' where
a cot
(1)
( ^ )
where « > 0 and | f | = 1 [6, 7 ] . It has a singularity at z = f. The equation dk = (l)-\- 2 c o f This researc h is supported by TGRC and KOSEF. Reprinted from Comput. & Graphics Vol 17, No. 6, pag. 705-711, 1993
•m
2^71
A: integer.
(3)
314
Y. B. KIM, H. S. KIM, H. O. KIM and S. Y. SHIN
Fig. 2. Roots of M,,,o(^) - 1 = 0
Fig. 1. Three basins of attraction of the Newton's method for z^ - 1 = 0.
From expression (4) and estimate (6), we have Therefore, Eq. (2) has infinitely many roots ^^ = ^'^* on the unit circle. These roots are symmetrically located - ! - | z - f | 1 - exp |z| about the singular point f. That is, for an integer m, |A^,(z)| > 2a f ^ and J_w are symmetric about the ray of angle 0. Most of the roots cluster near f. We can observe that S 7 - ( U I - 1)'(1 -e""')\z\ as a decreases the corresponding roots ^^ = ^"'^ get la closer to the singular point f. •/2 I _ p-«n The explicit form of Newton's method for Eq. (2) - \ 2 \
m)
= ui \
la
' ^ )
1 - e-i^ N^(z) = z +
1 - exp
2af
m)]
(4)
For the function T^{z) = 1 /N^{ 1 /z), we observe that TfCO) = 0 and T\{0) = 0. That is, z = 0 is an attracting fixed point for T^{z), whence z = oo is an attracting fixed point for N^(z). In particular, we show that if \z\ > 2 +
-a/2
1 - e-
+ a\
2a
(5)
•
exp a Re exp < exp —a (|z| + 1
; exp
\z\-
Table 1. Color mapping scheme for basins.
4a
then A^f(z) -> oo as /c -^ oo. First, we note that the right hand side of Eq. (5) is bigger than 3 and hence
exp
>\A[—Z \ > \z\.
W (6)
Basin of attraction
Assigned color
The value of r, g, b (0-255)
Singular point Point at infinity P* farthest zero 2""* farthest zeros 3'*^ farthest zeros 4^*" farthest zeros 5^'' farthest zeros 6*'' farthest zeros 7*^ farthest zeros 8'*' farthest zeros 9^'' farthest zeros lO"' farthest zeros 11*** farthest zeros 12''' farthest zeros 13*'' farthest zeros 14*'' farthest zeros 15*'' farthest zeros Remaining zeros
black medium orchid royal blue red dark orange gold light goldenrod yellow green green pale green light sea green cyan cornflower blue steel blue dark violet magenta medium violet red yellow
0:0:0 186:85:211 65:105:225 255:0:0 255:140:0 255:215:0 255:221:130 173:255:47 0:255:0 152:251:152 32:178:170 0:255:255 100:149:237 70:130:180 148:0:211 255:0:255 199:21:133 255:255:0
315
Infinite-corner-point fractal image generation Table 2. Color mapping scheme for convergenc e behavior. No. of Iteration
Assigned color
The value of r, g, b (0-255)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
lime green DodgerBlue3 pink4 RoyalBlue3 gold3 indian red green4 yellow! bluel magenta l turquoise MediumPurplel chocolate 1 RosyBrown 1 snow3 ivory4 Sky Bluel 01iveDrab2 marmoon2 Misty Rose2
50:205:50 24:116:205 139:99:108 58:95:205 205:173:0 205:92:92 0:139:0 105:205:0 0:0:205 255:0:255 0:245:255 171:130:255 255:127:36 255:193:193 205:201:201 139:139:131 135:206:255 179:238:58 238:48:168 238:213:210
provided I -
ela
+ a
\A
> 1,
Fig. 4. A magnification of the rectangle in Fig. 3; window: -7.0 < Re z < 7.0, -7.0 < Im z < 7.0.
quence {z^} generate d by an initial value ZQ in the region satisfying inequality (5) always diverges to infinity. That is, the region satisfying inequality (5) is contained in the basin of attraction of the attractor at infinity . Therefore, the basins of attraction of the roots of Eq. (2) are contained in a finite region
or \z\ > 2 +
Ul ^2 + -
4«
Therefore, we have |iVf(z)| > | z| for z in the region satisfying inequality ( 5 ). This means that Newton se-
4a
and so is the Julia set of Newton's method. This fact wil l be used to determine the threshold value L for testing the divergence of an orbit in image generation in Section 3. On the other hand, each root of the Eq. (2) attracts orbits starting from its neighboring points. For a root ^k of Eq. ( 2 ), if we note expl -a-
^_
2ai{z-^,)
(f-^)(r-6)
^I
1 and set
for computationa l simplicity, we
have
A^f(z)-^, = z - f , +
(f-^r 2 af
1 - exp
("^)
Xexpl-.^j (f-z)^ = 2 - f* + •
2-kk
X Fig. 3. Basins of attraction of the Newton's method for Mi,io(^) - 1 = 0 ; window: -35.0 < Re z < 15.0, -25.0 < Im z < 25.0.
2 af
b
(r-z)(z-^.)
)1
316
Y. B. KiM, H. S. KIM, H . O. KIM and S. Y. SHIN
, 9 i r - ai + 10^
2a exp
2a l 9 | f - f , | + 10a^''^\ Fig. 5. The flower when a = 10; window: -7.0 < Re z ^ 7.0, -7.0 < Im z < 7.0.
1
(z - «*)
1
2
-('-F^)
1+-^+-^^ + (z-f*)
If-aj
^^^^3i^^
^ - ^ ^ (z-6)-
1
1
\1
f-fJ/j
(7)
then \N^{z) ~ ^k\ < \z - ^k\' Therefore, it follows that Nfiz) ^^ {;t as m -^ 00. That is, the points in the region satisfying inequality ( 7 ) are contained in the basin of attraction of the root ^k- This fact will be used in determining the threshold value e for testing the convergence of an orbit to an attractor ^k in image generation in Section 3. For a = 10 and 0 = 0, some of the roots of Eq. (2) with regions satisfying inequality (7) (indicated by small circles) are shown in Fig. 2. We show explicitly that if two points ZQ^^ and ZQ^^ are symmetric about the ray of angle 0, then the orbit of two points behaves symmetrically about the ray. For f = I where > = 0, we note that
N,(z)
= z + i\-zy la
,
A^.(^).
f-^*
9
9|f-f.|
1 + z \ 1
1 - exp( .
(8)
oc^
(f-Z)(f-?,) 2
2 ,
Suppose that | z - JJ < If - ?;tl/10. Then \z - f| 2a > 9 | f - J , | / 1 0 a n d s o M | < 9 | ^ _ ^ | • ^ow, we can estimate \N^(z) - ik\ as follows: I \N,{z)-ik\
^ \ z - h + •
If-?.
lf-2||f-f;tl
l ^ - ? . l' lOa 9|f-?.|
yexpCMI) exp(M|)|
1 f-f.l
exp(MI)
•jexpd^j)
Fig. 6. The flower when a = 5; window: -4.0 < Re z < 4.0, -4.0 < Im z < 4.0.
Infinite-corner-point fractal image generatio n
317
It is hard to determine how many iterations are required for Newton's method to reach an attractor from an initial point ZQ. If ZQ lies on the JuHa set, its Nev^on sequenc e does not even approach to any attractor. Furthermore,M^^„{z) is not well-defined at the singular point f, which makes it unable to evaluate M^^J^z) there. We empirically choose the maximum number A^ of iterations to be 100. Let {zk}hQ the sequenc e of complex numbers generated by Newton's method with an initial value ZQ. Suppose that {Zk} has a value z, near a root ^rn such that i < N and I z, - J^ | < e where e is set to be the value of the right hand side of inequality (7). Such a d by Newton's method, is taken root ^n,, firstencountere as the attractor of ZQ. If Nev^on's method does not hit such ^rn within N iterations, the attractor of ZQ is assumed to be either the artificial attractor or the point at infinity unless {z^} has a point sufficiently close to f. The attractor of ZQ is the point at infinity if | z, | > Fig. 7. Theflowerwhen a = 1; window: 0.4 < Re z :S 1.6, L for some / < A^ where the number L depends on the value of a as described in inequality (5). Otherwise, -0.6 < Im z < 0.6. its attractor is assume d to be the artificial attractor. Suppose that {Zk} has a point z, close to f such that The relation (8) shows that if the orbit of a starting U/ - f I < 6, where b is chosen to be a small positive point ZQ tends to a root JAC, the conjugate point ZQ gen- number. If Newton's method does not stop with an erates the sequenc e converging to the root ^-k. There- attractor until its /'^' iteration, {z/t} is considere d to fore, the Julia set for f = 1 is symmetric about the real contain f. In this case, ZQ is thought not to have any axis. When f = ^"^, we can easily see that attractor. Fortunately, the effect of the singular point f appears to be negligible in fractal images shown later (^/0 _ ei^)2 in this section. We choose 6 = 10~^ in our image gen7Vf( e''^z) = e^'^z + eration. lae'' Let Z) be a rectangle in the complex plane containing e"^ + e"^z the unit disk. Then, D contains all roots of Eq. (2). In 1 — expla \ e'' e'^z order to observe its Julia set that is the boundary of the basins of attraction, the size of Z) is required to be e'^^N.iz). (9) sufficiently large. However, it is also restricted by the s of a graphics terminal. In pracThe relation (9) indicates that the dynamics of N^(z) physical characteristic tice, D consist s of finite grid points of mesh size h, are conjugate to that of iVi (z) by the multiplication of e''"'. From the relations (8) and (9), we can explain that as (t> increases , the correspondin g Julia set rotates counterclockwis e about the origin.
3. GRAPHICS IMAGE GENERATION AND OBSERVATIONS
In this section, the behaviorsof Newton's method for solving Eq. (2) such as the basins of attraction and its convergenc y are graphically presented . As analyzed in the previous section, Eq. (2) has infinitely many roots lying on the unit circle. Therefore, it is not possible to identify all of them. As shown in Fig. 2, most of the roots cluster near the singular point f. In fact, experiments show that the basins of these clustered attractors are too small to appear in a computer-gen erated image. They also provide the fact that the basin of an attractor tends to be smaller if the attractor is nearer to f. Hence, we first choose, as attractors, the point at infinity and 29 roots farther from f than the others to generate graphical images. The remaining infinitely many roots near f are considere d to be the artificial attractor.
Fig. 8. The convergenc y in the basin of attractor at —1; window: -35.0 < Re z < 15.0, -25.0 < Im z < 25.0.
318
Y. B. KIM , H. S. KIM , H. O. KIM and S. Y. SHIN
which is dependen t on the resolution of a display device. The value in the complex plane correspondin g to each grid point is sampled as a starting point ZQ for Newton's method. The color at each grid point is determined either by its attractor (Figs. 3-7 and 10) or by the number of iterations before reaching at a point within € of its attractor (Figs. 8 and 9). In either case, we do not assign any color to a grid point with no attractor, which is induced by the singular point f. The RGB color system is adopted to present graphical images. The basins of the thirty attractors including the point at infinity are painted with seventee n colors as shown in Table 1. The i'^ farthest roots from the singular point f always appear in pair for / = 2, 3 , .. ., 15, since M^^^(z) is symmetric about the ray of argument 0 = arg( f). Therefore, their two basins are given the same color. The remaining three colors are assigne d to the basins of the farthest root, the point at infinity, and the artificial attractor, respectively. In order to maintain the consistency , this color mapping scheme is applied to all figures(Figs. 3-7 and 10) in which the basins of attraction are focused. For visualizing the convergenc y of Newton's method, the number of its iterations for each starting point ZQ is mapped into a color (Figs. 8 and 9). Table 2 shows the color assignment for the first 20 iterations. Now, we are ready to present computer-generate d images illustrating the dynamics of Newton's method when it is applied to Eq. (2). By varying a. Figs. 3 through 7 are obtained. Figures 3 and 4 give a typical shape of the Julia set of Newton's method for Mf,«(z) - 1 = 0 when f = 1 and a = 10, i.e., M^oiz) - 1 = 0. Figures 5, 6, and 7 show how the shape of the Julia set is changed if a is varied. On the other hand. Figs. 8 and 9 visualize the convergenc y of Newton's method. Finally, the Julia set of Newton's method for Mij(z) - 5 = 0 is given in Fig. 10 as a variation of Eq. (2). We begin with observing Fig. 3 in which the basins of attraction of Newton's method for A/i,,o(z) - 1 = 0 are graphically represente d as a prototype image for Mf,«(z) — 1 = 0. We can observe that this image is
Fig. 10. The basins of attraction of the Newton's method for Ml ,(z) - 5 = 0; window: -1.0 ^ Re z < 7.0, -4.0 :^ Im z ^ 4.0.
symmetric about the real axis. The image globally consists of three structural components ; the region colored medium orchid, the region colored royal blue, and "flowers" lying between the two regions. As indicated in Table 1, the first two regions are the basins of attraction induced by the point at infinity and the farthest root at the point - 1 , respectively. The basin of the point at infinity covers the most of the complex plane except the "deformed disk" containing the remaining . The deformed two component s and thus is unbounded disk is mostly occupied by the basin of the farthest root, excluding the flowers of various sizes. The most interesting one is the flowers in the deformed disk. A "petal" of a flower looks like a "helmet" with showy "ornaments," and the color of its main body indicates its attractor. The Julia set of Newton's method for J^]Ao{z)- 1 = 0 is the union of boundaries of colored regions. It appears not only on the boundary of the deformed disc but also on the boundaries of flowers in its interior. We can observe, as expected , that the fractal structure with the infinite number of attractors within a bounded region gives rather remarkable figures. Figure 4 is a magnification of a small squared region containing a bigflowernear the singular point fi n Fig. 3. The helmet-shape d petals of the flower are enlarged to show an interesting structure. Each ornament on a helmet is itself aflower.This confirms the self-similarity of a fractal image. Let R be an arbitrarily small disc centered at a point on the Julia set. Even though R does not contain any flower in the image, if R is sufficiently magnified, new flowers will come out from this "magic disc" R as many as we want. As a petal lies more deeply in the flower, its size is smaller. The outmost one is the largest that is colored red. According to Table 1, it is the basins of the second farthest pair of attractors from f. Similarly, the medium violet red spot s represen t the basins of the attraction neares t to Fig. 9. The convergenc y in the basin of attractor at oo; window: f among the selected 29 attractors on the unit circle. -45.0 < Re z < 25.0, -35.0 < Im z < 35.0.
319
Infinite-corner-point fractal image generation The small yellow-colored region in the center of the flower indicates the basin of the artificial attractor. Its small size justifies the artificial attractor. Black colored spots apparently do not occur in the image. This means that the effect of f is negligible. Figures 5, 6, and 7 show how the shape of a flower is changed when a is changed. The value of a gets 10, 5, and 1 in Figs. 5,6, and 7, respectively. As a decreases , the roots of Eq. (2) except the farthest one from f tend to move closer to f along the unit circle. Accordingly, the flower in Fig. 4 is getting smaller, and its petals are moving outward. We make use of this phenomeno n to show a blooming flower. In order to exaggerat e the flower, the small isolated regions near the flower, which is colored medium orchid, are painted with royal blue. The sizes of the flowers are adjusted so that each flower in Figs. 5, 6, and 7 has a similar size. The flower looks blooming when the three flowers in the figures are interpolated in the order of decreasin g a. The convergenc e behavior of Newton's method is visualized according to Table 2 in Figs. 8 and 9. In Fig. 8, the convergenc y for a starting point ZQ in the basin of the farthest root is given. Figure 9 illustrates the convergenc e for ZQ in the basin of the point at infinity. Finally, we graphically show, in Fig. 10, the basins of attraction of Newton's method for
Therefore, \-x^-y^ 1 - 2x + x^ +
J /
and hence x = \. Thus, all the roots of Eq. (10) occur on Re z = 1. This implies that the roots of Eq. (10) li e in the half plane Re z < 1 for c < ^ and in Re z > 1 for c > e. That is, if c < e, then the flowers lie in the deformed disc. They li e outside this disc when c> e. For general a in MxJ,z) = c,a similar argument gives that the conversion occurs at c = e". 4. CONCLUDING REMARKS
Equation ( 2 ), which is M^^„{z) — 1 = 0 for |f| = 1 and a > 0, has infinitely many roots on the unit circle. The Julia set of Newton's method for Eq. (2) is bounded since the point at infinit y is an attractor. The dynamics of Newton's method for Eq. (2) result in a number of interesting fractal images with infinite-corner-points. Their deformations are observed by varying f and a. As an analogue of Eq. (2), the dynamics of Newton's method for M^^J^z) — z" = 0 also give equally remarkable fractal images. For A2 = 1, they show the chaotic behavior of Newton's method for finding a fixed point ofMf,«(z) [ 4 ] . REFERENCES
(10)
M.A^)-
By varying c, an interesting phenomeno n can be observed. Suppose that c moves along the real axis. As observed in Fig. 3, the flowers lie in the deformed disc when c = 1. Notice that they now are outside this disc for c = 5 as shown in Fig. 10. In fact, this conversion occurs when c = e. For c = ^, we show that Eq. (10) has solutions only on the vertical line Re z = 1: If z = X + iy satisfies Eq. (10) with c = e, comparing moduli of both sides of Eq. ( 1 0 ), we see
exp - Re
(-
1 + (jc + iy) 1 - (x + iy)
I
\-x'-y'\
1. H.-O. Peitgen and D. Saupe (Eds.), The Science ofFractal Images, Springer Verlag, New York/Berlin (1988). 2. H.-O. Peitgen and P. H. Richter, The Beauty of Fractals, Springer Verlag, New York/Berlin (1986). 3. E. R. Vrscay, Julia set and Mandelbrot-like sets associate d with higher order Schroder rational iteration functions. Math. Comp. 46, 151-169 (1986). 4. H. S. Kim, Dynamical Behaviors of Point-mass Singular Inner Functions. Doctoral Thesis, KAIST, South Korea (August 1992). 5. M. A. Motyka and C. A. Reiter, Chaos and Newton's method on systems . Comp. & Graph. 14, 131-134 (1990). 6. R. L. Duren, Theory ofH^ Spaces, Academic Press,New York/London(l970J. 7. H. O. Kim and H. S. Kim, Iterations, Denjoy-Wolff points and ergodic properties of point-mass singular inner functions. J. of Math. Anal. Appl. 175, 105-117 (1993). 8. M. Barnsley, Fractals Everywhere, Academic Press,New York (1988). 9. R. L. Devaney, An Introduction to Chaotic Dynamical Systems, Addison-Wesley , Reading, MA (1989). 10. B. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman , New York (1982).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
321
Chaos and Graphics
CHAOS AND ELLIPTIC CURVES SANDY D . BALKIN,^ ELIZABETH L. GOLEBIEWSKI,* and CLIFFORD A. REITER^
^ 10 Dorothy Avenue, Livingston, NJ 07039 *335 Wastena Terrace, Ridgewood, NJ 07450 ^Department of Mathematics, Lafayette College, Easton, PA 18042 Abstract—The .escape time behavior of a function associated with elliptic curves is studied via Julia sets and composite Mandelbrot sets. The Mandelbrot sets are composite in the sense that two critical points are followed. 1. INTRODUCTION
After an appropriate affine transformation, elliptic curves can be thought of as solutions to the equation: y^ = x^ -^ a2X^ + aix + «o. We can solve this for y, choosing the positive branch of the square root and viewing the result as a function of a complex variable. Thus, we will consider the escape time behavior of the iterated function:/(z) = Vz^ + a2Z^ + aiz + UQ. Notice that this function is derived from the positive branch of elliptic curves but it is not the "addition" defined on rational points of elliptic curves that plays an important role in number theory [9]. Escape time for iterating the quadratic function z^ + c has been extensively studied. Introductions include [ 1,2, 5,6, 7 ]. The generalization to z" + c where a need not be integer is considered in [3, 8] and is available in the most recent version of Fractint[10]. The function considered here includes several terms, including a third power term, and a fractional power on the outside. Computing Julia sets from the elliptic curve function/(z) is straight forward although surprises do occur. Computing the Mandelbrot set is challenging since we follow two critical points.
2. COMPOSITE MANDELBROT SETS
In order to compute a composite Mandelbrot set, we let one of the constants in our function/(z) correspond to screen position while the others are fixed. For example,/(z) = Vz^ + cz^ + 1, where c is a complex number corresponding to screen position, generates the image shown in Fig. 1. This is a "composite" Mandelbrot set in the sense that it follows two critical points z = 0 and z = - 2 c / 3 . For these images the maximum iteration was taken to be 1005 and points were considered "escaped to infinity" if the square of their magnitude exceeded 1000 before maximum iteration was reached. Notice this lacks the point toward the left found in the usual Mandelbrot set. Indeed, the tips of the side bulbs look more like the classical Mandelbrot set than the entire composite Mandelbrot set itself. In order to track the behavior of the two critical points an appropriate coloring scheme is used. Let ki be the iteration count of thefirstcritical point and let k2 be the iteration count of the second critical point. When ki and k2 are both less than the maximum iteration, then ki modulo 15 determines the amount of
Fig. 1. Composite Mandelbrot set with -3 < Re(c) < 1, -1.5 < Im(c) < 1.5. Reprintedfrom Comput, & Graphics Vol. 18, No. 1, pag. 113-117, 1994
322
S. D. BALKIN , E. L. GOLEBIEWSKI and C. A. REITER
Fig. 2. Composite Mandelbrot set with -1.867 < Re(c) < -1.155, -0.267 < Im(c) < 0.267.
blue while k2 modulo 15 determines the amount of goes to infinity but the other critical point stays finite. d green. For example, if /ci = 0 and /c2 = 0 then black is Figure 2 shows the composite Mandelbrot set generate used, if/ci = 14 and k2 = 0 then blue is used, if/ci = by/(z) = Vz^ + cz^ + 0.001. This has notable yellow 0 and /:2 = 14 then green is used, and if /ci = 14 and and magenta regions where each one, but not both /c2 = 14 then cyan is used. Shades of magenta are used critical points stay finite. Notice the turbulence along when kx is the maximum iteration but ki is not; the the right edge persisting into the magenta region and shade is determined by ki modulo 15. Shades of yellow the green-blue swirls preceding the other magenta edge. Figure 3 shows the composite Mandelbrot set genare used when k2 is the maximum iteration but kx is not; the shade is determined by kx modulo 15. When erated by/(z) = Vz^ + iz^ + c. This looks considerboth critical points reach the maximum iteration, white ably different than the classical Mandelbrot set. Notice the rough teeth on the upper right and the smooth is displayed. In Fig. 1, notice the green shadows of some of the boundaries on the left. The smooth boundaries are y an artifact of the branch cut of the square blue features. Also notice the yellow towers where 0 presumabl
Fig. 3. Composite Mandelbrot set with -2 < Re(c) < 2, -1.5 < Im(c) < 1.5.
323
Chaos and elliptic curves
Fig. 4. Julia set with a^ = 0.008 - 0.186z, a^ = 0, «2 = /, for -2 < Re(z) < 2, -1.65 < Im(z) < 1.35.
root used. However, if one tries to highlight the pixels that have orbits that come close to the branch cut {Re(z) < 0, Im{z) < tolerance), no pels are highlighted; the branch cut lies in a repelling region. If one rotates the branch cut clockwise, the image deforms. However, the smooth boundaries rotate with the branch cut. Even though the features of this composite Mandelbrot set are much different than the classical one, the teeth seem to be associate d with attractive cycles. The large tooth below the largest external white spot is associate d with 4-cycles. Our experiments show both the critical point 0 and - 2 / /3 converging to the same 4-cycle except in the yellow part of the region
where 0 diverges to infinity. The next major tooth (clockwise) is associate d with 5-cycles, the next with 6-cycles and the next with 7-cycles. Our first Julia set picture. Fig. 4, is taken from the region with one critical point attracted to a 7-cycle and the other goes to infinity. 3. JULIA SETS
For these Julia sets, the iteration count modulo 240 determines the hue displayed. Thus, low iteration counts are shown in red, and as the iteration count increases , the colors run through yellow, green, cyan, blue, magenta and then recycling beginning with red
Fig. 5. Julia set with ao = 0, a, = 0.4 + 0.1/, ^2 = 0, for -2 < Re(z) < 2, -1.5 < Im(z) < 1.5.
324
S. D. BALKIN, E. L. GOLEBIEWSKI and C. A. REITER
Fig. 6. Julia set with OQ = 0.5 + 0.5/, A, = 0, AJ = -1.644 - 0.833/, for -1 ^ Re(z) ^ 3, -1.5 ^ lm(z)^ 1.5.
again. Figure 4 shows a Julia set with fern-like tips and spirals with seven arms. The seven arms correspond to the fact that the critical point - 2 i / 3 approaches the seven cycle: 0.14766583 - 0.66348345i, 0.4290094 0.41460049i, 0.55683479 - 0.29766265i, 0.6273122 - 0.17140472i, 0.6440807 - 0.014887148i, 0.57238196 + 0.18352628i, 0.33081357 + 0.42643194i. The critical point 0 goes to infinity. The threefold outer symmetry arises from the third power inside the square root. Notice the fine detail as well as the smooth boundaries similar to the images in [4].
Lastly, we consider three pictures that give a glimpse at the great diversity found in these Julia sets. Figure 5 gives another Julia set where self-similar bubbles appear suddenly. Notice the fact that there are two distinct components, but again a sort of three-fold symmetry of spiralling tips. In Fig. 6 we have an escape time picture. Here there are sequences of spirals descending out toward three tips. Figure 7 gives a Julia set that appears to have infinitely many components. Unlike quadratic Julia sets, the components have regions appearing to contain fractal dust.
Fig. 7. Julia set with OQ = 0.001/, a^ = 0, «2 = -1.376 - 0.07/, for -1 < Re(z) < 3, -1.5 < Im(z) < 1.5.
Chaos and elliptic curves Acknowledgments—This work was supported in part by the National Science Foundation REU grant DMS-9200329 and by Lafayette College.
5. 6.
REFERENCES 1. M. Barnsley, Fractals everywhere, Academic Press, San Diego (1988). 2. R. Devaney, Chaos, fractals, and dynamics: Computer experiments in mathematics. Addison-Wesley, Menlo Park, CA( 1990). 3. U. Gujar and V. Bhavsar, Fractals from z <- z" + c in the complex c-plane. Comp. & Graph. 15, 441-449 (1991). 4. A. Lakhtakia and R. Messier, Self-similar sequences and
7. 8. 9. 10.
325
chaos from Gauss Sums. Comp. & Graph. 13, 59-62 (1989). B. Mandelbrot, The fractal geometry of nature, W. H. Freeman and Company, New York (1983). H.-O. Peitgen and P. H. Richter, The beauty of fractals, images of complex dynamical systems. Springer-Verlag, New York (1986). C. Pickover, Computers, pattern, chaos and beauty, St. Martin's Press, New York (1990). C. Pickover and E. Khorasani, Computer graphics generated from the iteration of algebraic transformations in the complex plane. Comp. & Graph. 9, 147-151 (1985). J. Silverman, The arithmetic of elliptic curves, SpringerVerlag, New York (1986). T. Wegner and M. Peterson, Fractal creations, Waite Group Press, Mill Valley, CA (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
327
Chaos and Graphics
NEWTON'S METHOD FOR MULTIPLE ROOTS WILLIA M J. GILBERT
University of Waterloo, Waterloo, Ontario N2L 3G1, Canada Abstract—We investigate the basins of attraction in the complex plane of Newton's method for finding multiple roots and illustrate what happen s as two simple roots coalesc e to form a double root. 1. INTRODUCTION
Newton's method for finding a real or complex root of a function is very efficient near a simple root becaus e the algorithm converges quadratically in the neighborhood of such a root. However, at a multiple root, that is, a root of order greater than one, Newton's method only converges linearly. Various modifications of Newton's method have been proposed that converge quadratically at multiple roots. One standard method that we discuss here will find the roots of the function g{z) by applying Newton's method to the function S(z)/g'(z)' Newton's method applied to this quotient will always converge quadratically near all the roots of g{z). This method introduces extraneou s fixed points into Newton's method, but they are always repelling. We plot the basins of attraction for the roots in the complex plane and illustrate what happens to these basins as two simple roots coalesce to form a multiple root. We then compare this method with other Newton methods.
a repelling fixed point with multiplier d/(d— 1), where d is the degree of the polynomial g{z). This means that large values of z„ will tend to be pushed away from infinity. If ^(z) has a root of order k at the point w, then g(z)/g'{z) has a simple root at w. If we apply the standard Newton's method to ^(z)/^'(z) we obtain
M(z)
g{z)g'iz) lg'{z)V - g(z)g''(z)
This is called Newton's method for multiple roots [4, Eqs. 8.6-24]. It is quadratically convergen t at every root of ^(z), but could be more complicated to compute than the standard Newton's method becaus e it involves second derivatives. Furthermore , there may be fixed points of M(z) that are not roots of ^(z). The critical points of ^(z), that are not also roots of ^(z), are extraneou s fixed points for this Newton's method s for multiple roots. However, if w is such an extraneou 2. NEWTON'S METHOD FOR MULTIPL E ROOTS fixed point then the multiplier is M'{w) = 2, which The standard Newton's Method for finding the real means that w is a repelling fixed point and so will not or complex roots of a function g{z) consists of iterating affect Newton's method. If ^(z) is a polynomial, then the function infinity is never a fixed point for M(z). Figure 1 shows the basins of attraction of the roots g(z) when this method is applied to the polynomial g(z) = N{z) = zg'{z) z^(z^ — 1), that has one double root and three simple roots. If the initial value ZQ lies in the white region then by starting with some initial approximation ZQ and de- Newton's method for multiple roots will converge to fining the (« + 1 )st approximation by z„+i = N(z„). within 0.001 of the origin in 10 iterations. Initial values See [ 11 and [ 2 ] for the connection between the global lying in the colored regions will converge to one of the study of Newton's method for finding complex roots cube roots of unity, while those lying in the black regions have not converged to within 0.001 of any root and dynamics in the complex plane. Any root of the function g{z) is a fixed point of in 10 iterations. N(z). If w is a root of a polynomial g{z) of order k, In practice, becaus e of experimenta l errors or trunthen the multiplier (or eigenvalue) of the fixed point cation of coefficients, the polynomial may not have a w is N'{w) = (k — l)/k; this multiplier gives infor- multiple root, but two or more roots that are very close mation about the behavior of the dynamics of the it- together. This causes no problem to this Newton's eration near the fixed point [ 3, §6.1 ]. At a simple root, method for multiple roots. For example, if the double k = 1 and the multiplier is zero, which means that w root in the polynomial of Fig. I was split into two close is a super-attractin g fixed point and Newton's method roots to obtain g(z) = z{z -\- 0.01 )(z^ — 1), then the e of Newton's method for multiple converges quadratically in some neighborhoo d of the rate of convergenc . Notice that the basins of attraction fixed point. At a multiple root, k > 1 and the multiplier roots is unchanged lies between 0 and 1, which means that the fixed point of the three cube roots in Figs. 1 and 2, which are the w is attracting, but that the convergenc e will only be red, blue, and green areas, are basically the same. The linear. Hence Newton's method will not be very sat- white region in Fig. 1, which is the basin of attraction isfactory near a multiple root. The point at infinity is of the double root at the origin, is the union of the
Reprintedfrom Comput. & Graphics Vol 18, No. 2, pag. 227-229, 1994
Fig. 1. Newton's Method for multiple roots applied to g{z) = z^{z^ - 1). After 10 iterations points in the white and colored regions come to within 0.001 of a root.
white and yellow regions of Fig. 2, which are the basins of attraction of the two close roots, 0 and —0.01. 3. OTHER METHODS FOR A MULTIPLE ROOT
Let us compare the above method with other Newton methods for multiple roots. It is possible to use the standard Newton's method. Figure 3 illustrates the basins of attraction of the roots of ^ ( z) = z^{z^ - 1) after 10 iterations. If this figure is compared to Fig. 1, we see that there is a large black area in the basin of attraction of the double root 0, where points have not come close to the root after 10 iterations, because the method only converges linearly at the double root. Even if we look at the standard Newton's method ap-
Fig. 3. The standard Newton's Method applied to^(z) = z^{z^ - 1). After 10 iterations points in the white and colored regions come to within 0,001 of a root while points in the black region have not come close to any root.
plied to the modified polynomial g(z) = z(z +0.01 )(z^ - 1), that has no double roots, we see in Fig. 4 that the two close roots cause problems with Newton's method. This is because the range in which quadratic convergenc e occurs is extremely small near these close roots. Another technique for dealing with multiple roots is the relaxed Newton's method. If w is a root of ^ ( z) of order k then
Ndz)-
kgjz) g'iz)
2\,
1
,#.
•.~
• ,
• • • - • . » •
-214
-2
.mi^tt----^' iii-
-1
i ' "
ii S ^
1
Fig. 2. Newton's Method for multiple roots applied to giz) = z(z + 0.01 )(z^ - 1). After 20 iterations points in the white and colored regions come to within 0.001 of a root.
Fig. 4. The standard Newton's Method applied to g{z) ^ z{z + 0.01 )(z^ - 1). After 10 iterations points in the white and colored regions come to within 0.001 of a root while points in the black region have not come close to any root.
329
Newton's method for multiple roots wil l converge quadratically at the root w [4, Eqs. 8.613]. However, this method is hopeless if the root is not of order exactly k. The white region in Fig. 5 is the basin of attraction of the double root at the origin, under the relaxed Newton's method with k = 2. The cube roots of unity are fixed points under this method but Njfw) = - 1 , for any cube root w. Since this multiplier has modulus 1, a simple root o f ^ ( z) is a neutral (or indifferent) fixed point for the method N2(z). Newton's method will behave very badly near these roots. Any neighborhood of such a neutral fixed point contains some points that are in the basin of attraction of the neutral point and some points that are not. The black regions in Fig. 5 are the basins of attraction of the cube roots, but it would require thousands of iterations for points in these regions to come close to the roots [ 5 ] . If some roots of ^ ( z) are only approximately multiple, then the convergenc e of the relaxed Newton's method at these roots changes drastically. Figure 6 il lustrates the relaxed Newton's method N2(z) applied to g{z) = z(z + 0.01 )(z^ - 1) after 3000 iterations. Compare Fig. 5 and Fig. 6. The large white area in Fig. 5, which is the basin of attraction of the double root, now contains large areas of black in Fig. 6 that have not converged to a root after 3000 iterations! However this is not a good representatio n of the actual basins of attractions of the two close roots. This diagram is very sensitive to how close we require the method to come to a root; changing the tolerance 0.004 to another value would substantially alter the diagram. In contrast, Newton's method for a multiple root is insensitive to the tolerance parameter ; changing the tolerance from
Fig. 6. The relaxed Newton's Method for a double root applied to ^(z) = z(z + 0.01 )(z^ - 1). After 3000 iterations points in the white and colored regions come to within 0.004 of a root. 0.001 in Figs. 1 or 2 would not change the figures significantly. Notice also that the values in the black regions of Fig. 5 are now colored in Fig. 6, indicating that they have converged to the cube roots of unity. This would have also occurred in Fig. 5, if we had iterated the method 3000 times. Figures 1, 3, and 5 show three different Newton methods applied to the same polynomial with a double root. All the roots in the three figures are the same, but the basins of attractions are quite different, and the rate of convergenc e to the roots also varies tremendously. Likewise, Figs. 2, 4, and 6 show the three different Newton methods applied to another polynomial that has two almost equal roots. These figures show how sensitive the methods are to a double root dividing into two simple roots. These last two figures show that the relaxed Newton's method is very sensitive to the two roots being exactly equal, and so it will never be a good method in practice, even if the initial approximation is quite close to the (nearly) equal roots. Newton's method for a multiple root is much safer. REFERENCES
Fig. 5. The relaxed Newton's Method for a double root applied to ^(z) = z^(z^ - 1). After 100 iterations points in the white region come to within 0.001 of the double root at the origin while points in the black regions have not come close to any root.
1. F. V. Haesele r and H.-O. Peitgen, Newton's method and complex dynamical systems . Acta Appl Math. 13, 3-58 (1988); also in Newton's Method and Dynamical Systems, H.-O. Peitgen (Ed.), Kluwer, Dordrecht (1989). 2. H.-O. Peitgen, D. Saupe, and F. v. Haeseler , Cayley's Problem and Julia Sets. Math. Intell. 6, 11-20 (1984). 3. A. F. Beardon, Iterations of Rational Functions, SpringerVerlag, New York (1991). 4. A. Ralston and P. Rabinowitz, A First Course in Numerical Analysis, McGraw-Hill, New York (1978). 5. W. J. Gilbert, The complex dynamics of Newton's method for a double root. Comp. Math. Appl. 22, 115-119 (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
331
Chaos and Graphics
WARPED MIDGETS IN THE MANDELBROT SET A. G. D A V I S P H I L I P
Union College and Van Vleck Observatory , 1125 Oxford Place, Schenectady , NY 12308, USA and M I C H A E L F R A ME and A D A M R O B U C CI
Union College, Schenectady , NY 12308, USA Abstract—Warpe d midgets in the Mandelbrot set have been measured , using an algorithm that allows the positions of the head, and cardioid atoms (north and south) of any midget to be found, once one has placed the cursor on the computer terminal somewher e inside any midget. We describe two distortions of midgets: linear distortions and angular distortions. When the north and south angles are plotted in the north/south angle plane, families of points are formed. The angle and distance measure s of warped midgets from the Sea Horse Valley of the Mandelbrot set and from other sea horse valleys of midgets, whether on the Spike or on tendrils above atoms, all fall closely together in one part of the north/south plane. Measures of warped midgets from tendrils above the major atoms on the surface of the Cardioid fall closely together in another part of the north/south plane. This different way of looking at the Mandelbrot set offers an interesting way of studying the distortions of midgets.
1. INTRODUCTION
The Mandelbrot set (M-set) is a fascinating mathematical construction discovered by Benoit Mandelbrot in the early 1980's. The set represent s the intricate behavior of the mapping z ^- z^ + c for complex values of z and c. A picture of the M-set is shown in Fig. 1 with various parts named. The structural features have been given many fanciful names, such as "midget," "spike," "atom," "radical," and "Sea Horse Valley," in both the popular and mathematica l literature. We are following the nomenclatur e proposed by Mandelbrot in naming the round appendage s attached to the set as "atoms" and the whole structure of the appendages, "radicals." Some investigators name these two parts of a radical a "bud" plus "tendrils." The name "midget" refers to the infinite number of close (but not exact) copies of the M-set that occur on the Spike and along tendrils of the M-set. Tendrils can be seen in Figs. 1 and 2. When we are discussing the major parts of the M-set we capitalize the name (Spike, Head, Cardioid, Atom, etc.) but when we discuss the parts of a midget then the name is in lower case (spike, head, cardioid, atom, etc.). This convention will help the reader in understandin g which parts of the M-set are being described in any section of this paper. In [ 1, pp. 24-25 ], dealing with midgets on the Spike of the M-set, twofigureswere presente d that described the geometrica l distortions exhibited by midgets. On casual inspection the midgets seem to be exact copies of the M-set, but if one studies them carefully, distortions in angles and in distances can be discerned . Figure 2c of [ 2 ] is perhaps the first image of a warped midget. The figures on page 24-25 of [1] describe these distortions (linear distortions for midgets on the Spike and angular and linear distortions for midgets off the Spike). If the numbers are calculated to sufficient precision, we speculate that no midget will have the same
distortion measure s as found in the M-set itself, thus we conjecture all midgets are distorted relative to the M-set, and further, no two midgets have the same distortion measures . First we must define the angles and distances that we use in our measure s of the distortions. Here we use a naming scheme for the atoms on the boundary of the cardioid and heads of the M-set, presente d in [3] . The basic idea of this scheme is that we name the atom according to its cycle number, the number of elements in the cycle to which the orbit of Z = 0 converges under iteration of Z ^ -^ Z ^ + C for C taken in the atom. (We show the M-set with the main features named in Fig. 1.) The number of spiral arms in the radical is a visible manifestation of the cycle number. In addition the iteration track (the orbit of Z = 0) displays n similar patterns for C in an «-cycle atom. These features were identified using a program[4] to calculate the position of the center of the cardioid, center of the head and centers of the north and south atoms of a given midget. We number the tendrils by calling the connection from the atom head to the center of the radical structure, tendril 0. Then (for atoms on the north side of the M-set) we number them 1, 2, 3, etc. in a clockwise direction. For the major atoms attached to the Cardioid, (Atom 3, 4, 5 etc.) the largest warped midget is always found in tendril 1, to the magnifications that we have investigated . The "deepest " midget measure d in this study is the Cycle 1149 midget at a magnification of 2.5 X 10^. The midget in tendril 1 is always the most warped midget to be found in the tendrils associated with that atom. To illustrate this naming convention. Fig. 2 shows Atom 7 with the tendrils numbered 0-6. The major warped midget can be seen in tendril 1. There is a similar warped midget in each tendril, but its size rapidly decrease s with higher tendril
Reprinted from Comput. & Graphics Vol. 18, No. 2, pag. 239-248, 1994
332
A. G. D. PHILIP, M. FRAME and A. ROBUCCI Atom 3
Spike
East Valley
Fig. 1. The Mandelbrot set with features labeled. Three of the major atoms are marked on the Cardioid. SHV indicates Sea Horse Valley, C3 the Cycle 3 midget on the Spike. numbers. In each tendril there are many other series of midgets, but again their sizes are much smaller than the major warped midget in tendril 1. The Cycle 57 warped midget is shown in the color picture. Fig. 3. Referring back to Fig. 2, the largest warped midget for Atom 7 can be seen in tendril 1. In Fig. 3 tendril 1 of Atom 57 is shown with its warped midget pointing to the right. Its north atom (on the bottom in this figure) is much smaller than the south atom. The head of the warped midget is not opposite the east valley but is well to the right of a position opposite it. The spike of the warped midget is not straight but bent to the left. On the top of Fig. 3 one can see the series of "elephant trunks" against the rear of the "elephant" in front. An uncountable number of these patterns exist in Fig. 3; a pattern that is common for all the major atoms that lie on the surface of the Cardioid, leading into East (or Elephant) Valley. The position-finding program has been utilized to locate the center of the cardioid, head, north, and south atoms of warped midgets. The distances head-to-center , north-to-cente r and south-to-center , and the angles H-C-N (north angle) and H-C-S (south angle) are calculated. On the left side of Fig. 4a there is a picture of the Mandelbrot set, with members of the set shown in white instead of the usual black so that the lines and angles can be seen. On the right side of Fig. 4a the lines shown inside the figure on the left are reproduce d and labeled. The lower case letters " «" and "5" indicate the north and south angles, respectively. In Fig. 4b the
Atom 7
Fig. 3. A color picture of the Cycle 57 warped midget.
same diagrams are shown for the major warped midget in tendril 1 of Atom 72. This midget is facing east, looking out of East Valley. The north atom (on the bottom in this picture) is much smaller than the south atom and the north angle is smaller than the south angle. Note that in both Fig. 4a and 4b the main body appears to have the shape of a cardioid. What is different in Fig. 4b is that the atoms on the surface of the cardioid have been shifted in position and are different sizes, compared to the atoms in Fig. 4a. The measure s for this midget are presente d in Table 1. As a result of the position and size shifts of the atoms in Fig. 4b note that the N-t-C and S-t-C distances are different and the north and south angles are different from those measure d in Fig. 4a. The measure s obtained for the distances and angles in the M-set are shown in Table 2. For measure s of midgets made off the Spike, there is no longer symmetry across the real axis. The figure on page 25 of [1] compares the large warped midget in the first tendril off Atom 3 (the North Atom) with a similar midget off Atom 18. We can also see the distortions in warped midgets in Fig. 4b. In Section 2 we give some background material on the set. Then in Section 3 we describe a numerical method for locating the centers of the cardioids, head, north, and south atoms of midgets. An illustrative example is given in Section 4. In Section 5 we describe the results of applying these techniques to the measurement to warped midgets in several regions of the M-set and some interesting relations that have been found. We also show plots of the distortion measure s and describe their behavior in different places in the M-set. 2. BACKGROUND ON THE MANDELBROT SET
The M-set consists of all complex numbers c for which the sequenc e 0, FAO), F,(F,(0)) = Ff(0),
Fig. 2. The seven tendrils surrounding the head of Atom 7.
Ff(0),
(1)
does not diverge to infinity, where Fdz) = z^ -\- c. This sequenc e is called the orbit of 0. One way (though not
333
Warped midgets in the Mandelbrot set N
H
Fig. 4. The definition of the north and south angles.The north angle is the angle formed between the headcenter line and the north-cente r line.
the only way) a sequenc e can fail to diverge is by converging to some cycle. We say the complex numbers Zi, Z2, Z 3 , . . ., z„ form an /i-cycle (or a cycle of order /i)ifFe(zi) = Z2,Fc{z2) = Z 3 , . .. ,F^(z„_i) = z„,and Fc{Zn) = Zi. Equivalently, each of Zi, Z2, . . ., z„ is a solution of Fc"(z) = z. Since this is a polynomial equation, for each c there are «-cycles for all «, but most of these are numerically invisible. That is, most are unstable—unde r repeate d application of F^ nearby points wander away, hence the slightest error is magnified. By a theorem of Fatou, if an «-cycle is stable the sequenc e (1) will converge to it. More precisely, Fatou's theorem [5, p. 79] states that every stable cycle
must attract the orbit of a critical point, and we note for Fc(z) = z^ + c the only critical point is z = 0. The disk and cardioid features of the M-set are sets of c-values for which Eq. (1) converges to cycles of particular orders. For example, for c in the main cardioid, Eq. (1) converges to a 1-cycle (= fixed point); for c in the head Eq. (1) converges to a 2-cycle; for c in the north and south radicals, and for c in the cardioid of the largest midget along the spike of M, Eq. (1) converges to a 3-cycle. Call these features 1-cycle, 2cycle and 3-cycle components. To calculate the extent of an «-cycle componen t W, in principle we simply find all the «-cycles (as functions of c) and determine
Table 1. Distortion measure s for warped midget off atom 72.
Table 2. Distortion measure s for the mandelbro t set.
Place
Cycle #
Position
Place
Cycle #
Position
Center Head North Atom South Atom Head-to-Cente r Distance North-to-Center Distance South-to-Cente r Distance North Angle South Angle NC/HC SC/HC NC/SC n/s
73 146 219 219
0.251909027 + 0.000131946 i 0.25191067 5 + 0.000132214 i 0.25190948 2 + 0.000130965 i 0.25190882 6 + 0.000133436 i 1.66920968 1
Center Head North Atom South Atom Head-to-Cente r Distance North-to-Center Distance South-to-Cente r Distance North Angle South Angle NC/HC SC/HC NC/SC n/s
1 2 3 3
0.000000 + O.OOOOOO i -1.000000+ 0.000000i -0.122561 H-0.744862i -0.122561 -0.744862i 1.000000
1.08136480 9 1.50356399 3 74.356761 deg. 88.465358 deg. 0.647830420 2 0.990076400 2 0.719201054 6 0.8405184
0.754878 0.754878 80.656154 deg. 80.656154 deg. 1.342531 1.342531 1.000000 1.000000
334
A. G. D. PHILIP, M. FRAME and A. ROBUCCI
^, §, f, and f, 6-cycle component s at g and |, and so on. In general, for a fraction p/q in lowest terms (and 0 < P/Q < 1)» a ^-cycle componen t is attached to the cardioid at internal angle p/q. p(c) = 2"z,(c)z2{c) . - . z„(c) (2) Part of the fractal nature of the M-set lies in how s in a repeating is less than 1 in modulus [ 5, p. 79 ]. Most importantly, components are attached to component , attached to the multiplier provides a 1 to 1 function from the n- pattern. So if J^is an «-cycle component . In W diX internal angle p/q is a qn-cycle component cycle componen t W onto the unit disk D in the comparticular, at 5, 5, and § are attached a 2«-cycle and plex plane: two 3/7-cycle components . For our measure of deviation, we need to find the centers of these three comc^ p(c), ponents.
if one of them is stable. An «-cycle Zi(c), Z2(c), z„(c) is stable if its multiplier
and by a theorem of Douady and Hubbard [ 5, p. 83 ], [6] , this function preserve s angles locally. Note that for each componen t W there is a unique c for which p(c) = 0. This c is called the center of W. The centers are just the roots of certain polynomials:
3. DESCRIPTION OF A METHOD FOR LOCATING CENTERS
Let Wbe an «-cycle componen t with center c^. For each c in W, there is a stable cycle-« zi, Z2, . . ., z„ and the multiplier is 2zi2z2 * • • 2z„ = p(c). That this «-cycle is stable is just the condition that \p{c)\ < 1. Now initially, we don't necessaril y know anything , about the orientation of H^ (except in special cases flic) = (fdc))'+ c like component s along the spike), so we take another point C| in W, The idea is to use the vector Ci ~ Co and Mc) = (flic))' + c a perpendicula r vector to navigate toward the desired point s (with internal angle p/q) on the boundary of W. To do this, we translate the problem to the unit MC) = (fn-dc))' ^ C. disk, use the familiar geometry there to find a point From the form of p{c) given in Eq. (2), it follows closer to the point of angle lirp/q on the circle, and that if c is the center of W, then one of the Zi(c) must translate the correction back to W. Let do denote the center of the unit disk, and dx = be 0. That is, F^CO) = 0, or since F^(0) = c, the centers of the «-cycle component s are the solutions of p{c\). The vector from do to d\ makes an angle d with , the real axis: 0 = FT~\c) = fnic). With suitable initial guesses Newton's method can be used to locate the centers of 19 = Arctan(Im(^,))/Re(t/,)) if Re(fl^)>=0, and the «-cycle components . The center of the 1-cycle componen t is the solution 6* = Arctan(Im(fif,))/Re(^,)) + 7r if Re(^,)<0. of/i (c) = 0, the centers of the 2-cycle component s are (3) the solutions ofy^(c) = 0, and so on. The only point Denot e by f the differenc e lirp/q 6, the differenc e about which we must be careful is to note that if m betwee n the angl e we wan t and the one we hav e so far. divides n, then an m-cycle is also a cycle-« and so the If r is the ''goal" point on the unit circle—the point roots offmic) are also roots off„(c). To find the biwith angle l-Kp/q—then the segmen t from d\ to r has cycle centers that are not also «-cycle centers, find the length roots of the quotient/,(c)/yw(c). For example, y^(c) = c^ + c and/i(c) = c, so the 2-cycle center that is (4) L = (l + \dx-do\'-2\dx-do\cos(^)y not also a 1-cycle center is the root of {c^ + c)/c = c + 1, that is, c= - 1 . and the angle (/> from the ray dx - do to r is given by The theorem of Douady and Hubbard guarantee s the multiplier extends to take the boundary of W to ) = Arctan((sin(f))/^) if A > 0, and the boundary of D, thus allowing the assignmen t of "internal angles" to the boundary of W. If c is on the 0 = Arctan((sin(f))/^) +TT if ^ < 0, (5) boundary of W, p{c) is on the boundary of D—the unit circle—and so its position on the circle determines where A = cos(f) - \dx — do\. In IV v/e mimic the an angle. This same angle is the internal angle asso- process of moving halfway between di and r, using 0 ciated with c, though typically in W'\X is measure d in and L, with L suitably scaled for comparing the size fractions of turns. That is, 180° on the unit circle cor- of W to the size of Z). As a scaling factor we use | Cx responds to an internal angle of { on the boundary of - Co\/\dx- do\. In W, the next point C2 in our sequenc e W, 120° and 240° correspon d to \ and f, and so on. approaching internal angle p/q is For the main cardioid (the 1-cycle component), a 2-cycle componen t (the head) is attached at internal C2 = Cx-\- {M/2){{(cx - Co)/\cx - cj)cos(0) angle 5, 3-cycle component s (the north and south at+ ((-Im(cj - Co) + Re(c, - 0 / ) / | c, - c j )) oms) at 5 and §, 4-cycle component s at \ and | (note \ = 2 has already been used), 5-cycle component s at sin(0)) (6)
Warped midgets in the Mandelbrot set
335
C2 = c, + (0.5)(0.008675 ) where M = L\ci — Co\l\di - do\. Now find the ncycle for C2, compute the multiplier J2 = p(c2), and X ((c, - Co/0.0010002)cos(0.5039 ) repeat the previous steps. After this method converges to a point near the + ((-Im(c, -Co) boundary of W and near the internal angle piq, we + Re(c, - cj)/0.0010002)sin(0.5039)*/ ) use the vector c„+i — c^ to cross over the boundary into the 2«-cycle or 3«-cycle cycle component . Taking = -1.7571 +0.004756/ this point as initial guess,Newton's method applied to f2r,{c) = 0 or fi„(c) = 0 converges to the center of the Now repeat this process with C2 taking the place of cycle componen t (the head or the north or south atom) Ci. That is, begin by iterating Fd starting from z = 0. off W. Knowing the center of W, the center of Ws head, and the center of Ws north and south atoms, This gives the 3-cycle we compute the deviation by taking the ratio (northto-center / head-to-center , south-to-cente r / head-to- 1.3311 - 0.009783/, 0.01455 - 0.02129/, center and the angle ratio north angle/sout h angle. -1.7573 + 0.004137/. 4. AN EXAMPLE CALCULATION
To illustrate this procedure , we locate the center of the main midget and the centers of its north atom, south atom, and head. The cardioid of the main midget is a 3-cycle component , so its center is a solution of 0 = /3(c) = c"" -^ 2c^ -\- c^ + c = c(c^ -\- 2c^ -^ c + The point c = 0 is the center of the main cardioid, a 1-cycle component , and we have seen it is no surprise that the 3-cycle center equation would detect this. Although the equation c^ + 2c^ + c + 1 can be solved exactly, to provide a model for the general case we use Newton's method with initial guess c = — 1.75, obtained visually. Newton's method converges to the solution Co = —1.75488,the center of the main midget cardioid. The north radical of the main midget is a 9-cycle component, but unhappily if we use Newton's method to so\wQfg{c) = 0 with initial guess c = c^, we obtain Co again. A moment's reflection shows there is no surprise here: a 3-cycle is also a 9-cycle. As described in the previous section our method is to produce a sequenc e of points approximating the point of internal angle 5 on the cardioid boundary. This is the point of tangency of the north atom, so from the last point of this sequenc e we hop into that atom, take an initial guess there, and then use Newton's method to solve /9(c) = 0. Here are the steps to approximate the point of internal angle 5. We have Co = -1.75488. Take Ci = -1.7549 + 0.001/, another point of the cardioid. Iterating Fci starting from z = 0, we converge to the 3cycle 1.3249 - 0.00249/, 0.0004083 - 0.005608/, -1.7549 +0.009954/. The multiplier is di = -0.007338 + 0.1043/, with magnitude 0.1046 and angle 0.2612. The angle between di and the point 5 around the unit circle is 0.5039 (radians), the distance between di and this point is 0.9071. Scaling this distance back to the midget's cardioid, we obtain a distance 0.008675. The next point in the sequence is
/ and disCompute the multiplier, find the new angle <> tance, . .. , eventually obtaining C3 = -1.7579 + 0.007446/. After only eight iterations we obtain Cg = -1.7579 + 0.01185/ correspondin g to internal angle 0.3359 and magnitude 0.9790. Extrapolating the A^^rule 1). (the radius of an «-cycle atom is approximately 1/A^^[7] to the case of disks attached to the midget cardioid, we "hop" into the north atom by Co + (1 + (1 /81 ))(C9 - Co). From this guess, Newton's method to solve/9(c) = 0 gives -1.7678 + 0.01380/, the center of the north atom. Starting from the same Co and seeking the boundary point with internal angle |, after eight iterations we obtain -1.7579 - 0.01380/ with correspondin g internal angle 0.6632 and magnitude 0.9976. Hopping into the south atom by the same process as before, Newton's method for/9(c) = 0 converges to -1.7578 - 0.01380/, the center of the south atom. To find the center of the head, we start from Co and after eight iterations obtain the point —1.7682 + 0.00002783 / with correspondin g internal angle 0.4996 and magnitude 0.9716. Hopping into the head and applying Newton's method for^(c) = 0, we obtain -1.7729, the center of the head. 5. THE DISTORTION MEASURES
Our first investigation was to compute and display the largest warped midget in tendril 1 for each atom from Atom 3 to Atom 100 on the Cardioid of the Mset and to measure the linear and angular distortions of these warped midgets. Some additional warped midgets were measure d between Atoms 100 and 1148. As the cycle number increase s the average dwell increase s and for cycles much larger than 1149 the dwell limi t of 32,000 in FRACTINT (see description in [ 8 ]) was exceeded . 5.1. Angle and distance measures In Figs. 5a-i we show plots that summarize the measures made in the M-set. Figure 5a shows the positions, in the complex plane, of the warped midgets in the first tendrils leading away from the head of the major atoms on the Cardioid of the M-set. In Figs. 5b and 5c the Cycle number of each warped midget is plotted
336
A. G. D. PHILIP, M. FRAME and A. ROBUCCI Position in Complex Plane
Cycle vs Real Position
WupedMidgeU
WupedMidtett
Cycle vs Imaginary Position
ixm
1""
» > «
1 0.400 0.200
aooo
^ _
.
_
I"
• ^ ' ' ' ' '
soao
Cycle vs North Angle
looao
1200.0
Cycle vs South Angle
Cycle vs South Angle
WupedMidieti
WirpcdKOdfMi
«
89X)
.x
tija
1 ^^^ SZ.0 81.0 800 T9ja 1200i>
1400X>
800.0
Cycle vs Ln(H to C) Wir|wdMid(M
-SJOOO
C
5
-10.000
-15.000
-20000
1000.0
1200.0
1400.0
Cycle vs Angle Ratio
Cycle vs Distance Ratio
WuiMdMil%M
WupadMld(eti
F
,
I \
i 1.2S0 f « liomt L '
"»•
I.IJO |>
"""
~2SJXXi 400.000 )
8000)0 1200.000 <0O000 lOOOOOO 1' Cydc Number
8
h
800000 I 600000 Cyck Number
i
Fig. 5. Plots of the parameters measured in this study. See text for explanation of each diagram.
versus its real and imaginary position. As the Cycle number increases, the real position approaches 0.25, the location of the end of East Valley. The imaginary position approaches 0 as the cycle number increases. Figure 5d plots the Cycle number v^. the north angle (as defined in Fig. 4). Starting at an angle of 76.8° the north angle rapidly decreases to a value near 74.3° and then decreases much more slowly. The south angle (Figs. 5e and 5f) rises to a maximum at Cycle number 57 (near 88.47°) and then falls. Figure 5f shows a magnified vertical scale near the maximum south angle value to show its non-monoicity. The north angle plot appears to be monotone. Figure 5g plots the log (headto-center distance) vs. Cycle number. The angle ratio is defined as (north angle/south angle) and is displayed in Fig. 5h. The distance ratio is defined as (north distance/south distance) and is shown in Fig. 51. Neither of these plots exhibit a turnover such as that shown in Fig. 5f. In Fig. 6 we plot the south angle vs. the north angle and the center-south distance v^. the center-north distance. Figures 6a and 6c plot the angles and distances for the whole data set. In Figs. 6b and 6d the scale is magnified to show the turnover in each function. The angle and the distance measures show approximately the same features in Figs. 5 and 6. We have chosen the angle ratio as the best feature to illustrate the be-
havior of midget distortion with higher cycle numbers. The separation of families of points seems to be clearer in the angle plots. We will use this ratio in Section 5.1.2 as the best descriptor of warped midgets. 5.1.1. Linear ratios. In Fig. 7 the CN ratio (ratio of the center distance to the north distance) is plotted vs. the CS ratio (ratio of the center distance to the south distance) for the series of warped midgets above the major atoms on the Cardioid, warped midgets in Sea Horse Valley and SHV of other midgets, warped midgets under atoms and warped midgets in tendrils. (In Figs. 6c, d only the points calculated from warped midgets above the major atoms on the Cardioid were shown). The points representing the measures in the sea horse valleys now are in the upper left of the diagram and the measures of the major atoms are on the lower right. In Fig. 8 the distance ratios are compared to the angle ratios. The distribution of the points is very tight, but not quite a linear relation, from the upper left of the diagram to the lower right so the angle ratios and the distance ratios are giving similar information about the M-set. For warped midgets in the first tendril of major atoms, the relation in Fig. 8 implies that as higher cycle numbers are obtained the N/S angle ratio reaches values smaller than 1 as the S/N distance ratio gets larger. Thus, more distorted midgets on tendrils have more
337
Warped midgets in the Mandelbrot set North/South Angle Ratio
North/South Angle Ratio
Warped Midgets
Warped Midgets
88.420 1 74.100
74.000 74.500 75.000 75.500 76.000 76.500 77.000 77.500 North Angle
1.240
74.200
74.300 74.400 North Angle
74.500
Distance Ratios
Distance Ratios
Warped Midgets
Warped Midgets
74.600
. X
1.220
1.140
-
X
1 1.200
S •^ 1.130
X
2 1.180
X
X X
X X
^ 1.160
X
1 1.120
1 1.140
8
1.120
\
1.100 1.080 1.250
1.300
1.350 1.400 1.450 1.500 Center-North Distance
1.110
1.550
1.600
1.100 1.530
> » 1.535
1.540 Center-North Distance
1.545
Fig. 6. The Angle and Distance Measures . Sections b and d are enlargement s of the regions of crowded points in sections a and c. extreme angle ratios and more extreme distance ratios. Remembe r that for cycle numbers greater than 57 the south angle turns over (reaching a maximum value of near 88.467) and starts decreasing , but, the N/S angle ratio continues to decrease . For warped midgets of atoms going into a sea horse valley, with higher cycle numbers the N/S angle ratio gets larger than 1 but the distance ratio approache s 1. s the re5.1.2. Angle measures. Figure 9 summarize gions of the M-set investigated and presents the locations of each region in the north/south angle plot. Figures 9a, b presents the major warped midgets on the
Cardioid of the M-set and on the Cycle 3, 4, 5 midgets on the Spike (See Fig. I) . In the north/south angle plot, all these positions fall very closely together and on the scale shown in Fig. 8b the individual positions cannot be separated . The north angle starts out at a value of 76.72°, decrease s fairly rapidly to 74.5° and then continues to decreas e but more slowly to a value near 74.3°. At a cycle number of 600 the north angle is slightly below 74.3°, by a cycle number of 1149 it is 74.29539°. The midgets were calculated with the program FRACTINT and when midgets deep in East Valley were attempted , with cycle numbers much
1.60KUit^^^
1.4-
^.* 1.2-
1.0
"•N.
1.2 1.4 Center Distance/North Distance
Fig. 7. The CN (center to north distance ) ratio vs. the CS (center to south distance ) ratio.
0.9
1.1 Angle Ratio
Fig. 8. The Distance Ratio (south-cente r distance/north-cente r distance ) vs. the angle ratio (south angle/north angle).
338
A. G. D. PHILIP, M. FRAME and A. ROBUCCI North Angle vs South Angle
Complex Plane Major Atoms,
Major Atoms,
Spike Midgets
*
Spike Midgets
^
h4
Complex Plane
North Angle vs South Angle
Sea Horse VaOeys
Sea Horse VoRcys
/
So.
I 0..
Complex Plane
North Angle vs South Angle
Atom 1 0 ond under Atom 3
Atom 1 0 and under Atom 3
1
^ .**
8 o.t |^-0.2j
10
I-
Complex Plane
North Angle vs South Angle
Atom 6 - Atom 1 1
A t o m 6 to A t o m 1 1
j
>^
^^r^""
-1.5
-0.9
0.3
0.9
North Angle vs South Angle
Complex Plane Details,
Details,
Atoms 4 and 5 90.0
8S.0
I ,0 0.1
Atoms 4 ond 5
^** J- * ***
% 80.0
*^
75.0
70.0-
Fig. 9. On the left the positions measured in the M-set are plotted. On the right the north and south angles produced from these positions are plotted. The warped midgets in Figs. 9h and 9j were measured by Joseph Marocco, a student at Union College.
higher than 1149, FRACTINT's dwell Hmit of 32 K was exceeded so we left cycle 1149 as the deepest one investigated at this time. In Fig. 10a (upper part) the positions of all the warped midgets measured are shown in the complex plane. In Fig. 10b (lower part) the distribution of the
north/south angles for these warped midgets is shown. A series of calculations was made for the warped midgets above the atoms on the cardioid of the Cycle 3, 4, and 5 midgets on the Spike. A midget between the Cycle 3 and Cycle 4 midgets was also calculated. These angles fell very close to those for the corresponding
339
Warped midgets in the Mandelbrot set
Complex Plane All Calculated Points 1.0 0.7 (U
I
0.4
i
o O.H b - 0 .2 H c
1-0.5 -0.8 -1.1 -2.1
—I—I—I
—I—I—r
0.3
-0.9 -0.3 Red Coordinate
-1.5
0.9
North Angle vs South Angle All Calculated Points 90.0
85.0
j
*
J
1?- * +++ Hit-
+^
80.0 H 1 J
^ + ^HHd^fn:!}?*^^ h
"^
"^
75.0 i
d
70.0 -T 70.0
1
1
1
\
1
75.0
1
1
1
1
1
1
1
1
1
80.0 North Angle
r-— 1
1
1
1
90.0
85.0
Fig. 10. On the top, all the positions in the M-set that were investigated in this study are plotted. On the bottom, all the north and south angles for the warped midgets measure d at those positions, are plotted. Interesting families of curves result. The various families can be identified by referencing the sections of Fig. 8.
sequenc e of warped midgets around the main Cardioid of the M-set (Fig. 4 a ). The points were not identical, differing in the third or fourth places. But, on the scale of this plot, they fell nearly on top of one another. The
angle ratios determined from the warped midget above Atom 3 all fell extremely close together, then there is a space in the graph and the points from the warped midgets above Atom 4 fell together and so on. For the
Table 3. N/S angle measure s for atom 3 warped midgets. ID
Feature
N Angle
S Angle
Real pos.
Imag. pos.
C3 C4 C5 C3b MS R3 RIO
Cycle 3 Midget Cycle 4 Midget Cycle 5 Midget A spike midget Atom 3 on MS Atom 3 WM R3 Atom 3 WM RIO
76.642 76.714 76.719 76.718 76.727 76.745 76.892
80.612 80.595 80.591 80.591 80.590 80.681 80.769
-1.754 -1.941 -1.985 -1.861 -1.565 -0.153 +0.340
0.019 0.010 0.000 0.008 1.032 1.040 0.050
340
A. G. D. PHILIP, M . FRAME and A. ROBUCCI
90
RIO
R3
c
< 80
C3
MsC3bC4«^
O CO
70 70
80
Fig. 11. An enlargemen t of a portion of Fig. 9b. On the left the family of points from Cycle 4 (bottom), Cycle 5, Cycle 6 warped midgets are shown. Dotted lines connect these three sets of points to enlarged representations . On the far right the points in the patterns are identified by the position in the M-set from which they come (for the middle group of points). C3 stands for warped midgets of the major radicals on the Cycle 3 midget on the spike, R3 represent s warped midgets above the radicals on radical 3, RIO is the similar case for radical 10, MS represent s the warped midgets above the major radicals on the cardioid of the M-set, C3b, C4 and C5 represen t midgets on the Spike.
higher cycle numbers the points all merge together to fall on a smooth curve. But again, if the values are investigated closely, they differ in the third or fourth place. In [1] there is a chapter about the supposition that midgets are lik e snowflakes, i.e., no two midgets have the same distortion measure . This statemen t has not been proved but Figs. 10 and 11 show one example of the idea. Here is a family of warped midgets, all of which have different angle measures . Measures taken from similar objects (atoms of midgets on the spike) have an extremely close relationship to this plot, but each single value is different from all the others, provided that the numbers are carried to sufficient precision. In Fig. 11 an enlargemen t of the "Z?" family is shown on a scale that allows one to detect the individual positions derived from measure s of warped midgets in the first tendrils of major atoms. Table 3 lists the features measure d (shown in Fig. 9 ): the N / S angle measure s and the position of Atom 3 in the warped midget measured . 6. CONCLUSIONS
We have begun our search of relationships in the north angle, south angle plane, taking measurement s from several families of warped midgets. The fact that series of measure s of angle ratios of warped midgets in the M-set give distortion measure s that form families in the N / S plane is an interesting new feature of the M-set. Once one knows to which family of curves a set of measure s belongs, then one can use this set of
relations to predict how the warped midgets in that series will be distorted, as a function of cycle number. At present we have found no angles greater than 90° nor smaller than 75°. Further investigations will place tighter limit s on the angles to be found in the N / S angle plane. We are interested in finding a more complete distribution of points in the N / S plane when a much greater number of warped midgets have been measured in the M-set. REFERENCES 1. A. G. D. Philip, A. Robucci, M. Frame, and K. W. Philip, Series on Fractals, Midgets on the Spike {\o\. 1), L. Davis Press, Schenectady , NY (1991). 2. B. B. Mandelbrot, On the quadratic mapping Z-* Z^ n for complex ii and z: The fractal structure of its M set, and scaling. Physica D7, 224-239 (1983). 3. A. G. D. Philip and K. W. Philip, The taming of the shrew. Amygdala 19, 1 (1990). 4. A. Robucci, unpublished (1993). 5. B. Branner, The Mandelbrot set. In Chaos and Fractals, The Mathematics Behind the Complex Graphics, R. Devaney and L. Keen (Eds.), American Mathematica l Society, 75-105 Providence , RI (1989). 6. A. Duoady and J. Hubbard, Iteration des polynomes quadratique s complexes . Comptes Rendu Acad. Sci. Paris 294, 123-126(1982) . 7. B. B. Mandelbrot, On the dynamics of iterized maps III . The individual molecules of the M-set, self similarity properties, the empirical n^ rule, and the n^ conjecture. In Chaos, Fractals, and Dynamics, P. Fischer and W. Smith (Eds.), Marcel Dekker, New York (1985). 8. T. Wegner and M. Peterson , Fractal Creations, Waite Group Press, Mil l Valley, CA (1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
341
Chaos and Graphics
AUTOMATI C GENERATION OF GENERAL QUADRATIC MA P BASINS JULIEN C. SPROTT
Departmen t of Physics, University of Wisconsin, Madison, WI 53706, USA, e-mail: [email protected] u and CLIFFORD A. PICKOVER
IBM Watson Researc h Center, Yorktown Heights, New York 10598, USA, e-mail: [email protected] m Abstract—In this informal article, we describe simple approache s whereby a computer can automatically select parameter s and generat e a large collection of diverse, aestheticall y appealing fractal patterns based on genera l quadratic map basins. Computationa l recipes are included to encourag e reader involvement. In essence , we describe methods for teaching a computer to be both an artist and a critic of its own art. 1. INTRODUCTION
An infinite number of monkeys with an infinite number of typewriters (word processors , nowadays ) will eventually reproduce every work of Shakespeare . The problem is that someone has to sort through all the gibberish to find the occasiona l gem. On the other hand, the criteria for visual art are much less constrained than for literary composition. A monkey with a paintbrush has a reasonabl e chance of producing a pattern that someone would consider artistic. We have been experimenting with replacing the monkey by a computer and having it generate a collection of visually interesting patterns. Unlike the monkey, the computer can be trained to select those images that are likely to appeal to humans. The procedure is to take some simple equations with adjustable coefficients chosen at random, solve the equations with the computer, and display those which meet criteria that we have found to be strong indicators of artistic quality. One approach is to use equations with chaotic solutions. Such solutions are unpredictable over the long term yet exhibit interesting structures as they move about on a strange attractor, a fractal object with noninteger dimension. Our books show many examples of computer art produced by these and related methods [1-3]. Here we propose another simple method for producing fractal art. 2. GENERAL TWO-DIMENSIONAL QUADRATIC ITERATED MAPS
Traditionally when physicists or mathematician s saw complicated results, they often looked for complicated causes . In contrast, many of the shapes which follow describe the fantastically complicated behavior of the simplest of formulas. The results should be of interest to artists and nonmathematicians , and anyone with imagination and a littl e computer programming skill.
One lesson of chaos theory is that simple, nonlinear equations can have complicated solutions. The solutions are most interesting if they involve at least two variables, x and y, which can be used to represent horizontal and vertical positions, and if the variables are advance d step-by-ste p in an iterative process . The simplest nonlinearities are quadratic (x^ or xy). The most general two dimensiona l quadratic iterated map is: Xnew = a + bx + cx^ + dxy + ey + fy^ yn^w = g + hx^ ix^ + jxy -^ ky + ly^ where a through / are constants chosen at random but held the same throughout the calculation. Think of this as a mathematica l feedback loop where new values for X and y are used again in the next round of iteration by setting x = x„ew and y = ynew The constants can be considere d as settings of a combination lock, each revealing a different pattern for you to admire. They open doorways to an infinite reservoir of magnificent shapes and forms. There are many ways to display the solution to our general maps. One way is to plot successiv e values of X and y as dots on the screen. Many of the solutions wil l move toward a point and remain there. Others wil l settle into a periodic orbit, or will move off toward infinity. The interesting cases are the chaotic ones which remain confined to a limited region but whose orbits produce a strange attractor with intricate fractal structure. You can choose the starting values of x and y arbitrarily within the basin of attraction, but you should discard the first few iterates since they probably li e off the attractor. Another way you can display the solution is to solve the equations with many different starting values and count the number of iterations required for the solution to wander outside some region in the xy plane. You
Reprintedfrom Comput & Graphics Vol. 19, No. 2, pag. 309-313, 1995
342
J. C. SPROTT and C. A. PICKOVER
can use the final number of iterations to determine the color for that point in the plane of initial xy values. Plots produced in this way are called escape-tim e fractals becaus e the color contours indicate the time required for the orbit to escape from the region. Some initial values may have orbits that never escape , and so you need to have a *'bailout condition" beyond which your program stops iterating and moves on to test the next initial condition. Some of the most artistic examples of escape-tim e fractals explored in the past have been Julia sets of the map Zne^ = z^ -\- c, where z and c are complex numbers [4,5]. In terms of jc and y this map is Xnew = x^ - y^ -\- a ynew = 2xy -¥ b
DIM a(12) RANDOMIZE TIMER SCREEN 12 n% = 0
and the test escape region is normally taken as a circle of radius of 2 centered on the origin. These traditional Julia sets are a special case of the more general maps we propose in this article. 3. COMPUTER ART CRITIC
Visually interesting escape-tim e fractals are those for which the orbits escape slowly. We have found that escape times between about a hundred and a thousand produce the most fascinating maps. We start by choosing the twelve coefficients randomly over the range — 1.2 to 1.2 in increments of 0.1, and then we iterate the equations for our generalize d quadratic map with initial conditions of x = y = 0. If we find a group of coefficients that result in the initial point escaping beyond a circle of radius 1000 centered at the origin within 100 to 1000 iterations, then we save the param-
'Array of c o e f f i c i e n t s 'Reseed random numbers 'Assume VGA graphics
WHILE INKEY$ = "" 'Loop u n t i l a key i s pressed IF n% = 0 THEN CALL setparams(x, y) CALL advancexy(x, y , n%) CALL t e s t s o l n ( x , y , n%) IF n% = 1000 THEN CALL d i s p l a y : n% = 0 WEND END SUB advancexy ( x , y , n%) SHARED a ( )
'Advance ( x , y) at step n%
xnew = a(l) + x * (a(2) + a(3) * x + a(4) * y) + y * (a(5) + a(6) * y) y = a(7) + X * (a(8) + a(9) * x + a(10) * y) + y * (a(ll) + a(12) * y) X = xnew
n% = n% + 1 END SUB SUB display ( ) ' P l o t escape-time contours FOR i% = 0 TO 639 FOR j % = 0 TO 479 X = -5 + i% / 64 y = 5 - j % / 48 n% = 0 WHILE n% < 128 AND X * X + y * y < 1000000 CALL advancexy(x, y , n%) WEND PSET ( i % , j % ) , n% MOD 16 NEXT j % NEXT i% END SUB SUB setparams ( x , y) 'Set a ( ) and i n i t i a l i z e ( x , y ) SHARED a ( ) X = 0: y = 0 FOR i% = 1 TO 12: a(i%) = (INT(25 * RND) - 12) / 10: NEXT i% END SUB SUB t e s t s o l n ( x , y , n%) IF n% = 1000 THEN n% = 0 I F x * x + y * y > 1000000 THEN IF n% > 100 THEN n% = lOOO ELSE END I F END SUB
'Test the solution 'Solution i s bounded 'Solution escaped n% = 0
Fig. 1. ESCAPE.BAS : A BASIC program for automatically producing an unlimited number of escape-tim e fractals similar to those shown.
Generatio n of genera l quadratic map basins
343
Fig. 2. Escape-tim e fractal for parameter s EHPLWTDJRCAP. eter set and compute an escape-tim e fractal for a particular region of the x-y plane. The choice of 1.2 for the coefficient range is about optimal for speeding the search, and it allows the coefficients to be compactly represente d as letters of the alphabet (A = -1.2, B = - 1 . 1, through Y = 1.2) for easy reference and replication. The fisting ESCAPE.BAS (Fig. 1) shows a BASIC program for producing an endless successio n of escape-time fractals by this method. It should run without modification under QBASIC, QuickBASIC, VisualBASIC for MS-DOS, or PowerBASIC on the IBM PC. It assume s VGA graphics (640 X 480 pixels X 16 colors). When run on a 486DX33 under PowerBASIC 3.0, the program takes on average about ten seconds to find each interesting case and about a minute
to plot it. In the process of searching for what we call "beautiful parameters, " it discards about 300 sets for every one it saves for plotting. This still leaves about 200 trillio n cases , nearly all of which are different. If you view them at the rate of one per second, it would take over six million years to see them all, and thus it is very unlikely that any of the patterns you produce wil l ever have been seen before. We often run the program overnight and capture the screens to graphics files, which can be rapidly examined the next morning. 4. SAMPLE ARTWORK
Although the programs and methods we have described work well with persona l computers and produce good-quality patterns within VGA screen limits, we became curious as to how our approach could be
Fig. 3. Mount Fractalia, a three-dimensiona l representatio n of Fig. 1.
344
J. C. SPROTT and C. A. PICKOVER
extended to higher resolutions (Figs. 2 - 8 ) . Naturally, high-resolution, high-iteration computations would take longer to perform. To overcome these problems and push our method to the limit, we made use of IBM's Power Visualization System, a graphics supercomputer which can compute our general quadratic iterated map in parallel using up to 32 Intel i860XP processors. This means that the computer can simultaneously work on different portions of the artwork and therefore greatly reduce the time needed to explore a large number of images to find interesting structures. With our software and special hardware we can compute and view images at VGA resolution in under a second. The images in this article were computed at a resolution of 1600 X 2400 pixels using 1000 iterations for each pixel. Computation and display required less than a minute for each high-resolution image. The final step in aesthetic presentation involves the mapping of escape times to colors. Although beautiful images result from simple color mappings, such as the one used in the BASIC code, we used custom software which permits the algorithmic or mouse selection of colors from a palate of 2^^ colors in a convenient fashion. It is also possible for us to render the maps in three dimensions, representing escape time as height. The Power Visualization System enables us to fly-by the 3D maps in real-time, permitting us to make video-tape animations characterizing the intricate behavior of these functions.
. 4. The Fractal Curtain, an escape-time fractal for parameters WBMLNRQMNRAA.
Fig. 5. Escape-time fractal for parameters MWRQFVMKUVFK.
Fig. 6. Escape-time fractal for parameters KUONOVSVFLAR.
345
Generation of general quadratic map basins
Fig.
7.
Escape-time fractal for parameters XPQMMTWRJ.
EMXI
In the future, high-end methods such as these will be accessibl e to everyone as PC power increases , cost decreases , and Internet collaborations such as ours become commonplace[2] . In our own collaboration, input parameter s were generate d on a persona l computer in Wisconsin, electronically sent over the Internet to New York, at which point they were read by the Power Visualization System and rendered . To artists and computer graphics programmers , the automate d generation of our generalize d quadraticmap representation s has great appeal becaus e the speed allows the human analyst the freedom to experiment with many parameters . Students and teachers will enjoy such an approach as they explore and demonstrate the complexity and chaos associate d with simple formulas. Mathematician s may find the approach useful becaus e the sheer number of different structures they can generate has the potential for making complex behaviors apparen t which might have been overlooked using traditional approaches . 5. FURTHER SUGGESTIONS
The method we have described is simple and effective, but we do not claim it is the final word on auto-
Fig.
8.
Escape-time
fractal for JTKDCRWY.
parameters
JLLG-
mated computer art. You can explore other criteria for selecting the patterns and other ways to display them. We chose a generalize d two dimensiona l quadratic map to emphasiz e the complexity and variety that arises from simple equations . You can easily extend the technique to other mathematica l functions and to higher dimensions . The same ideas can be used for automatic generation and evaluation of computer music. We would like to hear of any interesting results obtained by readers using our approach .
REFERENCES J. C. Sprott, Strange Attractors: Creating Patterns in Chaos, M&T Books, New York (1993). C. A. Pickover, Mazes for the Mind: Computers and the Unexpected, St. Martin's Press, New York (1992). C. A. Pickover, Chaos in Wonderland: Visual Adventures in a Fractal World, St. Martin's Press, New York (1994). H. O. Peitgen and P. H. Richter, The Beauty of Fractals: Images of Complex Dynamical Systems, Springer-Verlag, New York (1986). B. Mandelbrot, The Fractal Geometry of Nature, Freeman, New York (1993).
This Page Intentionally Left Blank
PART V ITERATED FUNCTION SYSTEMS
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 V. Iterated Function Systems
Within fractal geometry, iterated function systems (IPS), popularized by mathematic s Professo r Michael Barnsley, provide a method for both generating and characterizin g fractal images. IPS can be thought of as a set of rotations, translations , scalings, and reflections (affine transformations ) that provide a practical tool for image compressio n and understandin g neural netw^orks, and for producing images of clouds, smoke, seascapes , flames, horizons, plant branchings. IPS can also be thought of as a collection of functions w^hose domain and range are in the same space; the functions can be applied successively , in any order. If the functions satisfy some minor conditions (in particular, they are all contraction mappings), iteration wil l result in convergenc e to the fractal attractor that is the union of all the limit points of all possible compositions of functions. Authors often investigate tw^o methods of generating IPS: deterministic, in vv^hich all the transformation s are applied simultaneously , and random, in w^hich the transformation s are applied one at a time in random order. In the standard IPS formalism, there are no implied relations betvv^een the transformations . Por example, in the random IPS implementation , the probability, /?(/), of applying transformation T{i) is independen t of w^hich transformation w^as previously applied. On the other hand, RIPS (recurrent iterated function systems ) include a transition matrix, a table of probabilities/?(//) for applying T{i) given that T{j) has just been applied. (In the standard IPS, p{ij) =p{i) for ally.) By setting some of the /?(//) equal to 0, w^e obtain a very rich collection of attractors having simple descriptions . (Por details, see Chapter 10 of Barnsley (1993), Chapter 2 of Pisher (1995), and Chapter 2 of Massopus t (1994). Similar ideas are presente d for the notion of "language restricted iterated function systems" (Prusinkiewicz, 1992).) Local iterated function systems (LIPS) generalize IPS in another w^ay. Instead of requiring that the transformation s are defined on the entire space, LIPS consist of contractions defined on subsets of the space. This approach permits more compact descriptions of shapes made up of several distinct fractals. See Barnsley and Hurd (1993) for a clear example. Perhaps more surprisingly, LIPS permit the automization of the "inverse problem", finding the transformation s to produce a given image (Barnsley and Hurd, 1993; Fisher, 1995). Other researcher s have "driven" IPS vv^ith a symbol string, obtained by binning the output of a mathematica l dynamical system or an experimenta l time series, and using the resulting pattern to analyze the driving string (Jeffrey, 1994; Stew^art, 1992). Por example, in Jeffrey's approach , four letters correspondin g to bases in a DNA sequenc e drive the IPS pattern. Nonuniformity in the resultant graphics are caused by departure s from randomnes s in the DNA string. In 1995, Sonya Bahar introduced an IPS w^ith time-varying coefficients (Bahar, 1995). By driving the choice of transformations , the full attractor reveals delicate subfamilies of imbedded orbits. Also, by partitioning the attractor space, the sequence s of points generate a symbol string that can be used to drive the IPS. (See also Bahar, 1997; Mauldin, 1995; and Mauldin 1996). Yuval Pisher's 1995 book Fractal Image Compression: Theory and Application features a collection of articles by twelve experts in the field of fractal image compressio n and iterated function systems, and contains details of hovj to encode and decode images, offering w^orking codes usable in practical applications. The following are several recent patents in the field of fractal image compression :
349
350 (1) (4,941,193) Methods and apparatu s for image compressio n by iterated function system (Bamsley; Michael E (Atlanta, GA); Sloan; Alan D. (Atlanta, GA)), Jul. 10, 1990. (2) (5,065,447) Method and apparatu s for processin g digital data. (Bamsley; Michael E (Atlanta, GA); Sloan; Alan D. (Atlanta, GA)), Nov. 12, 1991. (3) (5,384,867) Eractal transform compressio n board (Barnsley; Michael E (Atlanta, GA); Sloan; Alan D. (Atlanta, GA); Elton; John H. (Atlanta, GA); Moreman; Charles S. (Lawrenceville, GA); Primiano; Guy A. (Gumming, GA)), Jan. 24, 1995. (4) (5,416,856) Method of encoding a digital image using iterated image transformation s to form an eventually contractive map (Jacobs ; Everett W. (San Diego, CA); Boss; Roger D. (San Diego, CA); Fisher; Yuval (La Jolla, CA), May 16, 1995. (5) (5,430,812) Fractal transform compressio n board (Bamsley; Michael E (Atlanta, GA); Sloan; Alan D. (Atlanta, GA); Elton; John H. (Atlanta, GA); Moreman; Charles S. (Lawrenceville, GA); Primiano; Guy A. (Gumming, GA)), Jul. 4, 1995. For recent information on iterated function systems , see the web sites http.7/inls.ucsd.edu/y/Fractals / and http://www.iterated.com/ .
For Further Reading (1) Bahar, S. (1995) Chaotic orbits and bifurcation from a fixed point generate d by an iterated function system. Chaos, Solitons and Fractals 5: 1001-1006. (2) Bahar, S. (1997) Symbolic dynamics for IFS attractors. Fractals. 5: 237-246. (3) Bamsley M., and Hurd, L. (1993) Fractal Image Compression. A. K. Peters: New York. (4) Bamsley, M. (1993) Fractals Everywhere, 2nd Edition. Academic Press: New York. (5) Bamsley, M. and Demko, S. (1985) Iterated function systems and the global construction of fractals. Proceedings of the Royal Society London A 399: 243-275. (6) Fisher, Y (1995) Fractal Image Compression. Springer-Verlag : New York. (7) Fisher, Y, (1996) Fractal Image Encoding and Analysis: A NATO ASI Series Book Springer-Verlag: New York. (8) Hart, J. (1996) Fractal image compressio n and recurrent iterated function systems . IEEE Computer Graphics and Applications. 16(4): 20-30. (9) Jeffrey, H. (1994) Fractal and genetics in the future. In Visions of the Future, C. Pickover, ed., pp 127-135. St. Martin's Press: New York. (10) Lu, N. (1997) Fractal Imaging. Academic Press: New York. (11) Massopust , P. Fractal Functions, Fractal Surfaces, and Wavelets, Academic Press: New York. (12) Mauldin, R. (1995) Infinite iterated function systems: theory and applications. Progress in Probability 37: 91-110. (13) Mauldin, R. and Urbanski, M. (1996) Dimens ions and measure s in infinite iterated function systems . Proceedings of the London Mathematics Society. 73: 105-154. (14) Meloon, B. and Sprott, J. (1997) Quantification of determinism in music using iterated function systems . Empirical Studies of the Arts 15: 3-13. (This article proposes a novel technique for exhibiting and quantifying the determinism in music. A written score of music is modeled as a dynamical system employing an iterated function system to generate a picture from the music.) (15) Peruggia, M. (1993) Discrete Iterated Function Systems. A. K. Peters: New York. (16) Pickover, C. (1996) Fractal Horizons: The Future of Fractals. St. Martin's Press: New York. (17) Prusinkiewicz, P. and Hammel, M. (1992) Escape-tim e visualization method for language restricted iterated function systems , pp. 24-42 in Fractal Geometry and Computer
351 Graphics, J.L. Encarna9ao , H.-O. Peitgen, G. Sakas,and G. Englert, eds. Springer-Verlag : New York. (18) Stewart, I. (1989) Order within the chaos game. Dynamics Newsletter 3:4-9.
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
353
Chaos and Graphics
SOME NONLINEAR ITERATED FUNCTION SYSTEMS MICHAEL FRAME and MAUREEN ANGERS
Department of Mathematics, Union College, Schenectady, NY 12308-23II, USA Abstract—We give examples of Iterated Function Systems where the usual affine functions are replaced by complex polynomials. Since these are not global contractions, some care must be exerted with the domain on which the functions are applied. On the other hand, the lack of unique inverse functions givesriseto multiple addresses for the same regions of the attractor, thus providing another degree of information available for determining other attributes—for example, colors or textures—of the image. Traversing a loop through parameter space reveals an ^'explosion" of features and also what may be a curious cascade of self-intersections. 1. INTRODUCTION TO IFS
The set of affine transformations { T i , . . . , r„} is called an iterated function system (IFS) generating the set B. It is well-known (Section 3.8 of [2]) that the same set B can be generated as the closure of the orbit of a single point under repeated application of the T, in random order. This is the "random iteration algorithm," and the literature abounds with images generated by this method. For practical applications in image compression and manipulation, there is considerable interest in finding an efficient solution to the "inverse problem"—that is, given B E Comp(R^),findaffine transformations { T i , . . . , T„} having B as their attractor. Tiix,y) = (aiX-\- biy-\- et, dx^ diy¥ ft). Of course, there is no particular reason to restrict Recall the eigenvalues X, and /u/ of T, are the roots of attention to affine transformations, except for the simplification of having contraction factors independent the equation of the points at which the transformations are applied. In this paper we consider NIFS, iterated function syst^ - (at + di)t + {Uidi - bid) = 0 tems involving nonlinear functions. After pointing out If both X, and M/ have modulus less than 1, T, is a that the inverse iteration method for generating Julia contraction map with contraction factor r, = sets of quadratic polynomials can be viewed as an NIFS max {IX/1, IM/1}. Familiar arguments (Section 3.7 of using the square root function, we give some examples [2]) show that if the affine transformations Ti, . . . , of attractors of polynomial NIFS. Then we establish T„ are contraction maps, then the function T given by some estimates of parameter bounds guaranteeing each application of the functions is a contraction. Within this range, the convergence argument mentioned in T(A)=TdA)U'"UT„(A) the previous paragraph applies to NIFS. The lack of unique inverses for polynomial functions gives rise to is a con.rraction map on the space Comp(R^) of com- multiple addresses' being assigned to regions of the pact subsets of the plane, with the HausdorfF metric. attractor in the plane. Unique addresses can be recovRecall that in the plane, compact subsets are the closed, ered by passing to an appropriate covering space. Fibounded subsets, well represented by images consisting nally, we illustrate the evolution of the attractors as we of pixels on a computer screen. Two images are nearby move through a path in parameter space. in HausdorfF distance if each is contained in a small We believe this extension of IFS to a wider class of expansion of the other (add a band a few pixels thick functions opens new possibilities for image generation around the periphery of the image). The contraction and encoding. In particular, though an affine IFS can factor of ris max { r i , . . . , r„}. Since Comp( R^) with produce any image to a given level of resolution, more the Hausdorff metric is a complete metric space, it efficient encodings may be achieved with nonlinear follows from the contraction mapping theorem that functions. for any A E Comp(R^), the sequence Mandelbrot's fractal geometry [1] has excited great interest in understanding hierarchical structures in natural phenomena through processes repeated on many scales. This is a dynamic geometry, with function taking precedence over form. Within fractal geometry, the method of iterated function systems (IFS), popularized by Barnsley[2], is a relatively easy way to generate fractal images by repeated application of a collection of affine transformations
2. JULIA SETS AS NIFS
A, T(A), T(T(A)) = T°2(^),
T°\A),
(1)
converges to a unique B E Comp(R^), the attractor of T. Moreover, B is the fixed point of T: B = T(B) = Ti(B)U' • • UT„(B)
(2)
The Julia set J(c) for the function/(z) = z^ -\- c is the closure of the set of repelling periodic points of / ( z ) . It is well-known (Proposition 3 of [3]) that for any point ZQ of /(c), the backward orbit {zo,/~'(zo, /~^(zo), • • •} is dense in /(c), where the inverse image /~^(zo) is defined as {z:/°^(z) = ZQ] . For example, /"H^o) is gotten by solving Zo = z^ + c, or
Reprintedfrom Comput. & Graphics Vol. 18, No. 1, pag. 119-125, 1994
354
M. FRAME and M. ANGERS
z = +Vzo - c
and
-i.ZQ- ~
• =
T^{z) = -0.6'z"
+ (-0.35 - 0.35/)
r4(z) = 0.6-z^^-(0.35 -0.35/)
That is, writing Ti(z) = + V z - c
and
r2(z) = - V z - c ,
(3)
(5)
Note that for this NIFS the pieces of the attractor are not exactly shrunken copies of the whole attractor. More will be said about this in Section 5.
we see Example 3.2. Figure 2 shows the attractor of the NIFS given by the functions
f-Hzo)={Tdzo),T2(zo)}
/-2(zo) = {r,(r,(zo)), r,(r2(zo)), T2(TdZo)),T2(T2(Zo))}
Ti(z) = -0,53'z"
+ (0.35 + 0.35/)
T2(z) = 0.53'z^ + (-0.35 + 0.35/) and so on. Consequently , the backward orbit of ZQ is just the sequenc e {T(zo),T°2(zo),
T^iz) = 0.53• z^ + (-0.35 - 0.35/) T4iz) = -0.53 • z" + (0.35 - 0.35/)
(6)
•},
where T(zo) = Ti(zo)U T2(zo), and so the Julia set J(c) is just the attractor of the NIFS T. The familiar "inverse iteration method" (page 35 of [4]) of generating the Julia set Ac) is just the random IFS method applied to the nonlinear functions (Eq. 3). In this paper, we investigate NIFS with the nonlinearity's arising from polynomials instead of the square root function.
Comparing this with Example 3.1, we have simply interchange d which functions involve conjugation and which do not. Example 3.3. Figure 3 shows the attractor of the NIFS given by the functions Ti(z) = 0.6 • z^ + (0.35 + 0.35/) T2iz) = 0.6'z^ + (-0.35 + 0.35/)
3. POLYNOMIAL NIFS
We consider NIFS consisting of functions of the form a'z"-\-b
and
z-^ a- z" + b.
where a and b are complex constants .
(4)
T^iz) = 0.6'z^ + (-0.35 - 0.35/) r4(z) = 0.6-z^ +(0.35 -0.35/)
(7)
4. CONTRACTION ESTIMATES
To guarante e convergenc e in the Hausdorff metric Example 3.1. Figure 1 shows the attractor of the NIFS of the sequenc e Eq. (1), it is sufficient to require each given by the functions Ti(z) is a contraction. Of course, in general this is not the case, so we must restrict our attention to a subset r , ( z) = 0.6-z2 + ( 0 . 3 5+ 0.35/) of the plane. Let D(r, ZQ) denote the open disc of radius r and with center ZQ. We estimate the disc on which T2(z) = -0.6-z" + (-0.35 + 0.35/)
Fig. 1. The attractor for the NIFS of Example 3.1, and a magnification.
355
Some nonlinear iterated function systems
Fig. 2. The attractor for the NIFS of Example 3.2, and a magnification. r ( z) is a contraction, and the disc on which iteration of r ( z) is a contraction. PROPOSITION 4.1. For T{z) of Eq. (4), we have
(1) r i s a contraction mapping on D{r, 0), where
T(D{r, 0)) = D{ \\a\\ - r\ b) C D{ \\a\\ • r" + ||Z>||, 0),
1
(8)
n\\a\\
so r(Z)(r,0))CZ)(r,0)if Ikll • r" + ||Z?|| < r. Inequality (10) is obtained by substituting (8) into (9) and solving for \\bl III For quadratic functions this becomes
and (2) r(Z)(r, 0 ) ) C i ) ( r, 0)if a • r" +
1
. Substituting r, the radius of the disc n\\a\\ Z)(r, O),for ||z|| gives (8). For part (2), observe
ifllzll
< r.
(9)
Corollary: For « = 2, T is a contraction on D{r^ 0) andr(Z)(r, 0 ) ) C i ) ( r , 0 ) if
That is, 1
1
nn
1
{n\\a\\y
and
(10)
Proof:Since— r(z) = « * a ' z" \r(z)isacontractio n az
1 •4.^11
(11)
For an NIFS Tx(z), . . ., ^ ( z ), for / = 1, . . ., A: let r, satisfy (8) and \bi\ satisfy (10), so T, is a contraction on D{^ri, 0) and TiiDin, 0)) C i)(r,, 0). Fur-
Fig. 3. The attractor for the NIFS of Example 3.3, and a magnification.
356
M. FRAME and M. ANGERS
ther, suppose each KJ < \. In applying the random it- can be produced under less stringent bounds. For the eration algorithm, to guarantee each application of each examples given in Section 3, we have Ti (z-) is a contraction it suffices to require . in-l)"~' 1 yi aiiipi c r^(i)(r,,0))CZ)(r„,in,0) n" B"-^ 3.1 0.50576 0.6 for all / and m, \ <. i, m < k, (12) 3.2 0.50576 0.53 0.60469 3.3 0.6 where r^in = minjri, .. ., r^}. Since r^(/)(r,, 0)) C D( \\aj • rf- + ||Z?^||, 0), condition (12) holds if Nevertheless, the bounds established in Proposition 4.2 (13) give parameter values under which NIFS consisting of Ikmaxll • Ctx" + ll^maxll ^ ^n, polynomials of the form (4) generate a unique attractor. This provides a rigorous foundation for producing That is, graphical images by this polynomial extension of the PROPOSITION 4.2. In the random iteration algorithm, well-known affine IFS. each application of T/ is a contraction if (13) holds. In the special case ||<2^|| = A, \\bn,\\ - B, and rim = 5. ADDRESSES, MULTIPLE COVERS «, for 1 < m < k, (consequently, all r^ = r by (8)) By using the decomposition (2), the transformation condition (13) becomes simply numbers can give addresses to regions of the attractor B. For example, Ti{B) has address (1), T\{T2(B)) Ar" -^ B < r. (14) has address (1, 2), and so on. In Example 3.1, the upper right quarter of the attractor has address (1), Using (8) to eliminate r, we obtain a relation between the upper left has address (2), the lower left has address A and B: (3), and the lower right has address (4). See the left side of Fig. 4. Of course, this addressing scheme is fa\n-\Y-' 1 (15) miliar for affine IFS (Section 4.1 of [2]), but with n" B"polynomial NIFS there is a new feature. For affine IFS, the address of a region is unique if Starting the random iteration algorithm with z = 0, the decomposition (2) consists of disjoint unions this bound is too strict. By iterating these functions, (Theorem 2, page 129 of [2], and the observation on we produce a sequence of points with displacements page 118 that addresses are unique for "totally disconfrom the origin generated by the translations. For in- nected" IFS). This no longer holds in the polynomial stance, if Ti and T2 are the first two transformations case. The right side of Fig. 4 shows that each region applied, the points generated are determined by a two-digit address in fact is determined by two diffisrent two-digit addresses. This "double cov0,bi,a2'b1'-\-b2, •• • ering" is a result of the squaring in the functions (5). Specifically, decompose the attractor A into four and in general the moduli of the elements of this se- "components"/ii = Ti{A),A2 = T2(A),Ai = T-^iA), quence need not converge to any of the n. While the and A4 = TAIA). Since A is symmetric across the real condition given in Proposition 4.2 guarantee Hausdorff axis {i.e., A = A), and since —Tiiz) = T^{z), we see metric convergence of the sequence (1), clean images AT, - —A\. Similarly, A2 = —A4. Consequently,
Fig. 4. Left: the attractor for Eq. (5), the parts having addresses (1), (2), (3), and (4) are outlined. Right: the same attractor separated into regions determined by two-digit addresses. Note, for example, (11) and (13) determine the same region.
Some nonlinear iterated function systems
A,,=
T,(TM))=T,(-TM)) =
T,(-T,{A))=T,{TM))=An,
where the penultimate equality results from the z^ in Tx. Repeating this argument for all components of address length two, we see that An U ^ i 2 U ^ 2i U ^ 2 U^31 U ^ 3 2 U ^ 4 1
U^42
and ••A,,UA,,UA23UA24 U ^33 U ^34 U ^43 U ^44
are just two copies of the attractor, but within each copy the addresse s (of length 2) are unique. So spec-
357
ifyin g two address digits determines not only the region of the attractor, but also in which of these two subsets , A ^~ and A ^^, the region lies. Continuing in this way, three address digits determine two covers of each region of address length two. For example, both Axn U yi 112, and ^113 U ^114 cover yiii . This suggest s that an address string of length n specifies not only the appropriate region of the attractor in the complex plane, but also one of the 2 " " ' possible covers of this region. This additional structure provides another avenue for encoding information in the fractal structure. For example, cover addresse s can be used to assign colors to particular subregions . This idea will be explored elsewhere . 6. A PATH THROUGH PARAMETER SPACE In this section we give an example of the kinds of evolution attractors can exhibit as one of the translation factors varies along a loop in paramete r space.
Fig. 5. Attractors for the NIFS (Eq. 5) with (Eq. 16). Left to right, top to bottom, the parameter s of Eq. (16) are given in Eq. (17).
358
M. FRAME and M. ANGERS
Figures 5 and 6 show the attractor A for a sample of some points along a path constructe d from Eq. (5) by adding a function Ts{z) = a- z^ ^{b + C'i).
and in Fig. 6
0.01 0.01 0.02 0.04 0.05 0.1
(16)
Here b and c are varied to move Ts{A) along a loop around T\{A). Specifically, in Fig. 5 the values of «, b, and c are given by (left to right, top to bottom) a 0.2 0.1 0.05 0.04 0.02 0.01
c 0 0 0.35 0 0.7 0 0.7 0.1 0.7 0.2 0.7 0.4
0.55 0.4 0.2 0.1 0 0
0.55 0.7 0.7 0.7 0.7 0.35
(18)
b
To minimize overlaps, the paramete r a is reduced as 75(0) gets closer to the unit circle. Following the attractor around this path, we observe an "explosion" and subsequen t reorganization . Note at the beginning of Fig. 5 and at the end of Fig. 6 a particular feature, r2( r5(^)), has been marked
(17)
'0 \
1 •f^j
\
/
/
• 1
^-^^ i?
•
3
•
\1
/
Fig. 6. Attractors for the NIFS (Eq. 5) with Eq. (16). Left to right, top to bottom, the parameter s of Eq. (16) are given in Eq. (18).
359
Some nonlinear iterated function systems with an "x." Scrutinizing the second picture in Fig. 5 and the last picture of Fig. 6, we see as Ts(A) "turns the corner" at 0, the orientation of the marked feature seems to change. Magnifications of T2(T5iA)) along the path reveal that instead of a simple rotation, the feature seems to fold over on itself, calling into question the supposition that the attractor remains a Cantor set
of addresse s can be viewed as providing a direction of information "perpendicular " to the attractor, and consequentl y allowing more compact encoding of such additional information as color or texture of the image. Examples of paramete r space paths exhibit interesting manifestations of this multiple covering, including an explosion and a cascad e of apparen t self-intersections .
PSEUDOCODE
Random Iteration Algorithm for Quadratic Maps Set Parameter s A^ = number of transformation s Shrink [7], Angle [7], ReTrans[7], ImTrans[7], Deg[7], Sgn[7]
7 = 1, .. ,A^
{For the function x -^ ((Rotate by Angle[7])(Shrink[7]*(z'^Deg[7]))) + (ReTrans[7] + ImTrans[7]*/) Sgn[7]= 1; if z''Deg[7] is replaced by z"Deg[7], Sgn[7] = - 1} Set Initial Point X = 0, 3; = 0 Generate Points Randomly select an integer, 7, between 1 and N ifDeg[7] = 2 then jcnew = Shrink[7]*(x'^2 - y^2) ynew = Shrink[7]*Sgn[7]*(2*jc*>^) ifDeg[7] = 3 then xnew = Shrink[7]*(x''3 - 3*x*y^2) >;new = Shrink[7]*Sgn[7]*(3*x'^2*j;-3;'^3) {I n general, xnew = Shrink[7]*Re((x + y*iyn) ynew = Shrink[7]*Sgn[7]*Im(x + y*iyn)} xtemp = xnew*cos(Angle[7]) - ynew*sin(Angle[7]) + ReTrans[7] ytemp = xnew*sin(Angle[7]) + ynew*cos(Angle[7]) + ImTrans[7] X = xtemp y = ytemp Plot(x,j;) Continue until new points stop appearing in the picture. all along the path. This matter will be pursued elsewhere, but here serves to show that magnifications of NIFS can reveal new types of behavior. 7. CONCLUSION
By incorporating complex polynomial functions into the standard affine IFS scheme , we are able to generate a different category of fractals, in which the subregions are covering spaces of the original. This nonuniquenes s
REFERENCE S B. Mandelbrot, The fractal geometry of nature, W. H. Freeman , New York (1983). , BosM. Barnsley, Fractals everywhere, Academic Press ton, MA (1988). L. Keen, Julia sets. In Chaos and fractals: The mathematics behind the computer graphics, R. Devaney and L. Keen (Eds.), American Mathematica l Society, Providence, RI, 57-74 (1989). H-O Peitgen and P. Richter, The beauty of fractals. Springer-Verlag , Beriin (1986).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
361 Chaos and Graphics
BALANCING ORDER AND CHAOS IN IMAGE GENERATION^ K A R E L C U L I K II and S I M A N T D U RE
Department of Computer Science, University of South Carolina, Columbia, SC 29208, USA Abstract—We introduce new techniques to generate real-world images. Many of the natural images exhibit a hierarchical structure and a balanced combination of both order and chaos. We show how a controlled use of deterministic chaos yields a powerful method to concisely describe and to efficiently generate complex realistic images. The basic technique is the use of Mutually Recursive Function Systems (MRFS) possibly with additional control on the order of computations . Then we show that, surprisingly, regular sets of control sequence s are convenient but not essential . Some examples are presente d illustrating the power of the technique. 1. INTRODUCTION
In recent years, Mandelbrot's fractal geometry [1] has drawn considerabl e attention of scientists and mathematicians, as it provides methods for a concise description of many of the seemingly complex forms and . Fractal geometry patterns in nature and the sciences has found applications in many areas, ranging from ] to the dethe study of chaotic (complex) systems[2 velopment of new techniques for image compressio n [ 3, 4]. In a way, fractals have helped in reconnectin g pure mathematics researc h with both natural sciences and computing. Computer graphics has played an import and rapidly growing tant role both in its developmen popularity. Conversely, fractal geometry now plays a significant role in the rendering, modeling, and animation of natural phemomen a and of fantastic shapes in computer graphics. It has been often cited that many of the natural objects like trees, mountains, coastlines,clouds, etc. are fractal, i.e., they contain copies of themselves . However, to provide a more accurate description of realworld images, one has to take into account the disorder seen in these natural objects. Therefore, though an obl shape,it has ject like a tree has self-similar geometrica t some amount of disorder (chaos) in the arrangemen of its branches or leaves. This also applies to various textures as studied in computer graphics.Also, a natural image will typically have a hierarchical structure. Taking again the example of a tree, the most accurate description would be a hierarchical one. At the lowestlevel of this hierarchy, a single leaf and a trunk is described, each of which is a fractal. Leaves and trunks are then combined in a different recurrent pattern, giving us the whole tree. Moreover, branches of a tree at different levels will typically have different structures , which again follow certain regular patterns but manifest s (possibly also considerabl e irregularity or randomnes caused by the effect of environment on the growth of plant in addition to that of its genetic blueprint).
The observation that the boundary region between order and chaos results in the most interesting and most complex behavior has been made in the case of cellular automata too, which are discrete dynamical . Most systems capable of modeling physical systems intriguing cellular automata belong to Class 4, which d by highly lies between Classes 1 and 2 (characterize d by chaotic regular behavior) and Class 3 (characterize behavior)[5]. Also see [6, 7] for the use of controlled . disorder in crystallography l An extensive work has been done on mathematica description and computer generation of fractals. The methods used can be classified as fitting in one of three basic methods.
1. Variants of the "Escapealgorithm" use the fact that for many iterative processe s the boundary between the domain where the process converges and where . The prime it diverges has fantastic fractal shapes examples are Julia sets[3] and the Mandelbrot set[l]. These fractals are mathematicall y interesting and artistically beautiful but are not useful for the approximation of real-world images. 2. Various deterministic recursive or iterative procedures like L-systems[8-13 ] and many others, e.g.,[\A-\6]. The most important has been the work of Bamsley and others on Iterative Function Systms (IFS)[3, 17-20] becaus e it provides the possibility to encode (even automatically) a wide variety of real images. This method is based on the idea that a suitable, usually chaotic, dynamical system is designed that has a given image as its attractor. Barnsley's Chaos Game algorithm uses the chaotic process to select the points that approximate the texture of the image, it does not necessaril y make the image itself chaotically irregular. 3. Random fractals, (a) Some method of groups 2, e.g., L-systems can employ a random selection of rules or parameter s to generate randomly irregular images. It should be noted that Barnsley's IFS are not suitable for this, (b) Truly random fractals are ^This researc h was supporte d by the National Science s generated , for example, by simulating fractional . Preliminary Foundation under Grant No. CCR-8702752 Brownian motion and then using rendering techd at ICALP'91, Madrid, version of this paper has been presente s niques [ 18 ]. In this way realistic looking landscape Spain. Reprinted from Comput. & Graphics Vol. 17, No. 4, pag. 465-486, 1993
362
K. CuLiK II and S. D U B E
of mountainous terrains and rivers have been obtained. For the random fractals every run of the same generating program produces a different image of the same character, unless one uses a pseudo-rando m generato r with a fixed seed. Therefore group 3 methods do not seem suitable for image compression . A number of methods belonging to group 2 are automata-theoretic . Specifically, we would like to mention that strings over alphabet 2„ = {0, .. ., « - 1} can be interpreted as rational numbers in [0, 1] and hence regular sets over S„ interpreted as subsets of [0, 1] as was done already in the 60s [19, 21]. Extending this method fractals can be defined by rational expressions, finite automata , or equivalent devices, see [14, 16, 22] for images of finite resolution and[15] for the extension of this method to limiting attractors and, more importantly, to texture-image s generate d by probabilistic finite automata (generators) . In[23] we have shown that these methods (both deterministic and probabilistic) are a special case of the MRFS considered here and that the conversion of the finite automata to MRFS gives about tenfold speed-u p of the generating algorithm. In this paper we develop a new deterministic method (group 2) that could be used to generate apparently random complex real world images that might look like the ones produced by the methods of group 3. The idea is to generate such irregular images by simulating deterministic chaos in a controlled manner. The welldeveloped automata theory is applied for this purpose. The important aspect is that the rules (the sizes of the description) are relatively simple, however, the behavior of the dynamical system, generating the image, is complex. In some image generation systems (^.^.[12, 13]) one has a post-processin g phase called rendering, which uses some images like flowers, leaves, etc., not created by the system. However, in the method described in this paper all these additional images are also created by the same system. The organization of this paper is as follows. In Section 2, we formalize the notion of an image and present basic definitions. In Section 3, we briefly discuss some known methods to generate images, which include finite generator s and mutually recursive function systems. In Section 4, we illustrate why the IFS method is not suitable for the generation of irregular images. This leads to the developmen t of a simple technique that allows one to obtain an irregular version, as the attractor of a suitable MRFS, of any object defined by an IFS. In Section 5, we generalize the MRFS by imposing control on the sequencin g of the computations . We call this generalizatio n as Controlled MRFS. We illustrate in Section 6, by giving some examples , that this makes the design of natural images much more convenient and the description more concise. However, surprisingly, we show that if the set of the control sequences is regular then the power of MRFS is not increased . In Section 7, we generalize the control se-
quences to texture images. In Section 8, we make concluding remarks. Actually, it is clear from this work that all the methods fitting into group 2 can be simulated by Controlled MRFS. In particular, for the simulation of DOL-systems by Controlled MRFS see [24]. 2. PRELIMINARIES AND DEFINITIONS
2.1. Two notions of an image See[3] for the definition of basic concepts from the theory of metric spaces and measures . In this paper, we will be concerne d with the 2-D Euclidean plane as the underlying complete metric space. In fact, one can work with the unit square U = [0, 1]^ as the underlying space X without any loss of generality. The set of Borel subsets ^ is the c-field generate d from the open subsets of X, by the Boolean operations of complementatio n and countable union. A measure n on Borel subsets is a real non-negative function ii: 5B ^^ [0, co) that is additive on a countable union of pair-wise disjoint Borel sets. If M ( ^ ) = 1, then IJL is called normalized. If we want to make precise statement s about images and accuracy of their approximations we need to formalize the notion of an image and of the distance between two images. Following [ 3 ], we will consider two kinds of images, each type with finite or infinite resolution. Consider a complete metric space X with metric d. Typically X will be the unit square of 2-dimensiona l Euclidean space. 1. A c-image of infinite resolution is a compact subset ofX. It formalizes a black-and-white image (no grey tones). 2. A c-image of finite resolution is a map 7 : C -*- {0, 1}, where 2 is a set of pixels and y(p) = 0(1) means that pixel p is assigne d white (black), respectively. The set of compact subsets of X (c-images) is denoted by ^(X). Endowed with the HausdorfF metric it forms a complete metric space [ 3 ]. Similarly, we have two notions of a texture image (/image): 3. A /-image (greyscale image) of infinite resolution is a normalized Borel measure on space X. It formalizes the distribution of greyness over X. For a color image (in RGB representation ) we specify three measure s one for each basic color component . 4. A /-image of finite resolution is a map ^ : Q^*- [0, 1] where C is a set of pixels and IJL{P) is interpreted as grey tone of the pixel p. For a color image, we need three functions. The set of all normalized Borel measure s on X(/-images) is denoted by P ( X ). Endowed with the Hutchinson metric it forms a complete metric space [ 3 ]. A /-image O is formalized as a normalized measure such that IJL{0) = 1. Informally, the image O can be viewed as a distribution of infinitely fine sand, of total mass one, lying upon its support (support of ^ is the set of all those points in X whose all (-neighborhoo d
363
Balancing order and chaos in image generation Table 1. Two notions of an image. Type of image c-image
black-and-white
t-image
texture (greyscale )
Resolution
Definition
finite infinite finite infinite
y: Pixels -^ {0, 1} compact subset fx: Pixels-*- [0, 1] normalized measure
balls, € > 0, have nonzero measure) . The measure (greyness ) of a Borel subset of 5 of X is the mass of sand which lies upon B. See Table 1 for the summary of the two notions of an image. 2.2. Languages of infinite words We assume that the reader is familiar with the basic automata theory, which includes definition of finite automata and regular sets. A language is a set of strings over some alphabet of symbols. In formal language theory, the computation domain is the language 2* of all finite strings over a finite alphabet 2. This domain can be extended by adding the set of infinit e strings 2*^[24]. Formally, 2'^ denotes all infinit e (co-length) strings a = ^i«2«3 • • •, <2/ E 2, over 2. A n element a of 2'^ is called an co-word or ui-string. An o)-language is any subset of 2 '^. The superscript co means infinit e repetition, e.g., (00 )* 1 '^ denotes an co-set of strings that has an even number of zeroes followed by an infinit e number of consecutive ones. 3. TOOLS FOR GENERATING IMAGES 3.1. (Probabilistic) ftnite generators We briefly discuss how finite generators can be used to represen t images [15]. Considering binary notation, a string over alphabet 2 = { ( 0 , 0 ) , (0, 1 ) , ( 1 , 0 ) , ( 1, 1 ) } , say (0, 1)(1, 1)(1, 0 ), is interpreted as a 2-D point (0.011, 0.110), which is the lower left corner of the shaded subsquar e in Fig. 1. Correspondingly , an co-word is interpreted as a 2-D point with real coordinates. Finally, the 2-D image represente d by a regular set i? c 2* is the set of 2-D points obtained by interpreting adherenc e {R). The adherenc e of a language L is the set of co-strings that are algebraic limit s of prefixes of L , formally adherenc e ( L ) = { w E 2'^|Prefix (H^) c Prefix(L)} , see[24]. This regular set R can be effectively given as aftnite generator ( F G) or a rational expression [15]. For example, the rational expression 2* represent s the unit square ^ = [0, 1]^, and the rational expression
Metric Hausdorflf metric Hutchinson metric
probability of a path means the product of the probabilities on its transitions) labeled by w in M. For example the string (0, 1)(1, 1)(1, 0) specifies the subsquar e shown in Fig. 1. Its measure is the multiple of the three probabilities associate d with the path (0, 1)(1, 1)(1, 0) in the PFG representin g the given image. I n [ 1 5 ] , it is shown that ( P ) FG are special case of ( P ) M R F S, which we discuss in the next subsection . 3.2. Mutually recursive ft^nction systems MRFS were introduced in [23] as a generalization of IFS [ 3 ] , where also their equivalence with affine automata and afiine regular sets was proved. We will informally define an MRFS and state a theorem about the existence and uniquenes s of its attractor. We first explain the meaning of the following notions in the definition of MRFS. A variable is a symbol whose "value" is a c-image. Some variables are marked as "display" variables. A n equation is a rule of the form A = w,{B,)^
W2(B2)U'
'
'UWn{B„)
stating that execution of the rule updates the value of A to be the union of the (current) values of variables Bi, B2, . . ., B„ under affine transformations Wi, W2, . . . , w„, respectively. A Mutually Recursive Function System (MRFS) is a system ofn equations defined for n variables, exactly one equation for each variable. A n MRFS M defined for n variables can be represented by a digraph G with n nodes, each representin g a variable. Let ^ 1 , ^ 2, . • •, ^« be the n variables, and let node Vj represent s variable ^ / , 1 < i < n. Then, if Ai is defined by the equation
p = { ( 0 , 0 ) + ( 0 , 1 )+ ( 1 , 0 ) } * represent s the classic Sierpinski triangle. A probabilistic FG (PFG) M defines a ^image, where the greyness of the image is given by defining measure on a countable base of Borel subsets , namely, the set of all subsquare s specified by the strings in 2* (a string w speciftes the square represente d by the regular set W' 2 * ) . The greyness of the square specified by string w is the sum of the probabilities of all the paths (the
Fig. 1. The subsquar e specified by the string (0, 1)(1, 1) (1,0).
364
K. CULIK II and S. DUBE
then Vi has incoming transitions from Vj^, Vj^, . . ., Vj^, which are labeled with affine transformation s w,,, vv/j, . . ., Wj^, respectively. If there exists a unique assignmen t of values, say A\, A'2,..., A'n, to variables^1, ^2, • • •, ^«, respectively, which remains invariant under one single application of the mutually recursive equations , then these values constitute a fixed point of this system of equations. Now, we give a condition for the existence and uniquenes s of this fixed point. An MRFS Mi s called loop contractive if the product of the contractivity factors of the transformation s labeling any loop in the underlying digraph G of M is strictly less than one. Theorem 1: An MRFS has a unique attractor if it is loop contractive. For proof see[25]. Let D c [A^, A2, . . ., A„} be the set of display variables. Then, The Attractor of M = U A'i. This attractor is the c-image defined by M. In other words, the attractor of Mean be expresse d in terms of the unique fixed point (^'1, ^ 2 , .. ., ^'„) of the natural mapping W: {^{X)Y -^ (^{X)Y defined by M. The c-image defined by M can be computed by the following Deterministic Algorithm.
for all 5 G ^ (Recall that 5B is the set of all Borel subsets ofX) . Consider an MRFS and its underlying digraph G. By labeling the edges of the digraph G with probabilities, so they sum up to one of all the incoming edges for each node, we obtain a probabilistic MRFS (PMRFS). We also define a final distribution function / from the set of variables {Ai, A2, ..., A„} to the n
unit real interval [0, 1], such that 2 / ( ^ / ) = 1. Just /=i
as an MRFS defines a unique c-image, which is the fixed point of the equations , a PMRFS defines a unique ^image in terms of the fixed point of the equations now interpreted as in Eq. (1) with respect to the complete metric space of normalized Borel measure s with Hutchinson metric. Let a PMRFS M have n variables Ai, A2, ..., A„. Then there exists a unique assignmen t of values (timages) jn^. to each variable Aj, i = 1, 2, . . ., «, such that it remains invariant under one application of equations, where an equation is applied as in Eq. (1). Then, the /-image HM defined by M is the weighted sum of these n /-images according to the final distribution / : MM(^) = 2 / ( ^ / ) M ^ . ( ^ ),
where B is any Borel subset. d The support of this /-image IIM can be approximate • Initialization: Choose arbitrary nonempty compact by the Chaos Game Algorithm. Consider the digraph , in which subsets of the underlying complete metric space X of M and view it as a systolic architecture r with the compu(the unit square U = [0, 1]^) as initial "values" of each node is like a simple processo tational capability of applying an affine transformation the n variables. • Iterations: Apply the n mutually recursive definitions to a point. Initially, each node "stores" some random of these variables iteratively to compute their new point in y^. Then at each iteration step, all node synchronously recompute their stored point. This updating values. This is done for m > 0 iteration steps. is done as follows. Each node randomly chooses an The union of the limiting values of display variables incoming transition (and therefore a neighbor conwhen m -> 00 is the c-image defined by M. nected by the transition) according to the given probabilities on the incoming transitions, and applies the 3.3. Probabilistic MRFS transformation labeling the selected transition on the Now a variable ^ is a symbol whose value is a t- point stored in the neighboring node. Let the total image, i.e., a normalized measure on Borel subsets of number of iterations done be m. Let GA = {^1, ^2, X. To emphasiz e that it is a /-image, we will denote . .., Xn,} he the collection of all the points generate d this value by fiA. An equation of the form at node (variable) ^ . Then GA is an approximation of the support of the /-image IIA defined by A. To compute this /-image as a measure , we generalize A = w,{C,)U W2{C2)U' "U w„{C„) the Chaos Game Algorithm to the Hit Counting Alhas n associate d probabilitiesPi,p2, • • • ,Pn summing gorithm, in which we keep a count of the number of to unity, and indicating the "weight" of the contri- points that fall inside a Borel subset (here we can work bution of each of the ^images ^c,, MCZ. • •» Mc„ re- with a countable base of the set of Borel subsets [ 3 ]). The measure (/-image) M^ defined by A is given by spectively, in the computation of^. Mathematically speaking, ix^ is computed to be the weighted sum of the values of Ci, C2, . . ., C„, I1A(B) = Iim —^,
«-Qo m HAiB)= 1: PiUc^iwrHB))
(1)
where m^ = | G^ H 51 and B is any Borel subset ofX.
365
Balancing order and chaos in image generatio n The support of the ^image HM is the c-image defined by M when probabilities are ignored and M is viewed asanMRFS[23].
Example 1: The well-known Sierpinski triangle is generated by an IFS with the following three affine transformations: wi(x, y) = (0.5x, 0.5>^),
3.4. MRFS as generalization oflFS An iterated function system (IFS) is nothing but an MRFS defined for exactly one variable. Call this variable A. There is exactly one equation for A. Let it be A = Wi{A)Uw2(A)U'
^^2{x,y)= (0.5JC + 0.5, 0.5>^), H^3(-^, y) = (0.5x, 0.5y + 0.5). Since IFS are a special case of MRFS when there is just one variable, an equivalent MRFS is defined for a variable A and has the equation
• -Uw^iA)
for some contractive affine transformation s Wi,W2,..., Wjs^. For /-images, one associate s a probability pi with
A = Wi(A)U W2{A)U WsiA).
N
Wi, such that 2 A = 1- This also implies that the /=i
underlying digraph of this IFS consists of a single node with iV self-loops, labeled with the transformation s Wi, W2, . . ., WAT and having probabilities (for the Chaos Game Algorithm)pi,pi, • - •,PNIn [ 15 ], incomparability of IFS and PFG is shown. Since MRFS are generaUzation s of both IFS and PGF[15, 23], we have the following result. Lemma 1. The class of images defined by IFS is a proper subset of the one defined by MRFS.
First 9 steps of the Deterministic Algorithm starting from the filled unit square are shown in Fig. 2, and similarly first 9 steps from two line segment s are shown in Fig. 3. In Fig. 4a, we show 50000 points approximation of Sierpinski triangle, generate d by the Chaos Game Algorithm, first with uniform probability (greyness) distribution, i.e., P\ = P2 = P3 , and then in Fig. 4b with probabilities pi = 0A5, p2 = 0.3, p^ = 0.55. The Hit Counting Algorithm will give an approximation of the r-image of the Sierpinski triangle in both cases . D
Kpy^r^vhi.
IK IK
1^1^ l^k ^k l^k
rt.
Ck ^^ Fw rw
£V
Fv^ cv
Fig. 2. Sierpinski triangle starting fromfilled square .
KK
PV
QV
EL.
366
K. CuLiK II and S. DUBE
M
\A AA
//VWUAA
MA A( ' ' ' .
iAA 'A ' ' 'A
P-, pK^
pyfeh
^y^K
^^b^k P^^ fa^ ^
ai. ^
^
^
^
Ssv
^
Kk
KK
KK
KK
^kh Ek
Fig. 3. Sierpinski triangle starting from two line segments .
Example 2: Figure 5 shows a complex recursive image and the PMRFS that generate s it. An equivalent MRFS is given by the following equations: t = left(0 U right(0 U trunk(/) segment = up (segment) U down (segment) circle = point (circle) U rotate (circle) ) U /?(circle) tree = i d ( 0 U <2(segment U c(tree) U c(shadow) shadow = sh(tree) Clearly, this multivariable MRFS defines an image not definable by an IFS. In Subsection 4.1, we show that MRFS can encode some irregular images more efficiently than IFS. Example 2 shows that this is the case also for regular recursively defined images. D 4. GENERATING RANDOM FRACTALS
First we show how Barnsley's IFS method can be possibly used to generate random (irregular) images by using a random number generator. Since, we have two algorithms—the Deterministic Algorithm and the Chaos Game Algorithm, we need to investigate how each can be modified to generate random fractals. The basic idea behind the generation of random fractals by IFS is to have coefficients of each affine
transformation to be dependen t on some paramete r / that takes values from a real interval, for example, the unit interval [0, 1 ]. Now though the Deterministic Al gorithm is an iterative algorithm, it can be naturally implemented by a recursive algorithm, which builds the image in a bottom-up fashion as shown in Fig, 6. The value of paramete r / is randomly chosen at each recursive call, the coefficients of each affine transformation are recomputed , and the resulting affine transformation is applied. One has to ensure that for each value of t, the transformations are contractive. The value of DEPTH should be chosen large enough to obtain an image with fine details, and the algorithm should be initiall y called with / = 0. Essentially the same idea works for the Chaos Game Algorithm. The reason why Chaos Game Algorithm generates a sequenc e of points approximating the attractor of (7, is that for each point a in the attractor of G, it applies infinitely many prefixes of its address a (see [3] for the definition of address of a point) to some point in X. Thus, every neighborhood of a is visited infinitely many times with almost one probability . A straightforward modification of the algorithm Random IFS shown in Fig. 6 allows us to generate a set of points by approximating an address by its finite prefix of length equal to DEPTH. The application of these prefixes to arbitrary points in X gives one an approximation to the image defined by G. But since we
Balancing order and chaos in image generatio n
The aim of this section is to show that MRFS can be used to generate images in a purely deterministic manner that have some apparently random or chaotic properties. We now show one of the ways by which irregularity or randomnes s can be added to "pure" fractals. Let O be a "regular" object defined by the following IFS
KrwcwK.
Ck
r^
Kk.
BiL
gKfeKfe>tM>.
367
tKftKhKKK.
P^. Sfek p w
PK
A = Wi(A)U W2(A)U' ' '[Jw„{A). CkKkEkKW
cw
rv.
Ck Ck
k
Jk SikO^hi.
?k
Kk
bwk.krkCkk.rkfck
(a)
To obtain an irregular version of (9, we define an MRFS M with several variables that are defined in terms of each other in some arbitrary fashion and by using affine transformations that are "slightly" different from Wi, . . ., w„. Two affine transformation s are slightly different from each other if their correspondin g coefficients differ by a small amount, i.e., if Wi(x, y) = [a\iX-\- any -^ aU, a^iX-\- a^y + ^23] and H^2(X,3^) = la]ix + a]2y + «i3, ^hx + ^22^^ + ^23], then they are said to be e-different if \a]j — ajj\ < e, where e is a small number. Suppose , MRFSMhas m variables^1 ,A2,.. . ,An, where each of the variables is updated by the equation of the form A, = w^.iAj,) U w,,iAj,)U' . -U w,„(4J where Wi^ and Wk are 6-different for some small number e. One of the m variables is marked as a display variable. Let O'he the attractor of M. Then, O' can be regarded as an irregular version of O that retains the character istics of O but has some level of irregularity in it. If €
(b)
Fig. 4. Sierpinski triangle generate d by the chaos game algorithm.
are applying slightly different transformation s at each recursive call, thus we will obtain an irregular or random version of the attractor of G. Note that if we plot m points using this algorithm, then we are approximating the attractor of the IFS by prefixes of length O(logivm), whereas in the case of the Chaos Game Algorithm, an address is approximate d by a prefix of length 0(m). The randomized Chaos Game Algorithm loses its sequentia l nature and it is therefore more difficult to implement. 4.1. Defining irregular images by MRFS The previous discussion indicatesthat it is desirable to develop simpler methods to generate irregular images, in particular it would be more desirable to have a purely deterministic method that does not use any random number generator .
Fig. 5. A tree with a hanging mirror.
368
K. CULIK II a n d S. DUBE
A l g o r i t h m R a n d o m l FS (i) ** D E P TH is the maximum recursion depth * * u?i(<), W2{t),..., if i = DEPTH
WN^t) are N parameterize d transformations
t h e n r e t u r n (arbitrary c-image);
else for each z € { 1 , 2 , . .. ,iV } do choose randomly a value of t, Ai = iwi{t))
4.2. Examples of irregular images generated by MRFS In this subsection , we combine the technique described above with some others to achieve deterministic chaos causing the desired irregularity. Example 3: Consider the self-similar tree shown in Fig. 7c generate d by the repetitive application of the equation
(RandomIFS(i + 1));
r e t u r n ( A i U A2 U . . . U AN);
A=
Wi{A)UWriA)Uw,(A)
e n d RandomlFS;
Fig. 6. A recursive IFS algorithm to generat e random fractals. where w/, Wr and Wt stand for transformation s generating the left branch, the right branch and the trunk, respectively. See Fig. 7a for the underlying digraph of the correspondin g MRFS (which is also an IFS) definis chosen to be sufficiently small then h(0,0') will be ing this image. less than b where 5 is a small number. This follows To obtain a '^chaotic" tree we consider transforfrom the following theorem, which can be extended to mations obtained from w/and w^, (but keeping the trunk ^images as well. This theorem can be proved by ex- same) by changing slightly their coefficients such that tending a similar theorem for IFS in [ 3 ]. the angle and the length of the left and right branches in each case are slightly different. In addition, we might Theorem 2: Let M be an MRFS. Let the affine trans- choose to "flip " a branch, which will yield even more formations ofM depend on a parameter p, which takes irregularity. Other methods for the generation of ird in [12, 27]. the values from a closed interval of reals, such that for regular trees have been discusse all these values the loop contractivity condition is satIn our example, we have chosen an MRFS with three isfied. Then, the at tract or of M depends continuously variables ^ 1, A2 and A3, which are mutually recursively on p with respect to the Hausdorff metric. defined in terms of each other, as shown in Fig. 7b.
(a)
(c)
(d)
Fig. 7. Generatin g "chaotic" trees by MRFS. (a) MRFS for a "regular" tree; (b) MRFS for an "irregular" tree; (c) a "regular" tree; (d) an "irregular" version of the tree in (c).
369
Balancing order and chaos in image generatio n
contraction factor of the x-coordinate, s is the contraction factor of the >;-coordinate , 6 is the angle through which the jc-axis is rotated, cf) is the angle through which the >^-axis is rotated, e is the translation in the x-direction and / i s the translation in the ydirection. That is, the point (x, y) is mapped by the affine transformation to the point
We have chosen Ai to be the display variable. The attractor is shown in Fig. 7d. The arrangemen t of branches in this tree clearly follows a pattern that has both order and chaos. In Fig. 8a, a row of such chaotic trees with hanging mirrors is shown. This image can be generate d by an MRFS, however, it was actually produced more efficiently using a control string discusse d in the next section. In Fig. 8b, we have shown an MRFS that will generate such a row consisting of regular trees. D
{rcos(d)' X - s sin((/))- y -\- e, rsm(d)' X -\- scos((f))'
Example 4: In this example, we first give an IFS defining a rather natural-looking tree. The IFS is specified by six affine transformations—tw o for the trunk and one for each of the four branches . This tree is shown in Fig. 9a. Though this tree looks much better than the one in Fig. 7c, it should be noted that the tree is perfectly regular. MRFS can not only add some level of disorder but also remove the pattern "two branches on the left, two on the right." The same technique as the one used in Fig. 7 is employed to come up with such an MRFS. The resulting tree is shown in Fig. 9b. We give the specific parameter s used in this example. An affine transformation can be completely specified by six parameter s r, 5, 6, 0, e and /, where r is the
y-\-f).
Using the above notation, the tree in Fig. 9a is generate d by the first six affine transformation s shown in Table 2. The transformation s to and ti give the trunk, /i and I2 the lower and upper left branches respectively, and ri and rj the lower and upper right branches , respectively. For Fig. 9b, we have used five more transformations—^3 for a middle branch on the right, /'i as a slight variation of A, /i and 12 of I2, and ^2 of ^2. The tree is generate d by and MRFS defined on four variables A, B, C, and D, out of which A is the display variable. These variables are mutually recursively defined as follows:
\
(a)
trunk
bottom
(b) g a row of Fig. 8. Generatin g "chaotic" trees by MRFS. (a) a row of chaotic trees; (b) MRFS for generatin "regular" trees.
370
K. CULiK II and S. DUBE
(a)
(b)
Fig. 9. Another example of chaotic trees by MRFS.
A=
to{D)UtdD)UldB)Ur,(C) Ul2{D)Ur2(D) B = toiD) U tdD) U 1\{B) U r2iA) U r,(D) C=to(D)UtdD)Ul'i(D)Ur'2iB)
D=
to(D)UtdD)Uh(D)Ur,iD) Ul'2(A)Ur'2{A)
Note that A, B,C, and D define tree with four, three, two, and four (main) branches , respectively. Since they are mutually recursively defined, and we have chosen additional transformations , which only differ from the original ones slightly, the tree in Fig. 9b is more irregular than the one in Fig. 9a and does not have "two branches on the left, two branches on the right" pattern. D Finally, we give two techniques by which a large number of basic "textures" as studied in computer graphics can be generated .
rotation by a degrees . The specific rotations used in the rules of Fig. 10 have been chosen randomly. By choosing simple random initial conditions and running several steps of the deterministic MRFS algorithm for either one or successivel y both above systems one can rapidly obtain a wide variety of "textures," which, especially in colors, are very intriguing. Some of them are shown in Fig. 12. They sugges t a great potential for using these methods for simulating basic textures in computer graphics. Similar to the chaotic tree in Fig. 7b we are getting a right mixture of chaos and order. D 5. CONTROLLED MRFS
In the previous section, we demonstrate d how we can achieve a balance of order and disorder by MRFS. In this section, we introduce a simple technique that is so much more convenient to define real-world images that at first glance it would appear that it is more powerful. The essenc e of the technique is to apply MRFS in a sequenc e determined by finite control. We start with some definitions. Example 5: Two simple square subdivision MRFS are A simple initial condition is any finite resolution shown in Figs. 10 and 11. The former just subdivides squares into quadrants with some deterministic, but image that we would like to assign to a variable initially. essentially chaotic, rotations, the latter resemble s Therefore, it is a finite set of lines and filled or unfilled "weaving." Notation r^{X„) in Fig. 10 means clockwise polygons. Let ^ be a variable. Then an equation of the following special form Table 2. Affine transformation s used in Example 4.
Transformation to
U
/. h r\ rj
r^
/'. I'l I'l r'l
r .05 .05 .6 .5 .55 .5 .55 .62 .48 .52 .55
s .6 - .5 .5 .45 .4 .55 .4 .53 .43 .46 .5
6
0
e
/
0 0 40 20 - 40 - 30 -35 36 23 18 - 28
0 0 40 20 - 40 - 30 -35 36 23 18 - 28
0 0 0 .05 0 -.02 0 0 0 0 0
0 1 .6 1.05 .7 1 .85 .6 1.1 1.1 1
where ^^ is some arbitrary simple initial condition is called an initializing equation. Every variable has a default value that is the filled unit square ^ = [0, 1] X [0, 1] (for 2-D images), the underlying compact space X. This default value changes when an equation (possibly an initializing equation) with the variable on its L.H.S. is applied. A label is a symbol that simply labels an equation. The same symbol can be used to label more than one equation but no two equations labeled by this symbol can have same variable on their L.H.S. Also, an equa-
371
Balancing order and chaos in image generation
Fig. 10. Simple textures.
tion can be labeled by more than one symbol. If the symbol a labels an equation e, then we write it as:
then, 7 labels equations with affine transformation s that are compositions of affine transformation s in equations denoted by a and /?,
Executing a label means simultaneou s execution of all the equations labeled by it. The image obtained by this execution is the union of the values of the display variables after the execution. Example 6: Let a and ^ be any two labels. Then, there exists a label 7 such that executing 7 is equivalent to executing first /? and then a. As an example, if ^:A = wM) U W2(5), ^\B
y:B=
r27o{Bn) r9o(Cn)
ri80{An) Bn+l
risoiAn)
w^iE),
D
Example 7: Consider two labels a and P, a : A = Wi(B), ^:A
a : B = W2(C)
= W3iD),^:C=
W4iA)
Now, in total, there are four variables A, B, C, and D. Using identity equations, one could have defined
a:A = We{A), a:B = Wj(B) U Ws{E)
A.+i =
w-j{w2(A)) U W7(W4(C)) U
y:D=Ws{A).
= w^{A) U w^{C),
^iD^WsiA)
id(Cn)
y :A = We(Wi(A)) U We{w2{B)),
id(A. )
ri8o{An)
=
id(B.)
^ n+
MCn)
r27o{Bn)
riso(Cn) ^270 (C'n)
Fig. 11. A tiling pattern generate d by a finite control string.
372
K. CULIK II and S. DUBE
Fig. 12. Simple textures.
a and /? such that they label equations for all these four variables, a\A
= w^(B),
a:B=W2(C), a:D
p:A
= Wi(D),
a\C=id(C), Control String: There are two cases depending on whether the control string is finite or infinite.
= id(D)
p:C=W4(A),
M defines a c-image obtained by executing the labels in 2 in a sequenc e determined by the controlling string or set as follows.
f3 : B =
id(B),
(3:D = id{D) Therefore, one can consider a normal form of labels in which a label labels exactly one equation for each and every variable. D 5.1. Definition of controlled MRFS A Controlled MRFS is a set of finitely many labeled equations with a control string or a control set over the set of labels. A control string can be finite or infinite, and we restrict ourselves to regular control sets. I n other words, a Controlled MRFS M i s completely specified by: 1. A finite set of equations E. 2. A finite set of labels 2. 3. A labeling relation I ^ i: X E such that (a, e) B I if « labels equation e. 4. A controlling component, which is either a finite control string s E S*, or an infinit e control string p G 2*^, or a regular control set R ^ 2* .
1. A finite control string s = aiaj' • •«„ G 2* is a finite sequenc e of labels. Then executing a 10:2 * * •«« means executing the labels one after another from right to left. The c-image defined by Af with control string s is denoted by I(M, s). 2. An infinit e control string p = Q:ia2«3' • ' E 2*^ is an w-sequenc e of labels. The c-image defined by M with control string p, denoted by I(M, p ), is the limi t of the images defined by executing longer and longer prefixes of p, i.e., I(M,
p) = li m I{M, a^aj* • -aj).
Control Set: There are two cases depending on whether the control set is finite or infinite. 1. A finite control set is a finite set F ^ 2* , and the image defined by M with control set F is I(M,F)
=
^S^FI{M,S).
373
Balancing order and chaos in image generation 2. An infinit e control set is an infinit e regular set R ^ 2*, and the image defined by M with control set R is
generate d by different transformations . Consider the regular control set R = {« +
I{M,R)=
U
/?}* .
I(M,p).
p e adherence (i?)
Example 8: The intermediate approximations of Sierpinski triangle in Fig. 2 are generate d by Controlled MRFS with control strings of the form a", « > 0, where a labels the equation
Note that any co-string in { a + /?} '^ defines an irregular tree. Therefore, the image defined by the Controlled MRFS with control set i?, is a union of infinitely many such irregular trees. However, since we have chosen the trunk affine transformation to be same for both a and /3, this union is a single irregular tree. Note that in this tree a branch gets divided into four branches . D
A = Wi(A) U W2(A) U WsiA) where Wi, W2, and W3 are given in Example 1. In Fig. 3, the control strings are of the form a"\,n>i 0, where X labels an initializing equation that assigns two line segments to ^ . D Example 9: In Fig. 13, a tilin g pattern is shown. This image is generate d by 5 steps of Deterministic Algorithm on "mixing squares " MRFS M shown in Fig. 10, with appropriate initial values of variables. An equivalent representatio n is a Controlled MRFS with the finite control string a^X, where a labels the equations of M, and X is a label of initializing equations that assigns an unfilled polygon to A, and filled polygons to B and C. If jS denotes the equation for "weaving" MRFS shown in Fig. 11, then each of the basic textures shown in Fig. 12 can be generate d by a Controlled MRFS with a finite control string 5 E { a + 13}* X, where X assigns some appropriate initial condition for each basic texture image. D Example 10: Let a and ^ be two labels of denoting some equations over some variables, such that the corresponding Controlled MRFS with control strings a'^ and jS'^ both define irregular trees using the technique described in Example 3, and illustrated in Fig. 7. Assume that in both trees the trunk is generate d by the same transformation while left and right subtrees are
•^TiyMTMTrxV
^•^^TT^^^^XXg3X^TgS^^^XTg3^^^83^^T^g3><^I^iSM^^X^^X83XXXH^5^^^ XI^3^<83iXiSXXXgSiH^J(Xi^X]^<^2i^2iXM^XX MXTCiM^Ji^^^^^^TX^XiM>JiX^4^^XXSXi63^4TT M63^M^X^^gSS9XMl^XXX63^XMiSSXXX^
i^i
Example 11: Let M b e an MRFS defined on n variables. Define a Controlled MRFS M' by labeling n mutually recursive equations for these variables by a, and letting a* to be the control set. Then, the Controlled MRFS M' is equivalent to the MRFS M. Note that adherence ( a* ) = {«'^} , and I(M', a"^) is precisely the image defined by the Deterministic Algorithm on M. D The above example also proves the following obvious lemma. However, we provide a totally different proof which is interesting by itself Lemma 2 : Let M be an MRFS. equivalent Controlled MRFS.
Then there exists an
Proof: Consider the underlying digraph G of M . For each arc in G do the following. Let the arc be from variable ^ to ^ and labeled with affine transformation w. Then, create an equation B = w{A) and a label a, and let a label the equation B = w{A). Thus, in total, we create n equations and n labels, where n is the total number of arcs in G. Now convert G into the transition diagram of a finite automaton Mi such that if there is an arc in G from A to B labeled by the affine transformation w, then there is a transition from 5 to ^ in M i , which is labeled by the symbol, e.g., a, labeling the equation B = w(A). Create an initial state and place transitions from it to each display variable of Af on e (null string) symbol. Let R be the regular set accepted by Mi over the alphabet of labels. Now define a Controlled MRFS M2 with these n equations and n labels, and with control set R. From the definition of the c-image defined by a Controlled MRFS and by an MRFS, the equivalence of M and M2 follows. D Example 12: Consider two labels a and /?, a:A
=
Wi{A)Uw2(A)
^:A
= w,{A)
Then the Controlled MRFS with infinit e control string jSa'^ is equivalent to the Controlled MRFS with infinit e control string 7'^, where y : A = Wi(A) U W2{A),
Fig. 13. A tiling pattern generate d by a finite control string.
y : B = w^iA)
and B is the display variable. This example along with Example 6 shows that any Controlled MRFS with in-
374
K. CULIK II and S. DUBE
finite control string of the form 131^2' * * /5««'^ is equiv-X2, and X3, respectively, one being the unit filled alent to some other Controlled MRFS with infinite square, and the other two being filled triangles: control string of the form y'^. D Xi = {(a,b)G[0, l ] 2 | 0 < ^, Z7< 1}, 5.2. Some basic results on controlled MRFS X2= {(a,b)G[0, \]^\a-\-b< 1}, A simple initial condition is like a "constant" that we would like to assign to a variable initially. In this X3= {(fl,/7)E[0 , lf\a>b}. D subsection , we show that these constants can themselves be generate d by MRFS (and finite generators) , Lemma 3. Let C be a simple initial condition. Then and therefore one can work only with variables. In there exists an FG M which defines C (and therefore, other words, theoretically speaking, there is no need C is the attractor of an MRFS M'). of initializing equations . A generalized sequential machine (GSM) is a 6-tuple Proof: Since C is a simple initial condition, it is a finite s and filled or M = ( 2, 2, A, 5, ^0, ^ ) , where Q, 2 and A are the union of finite resolution line segment states, input alphabet and output alphabet, respectively, unfilled polygons. Since FG's are closed under finite 5 is a mapping from (2 X 2 to finite subsets of Q X union, it suffices to show that afilled triangle can always d by an FG. The argument for an unfilled A* , Qo is the initial state, and F is the set of final states. be represente t parallels the following arThe interpretation of (p, w) in 8{q, a) is that M in triangle or a line segmen state q with input symbol a may, as one possible choice gument for a filled triangle. of move, enter state p and output the string w. The However, there is a tacit assumptio n that we need domain of the transition function 5 can be extended to make explicit—we are considering a triangle with to Q X 2* in the straightforward manner. Let M{x), rational end-points. So assume that a triangle AABC where M is a GSM as defined above, denote the set is specified by its three rational end-points A, B, and C. Now consider any triangle for which an FG is known to exist. For example, consider the lower left triangular M{x) = {y\(p, y) is in 5{qo, x) for somep in F}. part of the unit square, i.e., the one with the endpoints A' = (0,0), 5' = (0, l ) a n d C' = (1, 0). There is an A GSM defines a relation p c S* x A* FG representin g this triangle from Example 13. Now AABC can be considere d as the image of AA'B'C unp= {(x , y) IJC E 2*, y e Mix)}. der an affine transformation w with rational coefficients. From Theorem 3, since affine transformation s Regular language s are preserve d under GSM mapping, with rational coefficients can be implemented by GSM, i.e., if L is a regular language then M(L ) is also regular. there exists a GSM M implementing w. Therefore, if Now, we shall prove the observation that a finite p is the rational expressio n for AA'B'C\ an FG equivunion of line segment s and polygons can be defined alent to the rational expressio n M(p) defines AABC. by a Finite Generato r (FG). For this, we need the folIt shoul d be note d that a triangl e with real end-points lowing result from[ 15]. can be defined by an MRFS. Let AABC be the given Theorem 3: Let T : [0, 1]^ -^ [0, \Y be an arbitrary triangle with arbitrary real end-points and let A A'B'C affine transformation with rational coefficients. Then be some triangle that is known to be the attractor of an MRFS. Then, there exists an invertible affine transT can be implemented with a GSM M such that formation w, possibly with real coefficients, such that AABC = w{AA'B'C'). Since, the class of images deT(A{p))=A(M{p)), fined by MRFS is closed under invertible affine transformations [23 ], there exists an MRFS for A^^C. D where p is a length-preserving relation. The following theorem shows that one does not In above, A(p) denotes the image defined by p by in- really need any initializing equations . terpreting the adherenc e of p as 2-D points, as explained Lemma 4. Let M be a Controlled MRFS with finite in Subsectio n 3.1. Also, note that one can define triangles by FG's, as control string s. Then there exists a Controlled MRFS Mx with infinite control string p and a Controlled MRFS illustrated in the following example. M2 with infinite control set R, both define the same Example 13: Consider the following three rational image as defined by M, and none of the labels of Mi and M2 labels an initializing equation. expressions : A , = {(0,0) + ( 0 , l) + ( l , 0) + ( l , l ) } * , ^2= {(0, 1) + (1,0)}*(0,0)A,, A3= {(0,0) + ( l , 1)}*(1,0)A, . These expression s represen t three simple images Xi,
Proof Let Mhave variables {Ai, A2, .. •, Aj^}. Let s = a\a2' ' ' oLn. Consider a special label X that labels A^ initializing equations Ai =
UJE{\,2,
• ,N},
where U, the unit square, is the default initial value of
Balancing order and chaos in image generatio n a variable. Then M with control string sX defines the same image as defined with control string s. Consider each and every initializing equation labeled by some 0:^,7 E {1, 2, . . ., «} and let {Ci , C2, C^} be the set of simple initial conditions used on the R.H.S. of these initializing equations . Also, denote Uhy Cm+\ From Lemma 3, each C/, / E {1, 2, . . ., m + 1} is the attractor of an MRFS M,. Let Dj be the display variable of Af, (without loss of generality, it can be assume d that there is exactly one display variable in each Mi). Now replace each initializing equation Ai = Cj by Ai = id(Dj)
375
Finally, from Lemma 3, every simple initial condition can be generate d by an FG. Also, if the affine transformations consist of rational coefficients, then again the transformation s obtained from string aia2' ' •«« by taking compositions of affine transformations as we scan the labels from right to left, can be implemented by GSM. Since rational expression s are closed under finite union and GSM mappings, there exists an equivalent FG A. D An interesting implication of the above result is that all the basic textures shown in Fig. 12 can be described by rational expression s (finite generators) .
(2)
where id is the identity of transformation . Since, it can be assume d that the sets of variables are disjoint with renaming, let M be an MRFS, which is nothing but all these m + 1 MRFS considere d together. Note that M is the union of M/'s and has m + 1 display variables, one for each simple condition C/. From Lemma 2, there is a label /? and a Controlled MRFS M' with the infinite control set /?*, which defines the same image as defined by M. Let a}, 7 E {1, 2, . . ., «} and X' be new labels for all the equations labeled by aj and X, respectively, except that now initializing equations have been replaced as indicated above in Eq. (2). Define two Controlled MRFS Mi and M2 with these new set of equations and of labels. Let Mx have the infinite control string a\a'2* • -a'^X'^"^, and let M2 have the infinite control set a\ Q;2 • • • a'„X'jS*. Clearly, both Ml and M2 define the same image as defined by M. D Theorem 4: Let F be a finite control set of a Controlled MRFS. Then there exists a Controlled MRFS with an infinite control set R, an MRFS M, and an FG A s.t. F, R, M, and A are equivalent, i.e., they all define the same c-image. Proofi Let F = {su S2,.. ., SM). Therefore, the image defined by F is the union of images defined by these A/^ finitecontrol strings. For each of these A finite control strings Si, there exists an infinite control set Ri by Lemma 4. Since the class of images defined by infinite control sets are trivially closed under finite union, there exists an equivalent infinite control set R that defines the same image as defined by F. Each of these N infinite control sets Ri are of the form aia2* • •««/?*, which can be defined by an equivalent MRFS M,. This is becaus e the image defined by such a set is nothing but union of images, obtained by mapping the image defined by an MRFS equivalent to the Controlled MRFS with the control set jS* under finitely many affine transformations . These affine transformation s are obtained from the sequence of labels aia2* • • «„, by taking compositions of affine transformation s as we scan the labels from right to left. See Examples 6 and 12 for the illustration of this argument. Union of these N MRFS's gives us the equivalent MRFS M.
6. GENERATING REAL-WORLD IMAGES BY CONTROL SETS
Now, we show how control sets can be employed to , and trees generate natural images of plants, branches as shown in Figs. 14 and 15. But before we explain these examples , we will introduce the placement operation which here does the same job as is done in other systems (^.^., [ 10, 13 ]) by a post-processin g phase called rendering, which uses some images like flowers, leaves, etc., not created by the system. Without loss of generality, we will consider images which are subset of the unit square U = [0, 1] X [0, 1 ]. Let s = W1W2' ' ' w„hQ a. finitesequenc e of affine transformations , and let A be an arbitrary compact subset of U. Then, the image defined by the application of s on A, denoted by s(A), is given by s(A) = Wi(w2(' ' • w„{A)' • •)). Firstly, we make the following observation s that follow from linear algebra and coordinate geometry. Lemma 5. Let s be any sequence of affine transformations. 1. Then s{ U) is a parallelogram. 2. Let A ^ U. Then siA) c s(U) [i.e., s{A) is the placement ofa copy ofA in the parallelogram s{U)]. Lemma 6. Let X be a set of contractive affine transformations. Let s E: 1^*. Then for all x E 2*, sx{ U) ^s{U). In [22], affine regular sets are introduced and it is shown that for every MRFS there exists a correspond ing equivalent affine regular set, and vice versa. We briefly define affine regular sets below, to facilitate our discussion . . Let {vwi, W2, . . ., Wiv} be A^ affine transformations Let 2 = {1, 2, . . . , A } represen t these A^ transformations. 2 is called the underlying code alphabet. A regular set over 2 is called an affine regular set. The image defined by R is
376
K. CULIK II and S. DUBE
Fig. 14. Branches defined by control strings.
Theorem 5: Let M be an MRFS satisfying loop contract ivity. Let R be the corresponding affine regular set. Let I be the length of the longest loop in the transition diagram ofR. Then there exists a constant c depending on M, such that for all x, yGR where y is an extension ofX and \y\ > \x\ -\- cl, y{U) ^ x(U).
Fig. 15. A cactus plant defined by a control string.
For proof of the above theorem and also for a detailed characterizatio n of the attractors of MRFS in terms of parallelograms , see [28]. The above theorems suggest , for example, we can efficiently place copies of a leaf or a flower at different places in a tree provided these "positions" (or parallelograms) have some pattern so that they can be concisely given by a regular set of strings of affine transformations. Note that the generation of the background image, generation of the images to be placed, and the placing itself are all done by the same MRFS. Moreover, they sugges t a test for self-similarity. Suppose an MRFS M correspond s to an affine regular
377
Balancing order and chaos in image generation set R such that R can be written as R = i?ii?2- Then it means that the attractor of M is nothing but placement of the image defined by R2 in parallelograms specified by Ri. And if i?i is infinite, then we are placing infinitely many smaller and smaller copies of the image, i.e., the object is scale-invarian t or self-similar. It is interesting to note that a very special case of the above is Barnsley's IFS in which R = Ri= R2 = ^*, justifying our intuitive claim that the objects defined by IFS are " p u r e" fractals. Furthermore, finite generators correspond to MRFS when 2 consists of the four standard quadrant transformations. Here, the parallelogram defined by a finite sequenc e of transformations of length « is a square of size 2 "" X 2 " " . The above discussion lies at the heart of the generation of images having hierarchical structure. Such images can be more conveniently represente d by acyclic digraphs ( D A G ), depicting their hierarchical structure. Informally, a DA G control specifies the execution of labels in an order specified by the graph. The nodes of the DA G represen t labels and how many times they have to be executed. Executing a node means executing the correspondin g label appropriate number of times. That is, a node is either a", which means the label a is to be executed n times, or «*, which means a is to be executed infinitely many times (to obtain its limitin g attractor). At the lowest level we have labels for initializing equations. The nodes at the same level of the DA G can be executed in parallel (if necessary , the variables can be renamed so that the labels associate d with the nodes at the same level of the DA G label equations with pair-wise distinct left-hand sides) but if there is an arc from node v to node u then node u can be executed only after node v.
Example 14: Figures 14 and 15 are examples of some natural images, several variations of a branch and a cactus plant, respectively. The basic idea has been to define images in a hierarchical manner and with the use of deterministic chaos. Therefore, for example, the cactus plant is defined by a control set that generate s first the "thorns" and the "trunk" and then uses controlled chaos, similar to Example 3, to arrange them recursively in the self-similar pattern of a tree. The DAGs describing these images are shown in Fig. 16. Note that in Fig. 16b, we have shown two levels of branches, as in natural trees a bigger branch is made of smaller branches of possibly different structure. We describe in detail how these images are generated . First consider the branches in Fig. 14. Consider the following system of labeled equations: ao: leaf = TRIANGL E a'o : leaf = UNFILLE D TRIANGL E a : leaf = ^(leaf) U Z?(leaf) U c(leaf) U J(leaf) : leaf = shrink(\eaif) : sq = SQUARE : stem = id(sq) U ^(stem) 6:: twig = id(siem) U / ( l e a f) p : longstem = id{stQm) U ^(stem) 00: sb = /W(longstem) U A:(twig) U m(twig) U «(twig) U p(twig) U ^(twig) 0 : sb = /V/(longstem) U /:(sb) U w ( s b) U«(sb)U/?(sb)U^(sb ) ^0: mainbranch = sb 6 : mainbranch = zV/(stem) U left (sb) U right (sb) U ^0/7 (mainbranch) Note that ao, ^o and /3 label initializing equations. The variable "mainbranch" is the display variable. The
Filled Polygon
y^i (
Filled Square
Line Segment
t r u nk
Uhorns)
(a)
Any Value
GO' I stem ]
j ^1
f leaf
]
J ^2 ranch 1/
) "•2
n3ranch2)
j ^3
(b)
Fig. 16. Hierarchical nature of natural images, (a) cactus plant; (b) branch/tree .
)
378
K. CuLiK II and S. DUBE
transformations are suitably chosen and are easy to infer from the figures. The control strings for the branches shown in the figure, from top to bottom and left to right, are: Branch 1 Branch 2 Branch 3 Branch 4 Branch 5 Branch 6 Branch 7 Branch 8
d%(l)(l)opy^8y^l3a^a'o e%(t>(l>opy^dy^l3a^ao e%(l)^(f)opy^8y^p(pa^ao d%(t>^opy^h^(3a^oio d%opy^dy^p^a^ao e%(f)opy^8y^Pa''
Now refer to Fig. 15. This cactus plant is generate d by a control string over the following set of labels: ao : thorns = LINE a : thorns = a(thorns) U ^(thorns) U c(thorns) U ^(thorns) /So : stem = SQUARE /?: stem = e(stem) U/(stem) U ^(stem) U /2(stem) 70* tree 1 = stem 7o: tree2 = /(thorns) UyXLINE) y : treel = A:(treel) U /(tree2) U id (stem) y : tree2 = m(treel) U «(tree2) U icl(stem)
Proofi Consider the normal form of labels (see Example 7), in which each label denotes A^ equations , one for . The set each of the A^ variables under consideration of equations labeled by each label constitute an MRFS, and therefore, can be specified by a digraph. Let the set of labels be L = {/i , 4, . . ., /p}, and the set of variables be V. Let the digraphs representin g the label /i n Lbe G/. Let Ml be a DFA accepting R. Consider Mi accepting reversal(/?). From Mj, construct a digraph G by converting edges of M2 into nodes as follows. 1. For each edge in M2 create a node. If the edge was g node labeled with a E: L, then the correspondin is also labeled with a. Also, create a special node called the Display node, which is labeled with F. Let the set of nodes of G be VQ. 2. If w is an incoming edge of some state 5 in M2, and V is an outgoing edge of 5, then place an arc in G from the node correspondin g to u to the node corresponding to i;. 3. If u is an incoming edge of the final state of M2 (or, equivalently the initial state of Mi) , then place an arc in G from the node correspondin g to w, to the special node marked F.
The basic idea is to merge Gi^, . .., Gi^ with G, into a single digraph G' such that G' will represen t the equivalent MRFS M. The set of nodes V of G' is VG X V. Let VD ^ Fbe The control string is: the set of display variables. Then each variable (node) of G' in subset {F} X F£, is a display variable. 7So/3'/?o«'« o For each edge ^ = (w, u) of G do the following: Let / be the label of node u. Consider G/, i.e., the digraph Note that we have used two variables "treel" and representin g label u. For each arc e' = (A, B) labeled "tree2" (both of which are the display variables), which with affine transformation , e.g., w/mGi, place an arc are mutually recursively defined, in order to generate in G' from {u, A)io (v, B) labeled with w. an irregular tree and to place thorns only in few places. Our claim is that the Controlled MRFS H with the The label a creates thorns starting with a line segment , control set R defines exactly the same image as the one 13 creates the stem (trunk) starting with a filled square defined by MRFS Mas diagrammaticall y given by the and 7 combines the thorns and the trunk in the pattern digraph G'. of a tree. The affine transformation s a, b, . . ., n are To see why this is true, we consider a similar problem suitably chosen. D in a slightly different setting. Consider p finite automata The advantag e of the DAG control over the regular Ml , M2,.. ., Mp, where M, = ( G, 2, 6,, ^i , F,). The set of states of M, is control is that the former expresse s the hierarchical structure of images in a more explicit manner. However, it is possible to simulate the DAG control by the Qi = {QLQ'I, . •.,Q'N}' regular control. A DAG can be converted into a leveled graph. Any valid linear ordering of the nodes of the Since each FA has A^ states, there is a natural one-toDAG can be converted into an equivalent control set one correspondenc e between the states of Qi and Q,, such that the order of execution of labels satisfies the for any / and 7. A state q'k in Qi "corresponds " to state constraints as specified by the DAG. However, not only Qi in Qj and vice-versa. We denote this by Qk = acyclic graphs, but any general graphs of labels can be (Q\)i, Qi = (Qk)j' Also, for each M/, we define a funcsimulated by MRFS. This is becaus e regular control tion iii, which maps a state to the set of its "adjacent" sets are equivalent to such graphs, and as we now show states. The function /Lt, extended to a set of states is a surprising normal form result that regular control given by over the execution of MRFS is not really essential . M/(^) = {QE Qi\8iip. a) = g,pGP,aei:}. Theorem 6: Let H be a Controlled MRFS with infinite Now, let r be a "controlling" finite automaton decontrol set R. Then there exists an MRFS M, which fined over alphabet A = { 1 , 2 , . . . , / ? }, such that each defines the same image as the one defined by H.
379
Balancing order and chaos in image generation string in L ( r ) is a control string determining the order of application of M,'s. To be precise, let w E L ( r ) , and let w = w,W2 • • • w„, where w, E A. The control string w determines that we apply Afyi,,, M^^^ • • •' Mw„ in this sequence . We start with MH,, in its initial state g = QQ^ and traverse all of its transitions from q to the adjacent states of ^. Then, we consider Mw2 and all of its states Q, which correspond to the adjacent states of g, and traverse all its transitions from each state in Q. Then, we consider My^,^ and its states, which correspond to the adjacent states of Q, and so forth. This determines a set of paths which switch from one FA to another depending on the control string. All the words labeling such paths are said to be "controlled" by w. Formally, we start with Ri = {^o'} , and go to adjacent states ofRi in MH,,, 5i = Mw,(^i) .
of V. Then for each m, by induction, executing the Deterministic Algorithm on G'm times gives an image
O=
U
/ ( / / , w).
In the limi t case when m ^^ 00, U
O =
I(H,
a).
a€ adherence (/?)
Hence, MRFS M given diagrammatically by the digraph G' defines the same image as defined by the Controlled MRFS H. D The above theorem also shows that H defines a unique image if the equivalent MRFS M is loop contractive. Example 15: We define a Controlled MRFS H with two labels a and ^, and an infinit e regular control set RAn Fig. 17, we show the two labels a and /? denoting the following equations for two variables A and B:
This we repeat for each w,, i.e., J^i = (Si-i)wi,
Si = /Avv, (Ri)-
= b{A) U c(B),
a:A
= a(A),
a:B
p:A
= d(B),
I3:B =
e(B).
Now, consider the set of paths P ( w ) = RiX
SiX
A valid path in'P(w)
R2XS2X
' ' ' XRnX
Srt
is one of the form
riSir2S2r3-
' Sn a(0.4)
where Si and r2 correspond , S2 and r^ correspond and so forth. Denote the set of all such valid paths by v a l i d ( P ( w ) ). Define the language controlled by T R' = {X E 2* I X is label of some path i n v a l i d ( P ( w ) ), w ^
L{T)}.
Now, is R' regular? The answer is affirmative. One can construct an FA M t h at simulates Tin conjunction with Mi,M2, . . . , Mp, such that L(M) = R'. If each FA M/ is an affine regular set then R' is still an affine regular set. Since, for each MRFS there exists an equivalent affine regular set and vice-versa, this implies that a regular control over many MRFS's still can be simulated by an MRFS. In our original problem, each Gi can be said to correspond to an FA M / , and M2 is the controlling FA T. We had to consider reversal of M i because control strings are interpreted from right to left. The digraph G' then simulates the control set, as for each control string in R, it applies the correspondin g labels in the appropriate sequence . This can be proved by induction on the length of control strings in R as follows. Let the initial value of a variable Abe AQ, which is either the default initial value or some other value assigned by an initializing equation. Now, in G' let the initial value of variable (node) (v,A)bQAo, irrespective
Digraph G
A finite portion of G'
Fig. 17. Examples of simulation of a control set by an MRFS.
380
K. CULIK II and S. DUBE
We also show the DFA Mi accepting the control set R over these two labels. We further show M2 obtained by reversal of Mi, and G obtained from A/2. In Fig. 17, we also show a finite portion of the underlying digraph G' of an MRFS M equivalent to the controlled MRFS H. The numbers in parenthesi s are the probabilities to be considere d when one is interested in timages. D 7. TEXTURE (GREYSCALE) IMAGES
In this section, we show how /-images can be defined by the methods described in previous sections. Recall the definition of PMRFS, and how equations are interpreted for r-images in Subsectio n 3.3. A practical way to execute Eq. (1) is the following algorithm, which consists of the steps: 1. Choose randomly one of the variables Ci, C 2 , . . ., C„, the probability of choosing C, being/?,, 1 <7 < n. Let the selected variable be C,. 2. Choose randomly a point in X such that the probability of X E ^ is M Q ( ^) for all 5 E ^ . Let the chosen point be x. 3. Generate the point W/(jc). Go to step (1). Lemma 7. Suppose the above algorithm generates m points. Let G be the set of these points. Then, for all B E-g, HAB) = lim ^ m-*-(xj m
are executing the equations for ^images according to the algorithm discusse d in the beginning of this section. Following the control string s backwards for each label, say a, all the equations labeled by a are executed as for PMRFS. The final ^image is the weighted sum of the /-images defined by each variable according to the final distribution. The timage defined by M with the finite control string s is denoted by MM,^. Let p = aiaj' ' ' be an co-sequenc e of labels. The /-image defined by M with the infinite control string p is given by I^MJB)
= Hm IXM,W„(B)
where w„ = aia2' • •«„. Control Set: There are two cases depending on whether the control set is finite or infinie. 1. Let F= {vvi , W2,..., w„} be a set of (finite) control strings and let /7w,, Pw2, • •, Pw„ be some weights (summing to one) for strings Wi, W2, .. ., w„, respectively, in F. Then, the /-image defined by M with the finite control set F is given by flMA^)
= 2 PwilJiM,Wi{B)
where B is any Borel subset. 2. Let R be an infinite regular set of (finite) control
where mB =
\GnB\.
Proof: It follows from the probability theory. IIA(B) is the weighted sum of the values fiCiiW^^B)), iJiCii^i^B)), ... . Now, step 1 selects one of HQ'S 1
strings and let it be accepte d by a (probabilistic) finite automaton M in which probabilities on outgoing transitions sum to unity. M assigns a probabilit y py,, to each string w in Prefix (/?), which is the sum of probabilities of all the paths in M labeled by w. The /-image defined by M with the infinite control set R is UMAB)
••
hm "~^°^
2
P^^fiM.AB)
\w\=n.wGPrefi\{R)
where B is any Borel subset. The results for c-images can be generalize d for /images. For example, Lemma 2 is now generalize d to: Lemma 8. Let M be a PMRFS. Then there exists an equivalent Controlled PMRFS with an infinite control set. Similarly, Theorem 4 hold for /-images also. Finally, the important result stated in Theorem 6 holds for /images too, and therefore, the regular control over the execution of MRFS is not essentia l irrespective of whether we are interested in black-and-white or texture images.
1. The meaning (execution) of a finite control string Theorem 1: Let H be a Controlled PMRFS with an 5 = ai«2 • * * ««j is defined in an analogous way as infinite control set. Then, there exists an equivalent for c-images. The only difference is that now we PMRFS M.
381
Balancing order and chaos in image generation Proof: Consider the proof of Theorem 6. In the proof, for each edge ^ = (w, t;) of G we considered Gi (where / is the label of the node w in G), and for each arc e' = (A, B) in G/, labeled with affine transformation w, we placed an arc e" in G' from {u,A)to{v,B) labeled d with again with w. Now, let the probability associate e = {u,v)be p, which is the probability of the corresponding state transition in the probabilistic FA Mi accepting R, and let the probability associate d with e' be q. Then, we associate a probability pq to the newly created arc e" in G\ the underlying digraph of the equivalent PMRFS M. Let the final distribution function over variables o f / / b e /. Then the final distribution function g over variables of M i s defined as ^ ( ( F, ^ ) ) = f(A) and g((v. A)) = 0 where F is the Display node of the digraph G, ^ is any variable of M , and v ¥= Fis any node of G. It is easy to verify that M defines the same ^image as defined by / / . D See Example 15 and Fig. 17 for an application of the above theorem. In these figures, the numbers in parenthesis are probabilities.
^(.5)
^(.75)
^(•5) .
7(-25)
Fig. 19. The control set in Example 16.
The infinit e control set over this set of labels is R = b*yP*a*. In Fig. 19 we show a finite automation with probability distribution on outgoing transitions and accepting R, which is used to define the /-image. Note that this timage can be generate d by a P FG with suitably chosen probabilities. D 8. CONCLUSIONS
We investigated a new technique called Controlled (P)MRFS to model natural images and textures which has the following merits:
Example 16: See Fig. 18 for a ^image generate d by a control set. To see how this image is generate d consider the following labels, the transformations WQ, WJ, W2 1. It generate s hierarchical images (therefore, many and W2 being the four standard quadrant affine transreal-world images) more efficiently than (P)MRFS. formations (mapping the unit square to the lower left, 2. It allows one to mix the Deterministic Algorithm lower right, upper left and upper right quadrants reand the Chaos Game Algorithm (consider initialspectively): izing a variable to a set of points observed by executing the Chaos Game Algorithm). a:A = Wo(A)U Wi{A)U W2(A)U w^iA) 3. One can explicitly specify a fixed finite number of iPi = P2= P3= P4 = 0.25) iterations of the Deterministic Algorithm. This is a:B = Wo(B) U Wi(B) U W2(B) practically useful since no real object is fractal over U w^{B) U Wi{A) U W2{A) U WiiA) an infinit e scale. \P\ = P2= Pz= PA = 1,P5= P6 = T2» 4. It is possible to alternate in a controlled way between Pi = b the Deterministic Algorithm and the Chaos Game P:C= Wo{B) U Wi{C) U W2(B) U w^^C) Algorithm for several different ( P ) M R F S. (P\ = P2= P3= P4 = 0.25) 5. It provides a purely deterministic method (without y:C=Wo{C) {pi = l.O) the use of a pseudo random number generator) to b:C= W , ( C ) U W 2 ( C ) U H ; 3 ( C) create random-like (irregular) images. {P\ = Pi =P3 = 3) d by the same system 6. The entire image is generate without using any subimages created by different means. Even without any rendering, we can obtain natural looking images. Acknowledgements—We thank the referee for suggestin g the IFS described in Example 4 generating the tree in Fig. 9a and for other constructive remarks.
Fig. 18. A r-image defined by a control string.
REFERENCES 1. B. Mandelbrot, The Fractal Geometry of Nature, W. H. Freeman and Co., San Francisco (1982). 2. J. Gleick, Chaos-Making a New Science, Penguin Books, New York (1988). 3. M. F. Barnsley, Fractals Everywhere, Academic Press, New York (1988). 4. M. F. Barnsley, A. Jacquin, L. Reuter, and A. D. Sloan, Harnessin g chaos for image synthesis . Comp. Graph., SIGGRAPH Conference Proceeding s (1988). 5. S. Wolfram, Theory and Applications of Cellular Automata, World Scientific, Singapore (1986). 6. J. Allouche and O. Salon, Finite automata , quasicrystals , and Robinson tilings. In Quasicrystals, Networks and Molecules of Fivefold Symmetry, Istvan Nagittai (Ed.), VCH Publishers , Weinheim (1990).
382
K. CULIK II and S. DUBE
7. F. Axel, Controlled disorder generate d by substitutions or finiteautomata : The state of the art. Third International Meeting on Quasicrystals, Incommensurate Structures in Condensed Matter, Mexico (1989). 8. F. M. Dekking, Recurrent sets. Adv. Math. 44, 78-104 (1982). 9. F. M. Dekking, Recurrent Sets: A Fractal Formalism. Report 82-32, Delft University of Technology (1982). 10. P. Prusinkiewicz, Applications of L-systems to computer imagery. In Graph Grammars and Their Application to Computer Science: Third International Workshop, H. Ehrig, M. Nagl, A. Rosenfeld, and G. Rozenber g (Eds.), Springer-Verlag , Berlin, 534-548 (1987). 11. P. Prusinkiewicz, Graphical applicationsof L-systems. Proceedings of Graphics Interface'S6—Vision Interface'^, 247-253 (1986). 12. P. Prusinkiewicz and A. Lindenmayer, The Algorithmic Beauty of Plants, Springer-Verlag , Berlin (1990). 13. A. R. Smith III , Plants, fractals, and formal languages . Comp. Graph. 18, 1-10 (1984). 14. J. Berstel and M. Morcrette, Compact representatio n of patterns by finite automata . Proceedings Pixim '89, Paris, 387-402(1989) . 15. K. Culik II and S. Dube, Rational and affine expression s for image synthesis . Discrete Appl. Math. 41, 85-120 (1993). 16. J. Shallit and J. Stolfi, Two methods for generating fractals. Comp. & Graph. 13, 185-191 (1989). 17. M. F. Barnsley, J. H. Elton, and D. P. Hardin, Recurrent iterated function systems . Const. Approx. 5, 3-31 (1989).
18. M. F. Barnsley, R. L. Devaney, B. B. Mandelbrot, H-0. Peitgen, De Saupe, and R. F. Voss, Science of Fractal Images, Springer-Verlag , Berlin (1988). 19. J. Hartmanis and R. E. Stearns , Sets of numbers defined by finite automata . Amer. Math. Monthly 74, 539-542 (1967). 20. D. B. Ellis and M. G. Branton, Non-self-similar attractors of hyperbolic IFS. In Dynamical Systems: Lecture Notes in Mathematics 1342, J. C. Alexander (Ed.), SpringerVerlag, Berlin, 158-171 (1988). 21. S. Even, Rational numbers and regular events. IEEE Trans. Electronic Comp. EC-13, 740-741 (1964). 22. L. Staiger, Quadtree s and the Hausdorff" dimension of pictures. Workshop on Geometrical Problems of Image Processing Georgenta l GDR, 173-178 (1989). 23. K. Culik II and S. Dube, Affine automata and related techniques for generation of complex images, Theor. Comp. Sci. (in press). 24. K. Culik II and S. Dube, L-systems and mutually recursive function systems . Unpublished manuscript (1991). 25. L. Boasson and M. Nivat, Adherence s of languages . /. Comp. Sys. Sci. 20, 285-309 (1980). 26. R. D. Mauldin and S. C. Williams, Hausdorff dimension in graph directed constructions . Trans. Am. Math. Soc. 309,811-829(1988) . 27. D. Arques, G. Eyrolles, N. Janey, and X. G. Viennot, Combinatorial analysis of ramified patterns and computer imagery of trees. Comp. Graph. 23, 31-40 (1989). 28. K. Culik II and S. Dube, Encoding images as words and languages . Int. J. Algebra Comp. (in press).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
383
Chaos and Graphics
ESTIMATING THE SPATIAL EXTENT OF ATTRACTORS OF ITERATED FUNCTION SYSTEMS D. CANRIGHT
Mathematics Dept., Code MA/Ca, Naval Postgraduat e School, Monterey, CA 93943, USA Abstract—From any given Iterated Function System,a small set of balls that cover the fractal attractor can be simply determined . This gives a priori bounds on the region of space in which the attractor may be constructed . 1. INTRODUCTION
As Barnsley, Demko, and others have shown [1-4], one effective method for producing fractal shapes (in any number of dimensions ) is with Iterated Function Systems (IFSs), using the "Chaos Game" algorithm or some deterministic algorithm. This approach has been used for producing naturalistic shapes [ 4 ], finding fractal interpolants to given data [ 3, p. 274 ] and fractal approximations of given functions [ 5 ], and even for visualizing arbitrary discrete sequences[6] . Indeed, any contractive IFS will give an attractor (usually of fractal dimension); thus it is possible to generate IFSs at random to explore the graphical possibilities, as is done in some educationa l software[7]. Similarly, becaus e the attractor depends continuously on the parameter s in the IFS [ 1 ], small data sets from any source could be encoded as IFSs for visualization. In implementing the IFS method, one important question is the prediction a priori of the region of space containing the fractal attractor. Without such a prediction, one could only approximately estimate the spatial extent based on calculating several points of the attractor, with no guarante e that these points are near the bounds. If as a result the portion of space represented in the computation of the attractor is too small, the result will not yield the whole attractor. If the portion of space represente d is overly large, then much computationa l space is wasted, reducing the effective resolution of the computed attractor. Another concern is when the space itself has natural limits, for example the space of colors in Red-Green Blue-space representabl e on a video monitor is limited (more or less) to a unit cube. Hence, if an IFS resides in, say, five-dimensional space with two spatial dimensions and three color dimensions , the question becomes whetherthe attractor (or its projection onto the limited dimensions ) will fit in the space. (At least one implementation [ 7 ] includes color in the IFS, though that case uses only a single color dimension, representing hue.) Here we show how to compute, directly from the IFS, a set of balls whose union contains the attractor as a subset (see Fig. 1). The radii of the balls are minimal in a certain restricted sense . This gives reliable bounds on the region of space that must be considere d in constructing the fractal. The method is general, in-
dependen t of the particular space and metric. We first describe the set of balls, then show how to compute their radii and prove that the algorithms work, and lastly give a detailed example. 2. IFS ENVELOPES
An IFS consists of a set of n contraction mappings W/ : X ^^ X on a metric space X with metric d : X X X ^^ :^. (For the "Chaos Game" algorithm, probd with each mapping; this idea abilities Pi are associate has been extended to conditional probabilities [ 8 ]. Here only the former case is considered , where the attractor is independen t of the nonzero pi.) Assume that for each contraction Wi the contractivity ratio 0 < ^/ < 1 and the fixed point x, are known, where by definition Si satisfies d(Wi(x), W/(y)) < Sid(x, y) for all points X, y E X and X/ satisfies X/ = W/(x/). The action of the IFS Won 2i set S of points in X is defined as
W{S)^[J
WiiS)
(1)
where each contraction W/ is applied to the set S in a pointwise sense . The attractor^ is the set of points in X satisfying A = W{A).
(2)
That is, the attractor consists of n smaller "copies" of itself We seek to cover each of the n "copies" with a closed ball Bi centered on the correspondin g fixed point X/, so the radius r, must be chosen large enough that Bi D Wi {A). Call the union E of these balls the "envelope," in that £" D ^ by Eq. (2). Then relative to each X/, every point in the envelope will be within a distance Ri = maX; (dij -I- r,), where dij = d{Xi, x^), becaus e for any point x in Bj, d(Xi, x) < dij 4- d(Xj, x) < dij + r,. Applying w, to such a point x will give an image point y, where d(Xi, y) < Sid(Xi, x) < SiRi. Hence if the radii r, are chosen to satisfy
Reprintedfrom Comput. & Graphics Vol 18, No. 2, pag. 231-238. 1994
5/max {dij -\- rj)
(3)
384
D. CANRIGHT
/
^h>
Fig. 1. An attractor of an IFS is shown with its envelope of three disks, as computed by the direct algorithm. This IFS uses affine maps, with Si i X, = (0, 0), X2 = (4, 0), and X3 = (0, 3). ,S2
for ij=\'*'n then Bt will contain the image Wi{E) of the envelope and so E will contain its own image under the IFS:
n =—
1 -
5,52
di2
•^2(1 + 5 i )
£ •3 W(E).
ri =
(4)
Iterating the IFS from any starting set (£'in particular) yields a sequenc e of sets that converges to the attractor. Since Eq. (4) implies E D W''{E) for any positive integer k, the envelope E, subject to Eq. ( 3 ), does indeed contain the attractor.
1 -
5,52
(5)
dn.
But for « > 2 there is apparently no closed-form general solution, and the r, must be found algorithmically. 3.2. Simple iterative algorithm A natural approach for /? > 2 is to start with the pairwise estimates
3. A L G O R I T H M S
But for a given IFS, does one or more sets of radii Vi exist that satisfy Eq. ( 3 ), and if so, how can they be found? Below we give a very simple iterative algorithm, as well as a more efficient direct algorithm. The subsequent proof of the validity of the direct algorithm also constructively proves the existence of a solution, and the structure of the algorithm suggest s that the solution is unique. (Given that a unique solution exists, the system (Eq. 3) is equivalent to a linear programn
ming problem with an objective function / = 2 r/, as pointed out by a reviewer. However, if one wishes to incorporate envelope calculation inlo an IFS rendering program, the algorithms given here are simpler than including a general simplex method solver.) 3.1. Trivial case: n = 2 When n = 2 the radii can be determined algebraically. Solving the pair of Eq. (3) gives:
sM±^, 1 -
(6)
SiSj
r,(1) = max r,y
(7)
but in most cases the r, will not satisfy Eq. ( 3 ). The exceptional case is when r/, = rn, for every /, 7 ^ /, k ¥= i, i.e., when for each ball all the pairwise estimates for that ball give the same size. (This case is not always apparent from the attractor; Fig. 1 shows such an example.) Otherwise, some of the r, will be too small to contain some images Wi(Bj ) of the other balls. Then the obvious iterative scheme to try is (A:+l)
ri
,
,
,
(k).
= max Siidij + rj ),
.
.
.
i,j=\'
(8)
Because this approach never overestimate s the radii (k) (k-\-1) and the iterates are nondecreasin g (r / < r / ^ ^/),
385
Spatial extent of attractors of iterated function systems the algorithm must converge. What is not so obvious is that this process always succeed s in at most n — 1 iterations, including Eq. ( 7 ), as shown below. Indeed, there is a direct algorithm (not iterative) that is more efficient when n is large.
^^ ^
-^^ D. 1 + 5,
(13)
Algebraic manipulation of Eq. (13) gives r^ > Sk[{ 1 + 5^)4m + Sn,rk] = Skidkm + rm)
3.3. Direct algorithm The key idea behind the direct algorithm is that the distances dij can be rescaled to account for the contractivities 5,, and the scaled distances Dij can be used to order the contractions Wi. Let
so the new r^ requires no alteration of r^. Similarly, for i ¥= k, i < m
1 + Si D,
(1 + 5 , ) (1 -\-Sj) 1
SiSj
dij,
i,j
A.
(9)
= 1 •
(Whil e Dij is clearly symmetric and nonnegative , it is not a metric because it doesn't satisfy the triangle inequality.) Now reorder (and relabel) the W/ by decreas ing maximum scaled distance, so that
> —; 1 - Sm
dim
ij,kj=
I"
-n.
(10)
In the new order, use the pairwise formula (Eq. 5) for the first two radii. Then proceed in order based on the previous results, letting i = 3- - • n.
(11)
This is the direct algorithm, which, as shown below, solves Eq. ( 3 ); an implementation in the C programming language is given in the Appendix. 3.4. Proof of validity First note that in the exceptional case mentioned above (after Eq. 7), all the Ay (for i ^ 7) are equal. In this case, the direct algorithm will obtain the correct r, regardless of the order in which they are computed. If not all the Ay are equal, then some of the r, will need to be larger than the pairwise estimates r\^ , and hence larger than the nj in Eq. ( 6 ), so in general Eq. (3) implies
1 + 5/
(16)
yields
i <j =^ max Dik > max D,/, k I
n>
(15)
since 5/ < 1. Combining Eq. (15) with ri > Si{dik + rk)
n = Si msix(dij + r,),
(14)
A;
(12)
for /,7 = 1 • • • «. For the general case, the proof is by induction, showing that each new r, computed requires no adjustment of those previously computed. Clearly ri , ^2 from Eq. (5) satisfy Eq. (3) for the subset i,j= 1,2. Now for the induction step, assume the first m - 1 radii, in the order Eq. ( 1 0 ), satisfy Eq. ( 3 ), and hence Eq. (12), for /, y = 1 • • • m — 1. Choose r^ by Eq. ( 1 1 ), and let k be the value of the index j in Eq. (11) for which the maximum is achieved. Then by Eq. (12) and the ordering Eq. (10)
ri > Si[( 1 + Sm)dim + Sm(dik + r^)] > Si[dim + Sm{dkm + ^^t)] = ^/(<3^/m + ^m)
( 17)
by the triangle inequality. Hence the new r^ requires no adjustment of any of the previous r/ (for / < m ), and Eq. (3) is satisfied for /,7 = 1 • • • m; this completes the proof. Note also that because of how the direct algorithm works, the iterative algorithm will compute at least two of the r, ( r i , ^2 in the order (10)) in the initial step, and will find at least one of the other r, at each successiv e step, and so can take at most n — 1 iterations to arrive at the answer. 3. MINIMALIT Y OF THE r, Can radii smaller than these r, be used and still have the Bi cover the attractor? For any particular IFS, the answer is probably yes (as illustrated in Fig. 2 ). The approach given here uses only a small amount of information about the IFS: the ordering of the w, based on the maximal scaled distances ; the 5,; and for each / one determining distance dik (where the maximum in Eq. (11) is achieved). Using more information it may be possible to reduce the size of the Bi. But if one considers the set of all the IFSs for which the direct algorithm yields the same r, in the same way {i.e., same ordered Si and same n — 1 determining distances) , then the r/ are minimal for that set of attractors (see Fig. 3). In fact, one can construct one member of that set such that each image W/(^) of the attractor includes a point at a distance r, from the fixed point x,. To construct this IFS, let X = ^ with the Euclidean metric d{x, y) = \x - y\. Let Wi{x) = -SiX + (1 + Si )Xi, and let Xi = 0,X2 = dn, say. Then the attractor includes the extremal pointsXei = Xi — ri, Xei = X2 + ^2, sinceXe\ = y^\{Xei) andXe2 = ^2{Xe\). Place each succeedin g Xm at the determining distance dmk from the determining point Xk, in the opposite direction from
386
D. CANRIGHT
Fig. 2. For an equilateral Sierpinski's Triangle (where H',(X) = 5^ + 2^1), the r, = dij by this method; in this particular case the radii could be half as large.
Xek' (Figure 4 illustrates the construction.) Then the attractor will include Xem = x,yj ± r^j = w^iXek)- Thus for this one-dimensiona l attractor yi, each image Wi{A) wil l include a point (Xe,) a distance r, from X/, so no smaller r, would suffice.
5. EXAMPLE For a detailed example of an envelope calculation, consider the now familiar black spleenwort fern fractal of [ 4 ] . The IFS for the fern (in two dimensions) consists of affine contractions, each of which has the form
Fig. 3. Same 5/ and x/ as the previous figure, but here W/(x) -• -j x + 2X/; in this case the r, found above are minimal.
Spatial extent of attractors of iterated function systems
387
Fig. 4. A one-dimensiona l attractor constructe d from the following ordered data: 5i = 3, 52 = 4, 53 = 7, di2 = 1, and di3 = 5. The r, are minimal for such attractors.
(cii
bi ^
€)=(: :)(;)^a)- ™ K Ci
di,
or more compactly W/(x) = M/X + hi.
(19)
where Mi is the matrix and b, is the offset vector. The various constants are given in [ 4 ] , but in terms of scaling and rotating each axis, using /?, q, 8, 0, where a = p cos 6, b = —g sin (f),c = psind,d=q cos 0; Table 1 is adapted from [4, p. 1977].
Fig. 5. Barnsley's fern[4] and its envelope (see text).
388
D- CANRIGHT
Table 1. IFS for Barnsley's fern; each map consists of scaling and rotating each coordinate axis, followed by translation. Scalings
f,
/•
0.16 0.85 0.34 0.37
0 -2.5 49 120
( 2h \
(22)
Translations
Rotations
Map 0 0.85 0.3 0.3
1
(»' I)
COS p
/ c o s0 X S{ \ s i n^
0 1.6 1.6 0.44
0 -2.5 49 -50
Sin
-sin (3 cos ^ ) -sin/3\ c o s / ? ;-
^^^^
Then s = max( | Xi |, | X21). This approach also has a nice geometrica l interpretation: The effect of multiplying a vector x by M is to take component s of x in the eigenvecto r directions, which are at an angle /5 relative to the coordinate axes, scale each componen t by the correspondin g X, and rotate the resulting vector by a. 5.1. Finding the Si Proceedin g as above gives 54 = 0.379. Thefixedpoint The contractivity ratio 5, for an affine map Wi is the largest singular value of the matrix M,. In the first x/ for each map can be found by solving three maps here, both axes rotate together, and so 5/ (24) ( / - M , ) x , = b, is the larger of A , Qi- In W4, the differential rotation causes a skewing effect, and the singular values of M4 must be found. The simplest way for a real 2 X2 matrix This gives the necessar y starting information, sumisfirstto factor out a pure rotation to give a symmetric marized as "Input" in Table 2. (For affine maps in matrix (5), then diagonalize it to find its eigenvalue s higher dimensions , the contractivity ratios are found (Xi , X2) as shown below: by singular value decomposition , but for nonlinear maps the ratios and fixed points may be more difficult to find.) (20) a = arctan
Rotations are given in degrees . Adapted from M. F. Barnsley, V. Ervin, D. Hardin, and J. Lancaster , Solution of an inverse problem for fractals and other sets. Proc. Nat. Acad. Sci. USA 83, 1975-1978 (1986).
S^l'
\h
M = / - ^ « ^ - « W (21) kj
\-sin a
cos a/
5.2. Result Running the direct algorithm program ("envelope.c") from the Appendix on this input gives the following results:
% envelope Enter number of contraction mappings: Map 1. Enter scale, x, y: .16 0 0 Map 1: s = 0.160000, X = 0.000000, y = 0.000000 Map 2. Enter scale, x, y: .85 2.45967 10.004734 Map 2: s = 0.850000, X = 2.459670, y = 10.004734 Map 3. Enter scale, x, y: .34 -0.601889 1.883961 Map 3: s = 0.340000, X = -0.601889, y = 1.883961 Map 4. Enter scale, x, y: 0.379216 0.155336 0.630251 Map 4: s = 0.379216, X = 0.155336, y = 0.630251 radii in sorted order [ orig order ] ( sorted link ) : rl[2] ( ->2) : 16.700212 r2 [ 4 ] ( - > 1 ) : 9.993765 r 3 [ 3 ] ( - > 1 ) : 8 . 6 2 8 8 35 r 4 [ l ] ( - > 1 ) : 4 . 3 2 0 4 59
Table 2. Envelope for fern IFS, computed by the direct algorithm. Input /
Output
Si
Xi
yi
0.16 0.85 0.34 0.379
0 2.460 -0.602 0.155
0 10.005 1.884 0.630
Z)-order
D^ax 25.59 36.35 30.26 36.35
dik
r,
dn: 10.30
4.32 16.70 8.63 9.99
d24: 9.65 6^32: 8.68 d42. 9.65
For each map w,, the maximal scaled distance D^ax determines the order, and one distance do, determines the radius r,.
spatial extent of attractors of iterated function systems These results are illustrated in Fig. 5, and detailed in Table 2, including the D values used in re-ordering and the determining distances. (While in this example the determining distance for each map derives from the same pair that gives the maximum Z), that is not always the case.) So if we had no idea how big the fern attractor was, we could use a computational space extending from Xmin = X2 - r2 = - 1 4 , 2 4 to Xmax = X2 + r2 = 19.16 and y^in = y^' U = - 9 . 3 6 to >^max = yi 4- r2 = 26.70 to contain the entire envelope. As it turns out, this is far more space than necessary for the fern itself, but there are many other IFSs, equivalent as far as the direct algorithm is concerned, with much larger attractors (e.g., what if ^2 = 02 = 177.5 instead). 6. CONCLUSIONS To summarize, given any IPS (along with the contractivities and fixed points of each of its constituent contraction mappings), an envelope that covers the attractor can be constructed of one ball for each map, centered on the corresponding fixed point. (In the case of affine maps in two dimensions, an explicit procedure for finding the contractivities and fixed points was given.) The spatial extent of the envelope thus gives a reliable bound on that of the attractor. (In addition, if the balls are disjoint, the attractor is totally disconnected.) Two algorithms were given to calculate the radii of the balls: an iterative one for greatest simplicity.
/*
389
and a direct one for greater efficiency. Both were proven to be effective. While the radii so found may not be minimal for the particular IPS, they are minimal for the set of all IPSs with equivalent information (in the sense described above). Acknowledgements—Thanks to Aaron Schusteff and Ismor Fischer for stimulating, informative discussions and helpful suggestions.
REFERENCES
1. M. F. Barnsley, Fractals Everywhere, Academic Press/ Harcourt Brace Jovanovich, Boston (1988). 2. M. F Barnsley and S. Demko, Iterated function systems and the global construction of fractals. Proc. Roy. Soc. Lond. A 399, 243-275 (1985). 3. S. Demko, L. Hodges, and B. Naylor, Construction of fractal objects with iterated function systems. Comp. Graph. 19,271-278(1985). 4. M. F. Barnsley, V. Ervin, D. Hardin, and J. Lancaster, Solution of an inverse problem for fractals and other sets. Proc. Nat. Acad Sci. USA 83, 1975-1978 (1986). 5. W. D. Withers, Newton's method for fractal approximation. Const. Approx. 5, 151-170 (1989). 6. H. J. Jeffrey, Chaos game visualization of sequences. Comp. & Graph. 16, 25-33 (1992). 7. D. Canright, FrEd: the Fractal Editor. Freeware available as FREDEX.EXE from CompuServe IBMApp forum, Graphics library (1992). 8. M. F. Barnsley, J. H. Elton, and D. P. Hardin, Recurrent iterated function systems. Const. Approx. 5, 3-31 (1989).
APPENDIX
The following program in C implements the direct algorithm for determining the "envelope" of an attractor of an Iterated Function System on RA2, given the contractivities si and the fixed points ( xi, yi ) . written by David Canright, March 1993 . */ #include ^stdio.h) #include (math.h) main( ) { int npts, i, j , m, n, index [ 64 ] , link[ 64 ] ; double d [ 64 ] [ 64 ] , x [ 64 ] , y [ 64 ] , s [ 64 ] , r [ 64 ] , Dmax [ 64 ] , t, tmax, dx, dy; char line [ 81] ; /* input n, si, xi, yi */ printf ( "Enter number of contraction mappings: " ); gets( line ); sscanf ( line,"%d",&npts ) ; for ( i = 1; i < = npts; i++ ) { p r i n t f ( "Map %d. Enter s c a l e , x, y: " , i ) ; g e t s ( l i n e ); s s c a n f ( line,"%lf%lf%lf ", s + i , x + i , y + i ) ; /* enforce 0 <= s < 1 */ i f ( s [ i ] < 0 . ) s [ i ] = - s [ i ] ; w h i l e ( s [ i ] > = l . ) s [ i ] *= 0 . 1 ; p r i n t f ("Map %d: s = %f, x = %f, y = %f \ n " , i , s [ i ] , x [ i ] , y [ i ] ) ; } / * compute d i s t a n c e s d i j & maximal s c a l e d D i j * / f o r ( i = l ; i < = n p t s ; i + + ) Dmax [ i ] = 0. ; for ( i = 1; i < = n p t s ; i + + ) { for ( j = i + 1 ; j <= npts; j + + ) { dx = X [ i ] -X [ j ] ; dy = y [ i ] - y [ j ] ; d [ i ] [ j ] = d [ j ] [ i ] = t = sqrt(dx*dx+dy*dy); t= ( l . + s [ i ] ) * ( l . + s [ j ] ) / ( l . - s [ i ] * s [ j ] ) *t; i f ( t > Dmax [ i ] ) Dmax [ i ] = t ; i f ( t > Dmax [ j ] ) Dmax [ j ] = t ; / * S o r t by s c a l e d d i s t a n c e s ; index p o i n t s t o o l d order * / i n d e x [ 1 ] = 1;
390
D. CANRIGHT
for ( i = 2; i < = npts; i++ ) { for ( m = i; m > 1 && Dmax [ i ] > Dmax [ index [ m-1 ] ] ; m- - ) index[m] = index[m-1]; index[ m] = i }
/* Direct algorithm; link points to determining distance */ i = index[1]; j = index[2] ; link[l] = 2; link[2] = 1; r[l] = ( s [ i ] / ( l . + s [ i ] ) ) * Dmax [ i ] ; r[2] = ( s[j]/(l.+s[j]) ) *Dmax[j]; for ( m=3; m <= npts; m++ ) { i = index [ m] ; tmax = 0. ; for ( n = 1; n < m; n++ ) { j = index [ n ] ; i f ( { t = d [ i ] [ j ] + r [ n ] ) > tmax ) { tmax = t ; l i n k [ m] = n; } }
r [ m ] = s [ i ] * tmax; }
printf ( "radii in sorted order [ orig order ] ( sorted link ) : \n" ) ; for ( i = 1; i <= npts; i++ ) printf (" r%d[%d]{ ->%d) : %f \n", i , index [ i ] ,link[i] ,r[i] ) return(0 ) ;
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
391
Chaos and Graphics
AUTOMATI C GENERATION OF ITERATED FUNCTION SYSTEMS J. C. SPROTT
Departmen t of Physics,University of Wisconsin, Madison, WI 53706, USA Abstract—A set of affine mappings with randomly chosen coefficients is repeatedl y iterated numerically using the random iteration algorithm to produce an attractor with fractal characteristics . The attractor is tested for boundedness , sensitivity to initial conditions, and correlation dimension. In this way, a computer can generat e a large collection of fractal patterns that are all different and most of which have considerabl e aesthetic appeal. A simple computer program and examples of its output are provided. Many of the attractors have been systematicall y evaluate d for visual appeal, and a correlation is found with the Lyapunov exponen t and correlation dimension. 1. INTRODUCTION In an earlier companion paper, "Automatic Generation of Strange Attractors"[l], a method was described in which a system of coupled finite-differenceequations with randomly chosen coefficients was iterated numerically and the solution tested for sensitivity to initial conditions (chaos). This method provides a powerful generator of new visual art forms and inspired a book that includes over 350 examples of such computer art[2]. This paper extends the technique to iterated function systems[3]. Such systems were originally studied by Hutchinson[4] and more recently applied to data compressio n and transmissio n by Barnsley[5, 6], who also introduced much of the terminology and the random iteration algorithm for their solution[7]. Whereas most previous work with iterated function systems has involved producing patterns to match some predetermine d shape, this paper proposes a way for a computer to search a large class of potentially interesting mappings. The visual appeal of the patterns is shown to correlate with mathematica l quantities that characterize them, such as the Lyapunov exponent[8] and correlation dimension[9], suggestin g that it might be possible to refine further the automatic selection of patterns with strong visual appeal. 2. TWO-DIMENSIONAL AFFINE MAPS The simplest example of an iterated function system is a set of two-dimensiona l affine maps: Xnew = aix + a2y + as ^new = a3X + a4y + ae Such a mapping has a single fixed point (x*, y*) given by
conditions within its basin of attraction, which in this case is the entire xy plane. With an unstable fixed point, successiv e iterates grow ever larger, and the system is unbounded . For simplicity, we consider saddle points (attracting in one direction and repelling in another) to be unstable, and we ignore periodic orbits, which seldom occur. With each iteration, such an affine map takes a set of points in the xy plane and moves it to a new location in the plane, generally with scaling, translation, rotation, reflection, and shear. Stable solutions necessaril y scale in such a way that the area of the new set is less than the area of the previous set, in which case we say that the set has contracted . Continually contracting mappings cause the set eventually to collapse into a region of negligible area surrounding the fixed point, and continually expanding mappings are unbounded . The amount of area contraction is determined by the magnitude of the determinan t of the Jacobian matrix (hereafter simply "Jacobian") given by /=
I ^1^4 - «2^3l,
which is the ratio of the area after a contraction to the area before. Thus the condition for contraction is / < 1. Note that area contraction does not guarante e boundedness , since a set can continually contract in one direction and expand in another, approachin ga thin filament of zero area and infinite length. We are generalizing the usual contraction mapping in which every pair of points is moved closer together by the mapping. Now suppose that there exists a second different affine map, Xnew = a-ix^- a^y + an
X* = [-asiaA - 1) + a2ae]/[{ai - l){a4 - 1) - ^2^3] y* = [-ae(ai - 1) + a^as\/[(ax - 1)(«4 - 1) - ^2^3] This fixed point may either be stable (attracting) or unstable (repelling). A stable fixed point attracts initial
ynew = agx + a^y + an which is applied to the set after some finite number of iterations of the first map. The result is to displace the set of points away from the original fixed point toward
Reprintedfrom Comput. & Graphics Vol. 18, No. 3, pag. 417-425, 1994
392
J. C. SPROTT
which they were converging in the direction of a new fixed point in discrete steps of ever smaller size. However, the progressio n toward the new fixed point need not be along a straight line but rather can spiral around it. Thus two attracting fixed points successivel y turned on and off can compete for the set, producing a succes sion of points distributed over the xy plane in some pattern. Each point in the pattern can be transformed into another point in the pattern by some sequenc e of the two affine mappings. The collection of all such sequence s is an iterated function system (IPS). A practical method for producing iterated function systems is the random iteration algorithm in which a computer in essenc e repeatedl y flips a coin and uses one map if it comesup heads and the other if it comes up tails. All possible sequence s of heads and tails are eventually obtained, and long sequence s of all heads or all tails, which would densely populate the regions near the fixed points, are rare. The locations of the fixed points are usually not obvious in such patterns. The patterns evolve much more quickly and uniformly if the coin is weighted so that the probability of applying each mapping is proportional to its Jacobian . The starting point can be chosen arbitrarily since the basin of attraction is the entire xy plane. However, the first few points should be discarded to ensure that the points have collapsed onto the attractor. The resulting pattern is usually a deterministic fractal, despite being produced by a random algorithm. Different sequence s of random numbers will produce the same eventual pattern. The pattern may have an integer dimension, but in such cases the boundary usually has a noninteger dimension. Although the attractor is a fractal, it is not usually called a strange attractor. That term is reserved for chaotic dynamical systems . Affine mappings cannot exhibit chaos becaus e they lack the requisite nonlinearity. 3. SENSITIVITY TO INITIAL CONDITIONS
Like strange attractors, iterated function systems can be categorize d by their sensitivity to initial conditions. Imagine two bounded iterated function systems produced by the same pair of affine maps but with initial conditions that differ slightly. If the two are produced by a different sequenc e of coin flips, the sequence s of (jc, y) values would bear no relation to one another. Indeed, this would be true even if they had the same initial condition. Thus there is extreme sensitivity to initial conditions resulting from the underlying randomness used to produce the sequence . However, if the same sequenc e of coin flips was used in the two cases , successiv e iterateswould approach one another, implying insensitivity to initial conditions as expected for a deterministic nonchaotic process . The difference between the two solutions decrease s on average at an exponentia l rate. The rate of convergence is characterize d by the Lyapunov exponent[8], which can be thought of as the power of 2 (or sometimes e) by which the separatio n increase s on average for each iteration. Thus if the separatio n halves with each iteration, the Lyapunov exponent is — 1 bit per
iteration. The Lyapunov exponent can be thought of as the rate at which information about the initial condition is lost. A negative value means that information is gained; with each iteration we are better able to predict the result. A two-dimensiona l IPS has two Lyapunov exponents since a cluster of nearby initial points may contract more in one direction than in another[10]. The least negative exponent is the one that dominates after a few iterations using the above procedure . The sum of the two Lyapunov exponents is related to the weighted average Jacobian (7) of the maps by L,+L2
= log2>
One difficulty is that the two solutions eventually get very close together, and the computer cannot resolve the difference. This problem can be remedied if after each iteration the points are moved back to their original separatio n along the direction of the separa tion [1 1]. The Lyapunov exponent is then determined by the average of the distance they must be moved for each iteration to maintain a constant separation . If the two cases are separate d by a distance d„ after the n\h iteration and the separatio n after the next iteration is dn+\, the Lyapunov exponent is determined from 1
N-\
L = - ^
\0%2{dn+\ldn)
where TV is the number of iterations. After each iteration, the value of one of the iteratesis changed to make dn^\ = d„. Por the cases here, dn is arbitrarily taken equal to 10~^ 4. CORRELATION DIMENSION
The fractal patterns produced by iterated function systems arise from repeate d affine mappings that make distorted copies of the pattern at successivel y smaller scales. Because the copies are generally sheared , they are not self-similar, but rather are self-affine. Purthermore, the mappings may overlap one another. Therefore, calculation of the fractal dimension directly from the equations is generally not straightforward. It is relatively easy to calculate from the series of (x, y) values a related quantity, the correlation dimension[9]. It is defined as the logarithmic slope of the correlation integral C(r), which is the probability that two randomly chosen points from the series are separated by a distance less than r, where r = V(x, - Xjf
+ (yi -
yjf
The correlation dimension is a lower bound on the fractal dimension, but in practice it closely approximates it. The two are identical if the points are uniformly distributed over the attractor. The correlation dimension can be calculated in real time as the pattern develops by taking each new point and calculating its separatio n from one or more ran-
Automatic generatio n of iterated function systems domly chosen previous points[12]. A counter TVi is incremented if the separatio n is less than ri, and N2 is incremented if it is less than r2, where Vi and r2 are chosen arbitrarily except that they should be much smaller than the size of the attractor, but large enough that A^i and A^2 are statistically significant and ri < Vi. In this case the correlation dimension is F=\og{N2/N,)/\og{r2/r,) with a statistical uncertainty of order N^^'^. 5. COMPUTER SEARCH PROCEDUR E The procedure for implementing a computer search for interesting iterated function systems is straightforward. Choose the 12 coefficients a\ through a^ randomly over some interval, choose initial conditions for X and y, and iterate the equations for the maps (choosing randomly which mapping to use at each iteration) while calculating the Lyapunov exponent and correlation dimension. A computer program^ that repetitively performs these operations is listed in the Appendix. It is written in a primitive version of BASIC so as to be widely accessibl e and easily understood . The program should run without modification under Microsoft BASICA, GW-BASIC, QBASIC, QuickBASIC, VisualBASIC for MS-DOS, and PowerBASIC, Inc., PowerBASIC on IBM PC or compatibles . It assume s VGA (640 X 480 pixel) graphics. If the hardware or BASIC compiler does not support this graphics mode, change the SCREEN 12 command in fine 130 to a lower number {i.e., SCREEN 2 for CGA mode). A compiled BASIC and a computer with a math coprocesso r are strongly recommended . The coefficients are chosen in increments of 0.1 over the range -1.2 to 1.2 (25 possible values) in line 320. Smaller coefficients produce too much contraction, and larger coefficients produce mostly unbounde d solutions. The increment was chosen so that each pattern is visibly different and so that the coefficients can be coded into letters of the alphabet A through Y (A = -1.2, B = -1.1, ^rc.) for easy reference and replication. Thus each pattern is uniquely identified by a 12-letter name. The number of possible cases is thus 25^^ or about 6 X 10*^. Viewing them all at a rate of one per second would require about 2 billion years! Thus it is very unlikely that any patterns produced by the program will ever have been seen before, and like snowflakes, nearly all of them are different. Initial conditions are set arbitrarily to x = y = 0.05 in line 310. Other initial values produce the same result as expected for an attractor. Some computation time could be saved by choosing initial conditions at one of the fixed points. The Lyapunov exponent is calcud lated using an initial condition in which x is increase
393
by 10~^ (line 310). The correlation dimension calculation begins after 200 iterations (line 910) and compares each new point with a randomly chosen previous reference point that is updated on average every 50 iterations (line 930). The correlation dimension is calculated at a scale of about 1% the largest dimension of the attractor with Vj = lOri (line 960 and 970). After 100 iterations, the program begins keeping track of the minimum and maximum values of x and y (lines 520550) so that after 1000 iterations the screen can be cleared and resized to allow a 10% border around the attractor (line 560). After 1000 iterations the program begins testing the Lyapunov exponent and correlation dimension for a user-supplie d criterion (line 650) for the case to be interesting. More will be said about such criteria in Section 7. If 21,000 iterations are reached with a bounded solution (line 630) and an acceptabl e combination of L and F, the result is assume d to be an interesting candidate IPS. The search immediately resumes after each case is confirmed and continues until a key is presse d (line 660). The search procedure is surprisingly fast. On a 33MHz, 80486DX-compute r running PowerBASIC 3.0, the program finds about 600 interesting cases per hour. The listing in the Appendix only displays the patterns on the screen. A more versatile program would call a subroutine from line 630 to print the patterns, perhaps after user-confirmatio n or evaluation, or would save the coded coefficients in a disk file for later analysis. 6. SAMPLE ITERATED FUNCTION SYSTEMS
Figure 1 shows samples of the shapes that arise from the solution of such two-dimensiona l iterated function systems . These cases were selected for their beauty and diversity from a much larger collection. However, they are not atypical, and there are many others that would have served equally well. It is remarkable that such a diversity of shapes comes from the same simple set of linear equations with only different numerical values of the coefficients. The cases shown were produced on a laser printer with 300 dots per inch resolution on an 8.5 X 11-inch page after about 500,000 iterations. Of course, the program needs modification to output the plots to a printer at high resolution. However, satisfactory results can be obtained by any of the various utilities that allow one to print a screen image. Also shown on each figure is the code name preceded by the letter a to denote a two-dimensiona l IFS with two affine maps, the Lyapunov exponent L (in bits per iteration), and the approximate correlation dimension F. 7. AESTHETIC EVALUATIO N
A collection of 7500 such patterns was systematicall y examined by the author. The evaluations were done by displaying previously stored but unseen cases se^ An IBM DOS disk containing the BASIC source code in quentially on the computer screen without any indithe Appendix, an executabl e version of the code, and a more e them. Each versatile menu-driven strange attractor program with 3-D cation of the quantities that characteriz glasse s are available for $30 from the author. Specify 3.5 or case was evaluated on a scale of one to five according 5.25-inch disk. to its aestheticappeal. It only took a few seconds for
394
J. C. SPROTT
aGNGUVETDSNWK
F - 1.95
L =-0.44
aGOHRHRKVFLNO
alFEROWOSIRQI
F " 1.57
L —0.37
allDQIKFMHUSK
F - 1.13
L —0.10
aKDOWQMMYEMWD
F = 1.48
L —0.47
F •= 1.38
L -
^ :
"""
alPUDJIHVEIQV
- ^r* 'MW^^^^^t^gk
Fig. 1. Examples of iterated function systems produced by pairs of two-dimensional affine maps.
395
Automatic generation of iterated function systems aLGMRYBSCSSQR
•P""^
aNYDEQPKLOOKY
F = 1.83
L —0.10
aMCGMGGJQORXH
F -
F = 1^73
L =-0.05
aRFUSIENUVCN
F = 1.50
F = 1.76
L =-0.S4
aTLPVPLMQEIFC
^p^
aRIGIEDMIBOWR
F = 1.81
L =-0.05
aUIPUDROEPLPM
Fig. 1. (Cont'd.)
1.08
L
—0.54
L =-0.16
396
J. C. SPROTT
each evaluation. Tests with other individuals show that the relative ratings are reasonabl y consistent . Figure 2 shows the results using a gray scale on a plot in which the largest Lyapunov exponent (L) and correlation dimension (F) are the axes. The darkness of each box increase s with the average rating of those attractors whose values of L and F fall within the box. There is a clear preference for patterns with correlation dimensions greater than 1 and large negative Lyapunov exponents . A similar result was found for strange attractors[ 1, 2], except that they are most appealing when their positive Lyapunov exponents are small. The dimension preference is perhaps not surprising since many natural objects have dimensions in this range. The Lyapunov exponent preference is harder to understand . For a given dimension, the largest negative values of Lyapunov exponent correspon d to cases in which the two exponents are equal, implying the same contraction in all directions and perfect self-similarity. The largest negative Lyapunov exponent and fractal dimension are bounded by a curve
listing in the Appendix. Another criterion that has been effective is [(2 - F)/\2f
+ [(2 + L/log 0)/L6f
< 1,
which eliminates about 98% of the two-dimensiona l cases . The 2% that remain are nearly all visually interesting. 8. SUGGESTIONS FOR FURTHER WORK
The method described above can be easily extended in a number of ways. There is nothing special about two-dimensiona l pairs of affine maps other than perhaps simplicity. This simplest case was chosen to emphasize the enormous diversity of patterns that can be produced. It is straightforward to apply the technique to cases with 0>2 and D>2. The fraction of visually interesting cases decrease s with both O and D unless some appropriate selection criterion is used. One could also examine the infinite variety of nonlinear mappings. The probabilities of the mappings can be altered to change the density of points on various regions of the -FL < log O/log D attractor. The probabilities could be included among the search parameters . Different probabilities do not e of the pattern, but they can where O is the number of mappings (2 in this case) alter the final appearanc . and D is the dimension of the system of equations (2 significantly affect the early stages of its development in this case). Points on the boundary correspon d to The maximum number of iterations is another paramt of the patexact self-similarity. For the 76 cases that were rated eter that can be adjusted. The developmen five (best), the average correlation dimension was F = tern is sensitive to the quality of the random numbers g a possible test to 1.51 ± 0.43, and the average Lyapunov exponent was used to produce it[13], suggestin . Such tests have L = -0.24 ±0.15 bits per iteration, where the errors distinguish chaos from randomness . represen t plus or minus one standard deviation. About been applied to the analysis of DNA sequences[14] 31% of the cases evaluated fall within the error bars. Having found a visually appealing IFS, one can make These results sugges t that the computer can be taught small variations of the coefficients to optimize evert to select cases that have a high probability of aesthetic further its appearance . The attractors can be animated appeal. Various criteria have been used for this purpose. by producing a successio n of frames, each with a slightly One such example is given in line 650 of the program different value of one or more of the parameters . - 2
75BB
Crises
• • B"i
L
17jn^L_
pu^^^b|H
m Bw^T^^JB^^B^^^^^^^^^^^^^^^B 1 e Fig. 2. Results of evaluating 7500 iterated function systems , showing that the most visually appealing cases are those with large negative Lyapunov exponents (L) and with correlation dimensions (F) greater than one.
397
Automatic generatio n of iterated function systems Three-dimensiona l iterated function systems can be explored using mappings of the form Xnew = aix + a2y + a^z + aio ynew = a4X -\- asy + a^z + au Znew = a-fX + asy + a^z + a^ with a Jacobian y = \a1a5a9 + <22^6^7 + a^a^a^ — a-iUsa-i - fl2<24a9 - « l « 6 ^8 I
Adding a third dimension raises interesting possibilities for new display modes. The simplest case is to plot X and y, but to ignore z, which is equivalent to viewing the projection (or shadow) of the attractor on the xy plane. Alternately, the attractor can be projected onto the yz or zx plane or rotated through an arbitrary angle. A gray scale can be used to represen t the number of iterates that fall on a given screen pixel[ 15], thereby restoring some of the resolution lost by the finite resolution of the screen. Another possibility is to code the third dimension in color. Examples of three-dimensiona l iterated function systems using 16 colors are shown in Fig. 3. These f = 8.76 h «-8.M
eQrilP»M|Dlli«6Fiyf]|fimiHTI.
•'"^*^'^:SMfc|i||^ I ^/
X
^
^'^^H
jpflp^ -^0^^^
J^
••'^H
\\! •Ml /
/ /
/
/ eSifissiiGniniiTHiniiirimeiiiF
1
\
\ \
1
r =* 1.65 L = 8.47
Fig. 3. Examples of iterated function systems produced by pairs of three-dimensiona l affine maps in which the color is determine d by one of the variables.
398
J. C. SPROTT
figures were produced directly from VGA screen images using a color ink-jet printer. Some computer languages allow one to cycle through a variety of color palettes to find the most pleasing combination of colors or to produce an animated color display. Modern versions of BASIC have such a PALETTE command. In Fig. 3 the palette was adjusted to provide a rainbow sequenc e of colors. It is also possible to produce an anaglyph[16] in which each {x, y) value is plotted twice, once in red and once in cyan, displaced horizontally by a distance proportional to z to produce a three-dimensiona l monochrome image when viewed through red/blue glasses . Color three-dimensiona l images can be produced by plotting the two colored views side-by-side and either viewing them cross-eye d or through an inexpensive prism stereoscope. ^ The attractors can be rotated to provide a view from the most pleasing angle or animated with successivel y rotated images. Three-dimensiona l attractors can also be displayed using shadows to convey depth or contour bands as wit h topographic maps. One can slice the attractor lik e a loaf of bread and display the slices in an array or as an animated sequence . Combinations of these techniques permit visualization in dimensions higher than three. The attractors can be projected onto spheres , cylinders, tori, or other surfaces. Iterated function systems can also be used to produce a crude kind of computer music. For a two-dimensiona l map, X might be used to control the pitch and y the duration of each note. The result is a not-displeasing , though alien-sounding , form of music that might appeal to those with exotic musical tastes. Much more could be done with correlating the aesthetic appeal of the attractors with the various numerical quantities that characterize them. The Lyapunov exponent and correlation dimension are only two such quantities; there are infinitely many others[17]. One could determine if there are discernible differences between the preference s of scientists and artists. Preliminary indications sugges t that complexity might appeal more to artists than to scientists, who tend to see beauty in simplicity. There may be discernible cultural differences. One could determine whether the results are the same for more complicated systems of equations and for different methods of displaying the results, such as color versus monochrome .
^ Stereoscope s and other 3-D supplies are available ft-om Reel 3-D, P.O. Box 2368, Culver City, CA 90231.
If quantifiable measure s of aesthetics can be deduced for patterns produced by a computer[18], then perhaps the same could be done for patterns produced by humans. Fractal compressio n schemes attempt to represent arbitrary images by their IFS parameters . From these parameters , many quantities such as the spectrum of contractions can be easily deduced. It would make an interesting study to determine whether there are correlations between these quantities and the artistic quality of the original image. Perhaps such schemes could be used to detect forgeries if there are discernible differences in the fractal characteristic s of works by various artists. REFERENCE S 1. J. C. Sprott, Automatic generation of strange attractors. Comp. & Graph. 17, 325-332 (1993). 2. J. C. Sprott, Strange Attractors: Creating Patterns in Chaos, M& T Books, New York (1993). 3. M. Barnsley and S. Demko, Iterated function systems and the global construction of fractals. Proc. Royal Soc. London A 399, 243-275 (1985). 4. J. Hutchinson, Fractals and self similarity. Indiana Univ. /A/«//7. 30, 713-747(1981) . 5. M. F. Barnsley, V. Ervin, D. Hardin, and J. Lancaster , Solution of an inverse problem for fractals and other sets. Proceedings of the National Academy ofSciences 83, 1975 (1986). 6. M. F. Barnsley and L. P. Hurd, Fractal Image Compression, A. K. Peters, Wellesley, MA (1993). 7. M. F. Barnsley, Fractals Everywhere, Academic Press, Boston (1988). 8. H. G. Schuster , Deterministic Chaos, Springer-Verlag , New York (1984). 9. P. Grassberge r and I. Procaccia , Characterizatio n of strange attractors. Phys. Rev. Lett. 50, 346-349 (1983). 10. G. Benettin, L. Galgani, A. Giorgilli, and J. Strelcyn, Lyapunov characteristi c exponents for smooth dynamical systems and for Hamiltonian systems ; a method for computing all of them. Meccanica 15, 9-20 (1980). 11. A. Wolf, J. B. Swift, H. L. Swinney, and J. A.~ Vastano, Determining Lyapunov exponents from a time series. Physica 16D, 285-317 (1985). 12. W. Lauterborn and J. Holzfuss, Evidence for a low-dimensiona l strange attractor in acoustic turbulence.Phys. Lett. A 115,369-372(1986) . 13. I. N. Stewart, Order within the chaos game? The Dynamics Newsletter 3, 4-9 (19^9). 14. H. J. Jeffrey, Chaos game visualization of DNA sequences . Comp. & Graph. 16, 25-33 (1992). 15. C Pickover, A note on rendering 3-D strange-attractors . Comp. & Graph. 12, 263-267 (1988). 16. J. C. Sprott, Simple programs produce 3D images.Comp. Phys. 6, 132-138(1992) . 17. J. D. Farmer, E. Ott, and J. A. Yorke, The dimension of chaotic attractors, Physica 7D, 153-170 (1983). 18. H. W. Franke, Computer Graphics, Computer Art, Springer-Verlag , New York (1985).
APPENDIX
110 120 130 140 150 160 170 ISO 190
DEFDBL A-Z: DIM A(12) RANDOMIZE TIMER SCREEN 12 GOSUB 300 GOSUB 400 GOSUB 500 GOSUB 600 ON T% GOTO 130, 140, 150 END
'Resee d random number generato r 'Assume VGA graphics 'Set parameter s 'Iterate equations 'Display results 'Test results
Automatic generation of iterated function systems 300 310 320 330 340 350 360 370 380 390
REM Set parameter s X = .05: Y = .05: XE = X + .00001: YE = Y FOR 1% = 1 TO 12: A(I%) = .1 * (INT(25 * RND) - 12): NEXT 1% J0 = ABS(A(1)* A ( 4 ) - A ( 2 )* A(3)) Jl = ABS(A(7) * A(10) - A(8) * A(9)) IF JO + Jl = 0 OR JO > 1 OR Jl > 1 THEN GOTO 320 ^Not contracting P = JO/(JO + J l) T% = 3: LSUM = 0: N = 1: Nl = 0: N2 = 0 XMI N = 1000000#: XMA X = -XMIN : YMI N = XMIN : YMA X = XMA X RETURN
400 410 420 430 490
REM Iterate equations IF X < > XE THEN IF RND > P THEN R% = 6 ELSE R% = 0 XNEW = A(l + R%) * X + A(2 + R%) * Y + A(5 + R%) YNEW = A(3 + R%) * X + A(4 + R%) * Y + A(6 + R%) RETURN
500 510 520 530 540 550 560 570 590
REM Display results IF N < 100 OR N > 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 670 690
REM Test results GOSUB 700 'Calculate Lyapunov exponent GOSUB 900 'Calculate correlation dimension IF N > 21000 THEN T% = 2 'Candidate IFS found IF ABS(XNEW) + ABS(YNEW) > 1000000# THEN T% = 2 'Unbounded IF N > 998 AND (F < 1 OR L > -.2) THEN T% = 2 'Uninteresting IF LEN(INKEY$) THEN T% = 0 'User key press X = XNEW: Y = YNEW: N = N + 1 RETURN
700 710 720 730 740 750 760 770 790
REM Calculate Lyapunov exponent XSAVE = XNEW: YSAVE = YNEW: X = XE: Y = YE GOSUB 400 'Reiterate equations DLX = XNEW - XSAVE: DLY = YNEW - YSAVE: DL2 = DLX * DLX + DLY * DLY DF = 10000000000 # * 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
900 910 920 930 940 950 960 970 990
REM Calculate fractal dimension IF N < 200 THEN GOTO 990 'Wait for transient to settle IF N = 200 THEN D2MAX = (XMA X - XMIN ) A 2 + (YMA X - YMIN ) A 2 IF N = 200 OR RND < .02 THEN XS = X: YS = Y 'New reference point DX = XNEW - XS: DY = YNEW - YS D2 = DX * DX + DY * DY IF D2 < .001 * D2MAX THEN N2 = N2 + 1 IF D2 < .00001 * D2MAX THEN Nl = Nl + 1: F = .434294 * LOG(N2 / Nl) RETURN
3 99
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. Al l rights reserved
401
Chaos and Graphics
MODELING AND RENDERING OF NONLINEAR ITERATED FUNCTION SYSTEMS E D U A RD G R O L L ER
Technical University Vienna, Institute for Computer Graphics, Karispiatz 13/186/2, A-1040 Vienna, Austria, e-mail: [email protected],ac.a t Abstract—Iterate d Function Systems are typically defined throughsets of contractive linear transformations . The theory of Iterated Function Systems is based on the contractivity but not on the linearity of the defining functions. Piecewise bilinear distortions of grids are used in this work to specify nonlinear Iterated Function Systems . Nonlinear Iterated Functions Systems are characterize d by a higher degree of flexibility and greater modeling capability than their linear counterparts . Modeling and rendering aspects are discussed . Limit sets of* 2D nonlinear Iterated Function Systems are represente d by approximating point sets. Limit sets of 3D nonlinear Iterated Function Systems are either rendered by displaying approximating point sets (z-buffer approach) or through ray tracing an approximate set of 3D solids. Example images of a test implementation are presented . 1. INTRODUCTION
A n Iterated Function System (IFS) is a concise specification of a typically complex and fractal geometric shape [ 1 ] . The following somewhat mathematica l introduction describes the most important definitions and theorems Iterated Function Systems are based on. Given a complete metric space (X, d), with X being a set and d:X X X ^^ R being a distance function on elements ofX, an IFS is defined through a finite set of affine, contractive functions w,: X - ^ X ( notation: IFS {X;wi,.. . ,Wjs/}). A function w, is contractive if and only if there exists a so-called contractivity factor 5/ E [0, 1), such that d{Wi{x),
Wi(y)) < Si*d{x, y)
Vx , y E X
The metric space (X , d) is now used to define a metric space ( / / ( X ) , /z), where H(X) contains the nonempty compact subsets of X a nd h{d) denotes the Hausdorff distance between elements A and B of H{X): h(A,B) max {max min d{x, y ), max min d{x,
y)]
As / / ( X ) contains only the nonempty compact subsets of X the distance h{A, B) is well-defined for A, B EL H{X). In our work set X will either be 2D or 3D space and H(X) will thus either consist of most 2D or 3D objects one can think of. The Hausdorff distance on elements of H(X) allows the comparison of 2D or 3D objects. Iterated Function Systems specify invariant limi t sets where convergenc e is with respect to the Hausdorff distance h{). A function W/: X -^ X is easily extended to w,: H(X) ^ / / ( X ) by Wi(A)^
{Wi(x)\xeA},
ABH(X)
Given an IFS {X; Wi, . . . , Wj^} then the contractive functions w, (extended from functions X - ^ X t o func-
tions H(X) ^ H{X)) specify a function W.HiX) H{X) as follows (Hutchinson operator):
W{A)=
U Wi(A),
•
AEH(X)
Function W{)'\s contractive with contractivity factor s = max { ^ 1 , . . ., 5AA} . Due to the contractivity of W() it can be shown that there is a unique set A', called the attractor of the IFS, that satisfies A' =
W(A')
Furthermore any element A E H{X) will be eventually mapped onto this attractor A' under repeated application of function W{), i.e., A' = li m
W{A)
^AGH{X)
A n IFS is thus a very concise descriptfon (e.g., an affine function in the plane is specified with only six numbers) of the attractor A\ which is very often a fractal set. Algorithms for calculating the attractor ^4' of an IFS are discusse d in a later section. IFSs have been used in computer graphics, e.g., for modeling[2, 3] as well as for data compressio n [ 1, 4 ] . For further details on fractals and IFSs see for example [ 5 ] . 2. NONLINEAR ITERATED FUNCTION SYSTEMS
The theory of IFS, i.e., unique attractor^', convergence of any set A to this attractor A' under application of function W{), is based on the contractivity of the functions Wi and W. There are some reasons , which are however not imperative, to use affine maps for the specification of functions Wt: affine functions are easily manageable , they are well understood and they can be specified in a concise way through a matrix and translation vector (see Fig. 1). Affin e transformations describe linear mappings, i.e., lines are mapped to lines,
Reprinted from Comput. & Graphics Vol. 18, No. 5, pag. 739-748, 1994
402
E. GROLLER
W3
^
JT
<3=(o rx^ ro.5
oYfxV 1^0.2
^
c=-0.7+0.1i
interpolation of the adjacent grid points. Figure 4 illustrates the situation in two dimensions. An extension to three dimensions is, however, straightforward. A two-dimensional point P = (P^, P^) is given by its two Cartesian coordinates and P denotes the point after transformation. Ps^ is an original grid point and Ps,t denotes the corresponding transformed grid point. Then the transformed point P of an interior point P is calculated as follows:
P = (l -v)*[Pij*i\
-u)-\-Pi^u>]
with P^
and V
Pf^i.j - PIJ
P' py
Pjj _
py
Defining the transformation only for interior points of the grid is sufficient if the transformed grid lies within the untransformed one. This ensures that the transformation of no exterior points is required for the subsequent calculation of the attractor of the IFS. Furthermore, if the transformed grid lies within the boundaries of the untransformed grid then contractivity, which is essential for the existence of and convergence to a unique attractor, is guaranteed. Starting with
c=-0.5+0.1i
Fig. 2. Nonlinear IFS {C; M^I, ^2} with w, = +Vz - c and W2 = -Vz - c.
Nonlinear iterated function systems
=:W W2^
«AA IL
^
W2_
w^mi Fig. 3. Nonlinear variations of the Sierpinski triangle, IFS { i ? ^ ; H^i, W2, W 3 } .
a sufficiently large grid has the additional advantag e of easily producing a bounding volume hierarchy, which is then used in rendering the attractor of 3D nonlinear IFS. Details are given in the following section. Figure 5 shows an example of a 2D linear IFS and Fig. 6 shows a similar 2D nonlinear IFS. There are different approache s to define nonlinear functions through grid distortion. One method specifies the transformation of each grid point explicitly. Although this gives a high degree of control on the final outcome it might be cumbersom e for large grid sizes. Barr [6] describes some global deformation schemes , i.e., bending, twisting, tapering, that are also applicable to our 2D or 3D grids. Thereby groups of grid points are
transformed simultaneousl y and coherently. With tapering, for example, a nonlinear and nonuniform scaling is specified. Functions Wi and W2 of the nonlinear IFS in Fig. 6 are examples of the bending operation. Twisting describes a nonuniform rotation of grid points around a predefined axis. High level manipulation of the 2D or 3D grid enables a fast and intuitively easy definition of nonlinear IFS. Some of these techniques were applied to generate the color plates. 3. RENDERING OF NONLINEAR ITERATED FUNCTION SYSTEMS
There are basically two types of algorithms for the approximate calculation of the attractor of a linear IFS. Both types can be applied with some modifications to nonlinear IFS as well. The stochastic algorithm proceeds as shown in Fig. 7. Starting with an arbitrary point P one of the functions vvi, . . ., w^^ is selected at random and applied to point P. Repeatingly selecting a function and transforming the previously calculated e of points that, point (P« = W/ (P„_i)) yields a sequenc due to the chaotic dynamics of the process , closely approximates the attractor of the IFS (with very high probability). Depending on the choice for the initial point P the first few points of the above sequenc e may not yet be close to the attractor. They should therefore be eliminated from the approximating point set. d to each function Wi to A probability Pi is assigne account for varying contractivity factors. Probabilities should be chosen so that the generate d point sequenc e uniformly converges to the attractor of the IFS, i.e., functions with low contractivity are assigne d a higher probability. As nonlinear functions may have locally varying contractivity, determining these probabilities is not as easy as for linear functions. Peitgen and Saupe [ 7 ] present a simple algorithm that accounts for the locally varying contractivity of functions used for approximating Julia sets (Fig. 2). The same strategy, which basically ensures that the point sequenc e of the stochastic algorithm visits regions of the attractor with low contractivity more often, can be used for nonlinear IFS as defined above. Drawing a point sequenc e of a 2D IFS is simple. For 3D IFS, however, an image plane and type of pro-
^y fc
w—
•
p
4
-^
1
Pi+lj+1
V 1
Pijl
*
u
|Pi+lj
untransforaied grid
403
transformed grid
Fig. 4. Bilinear interpolation of interior point Pin R^
404
E. GROLLER
Fig. 5. Linear IFS {R^; w,, W2, W3, W4} similar to Fig. 6.
wi
:w
"1 W2
^
wv
-sy^
3
Fig. 6. Nonlinear IFS {R^', Wi, W2, w^, W4} similar to Fig. 5. jection (parallel or perspective) has to be defined. In this case we preserve depth information through depth cueing, which produces quite acceptable results. Thereby the color values of points farther away from the viewer are attenuated according to distance. A pixel may be assigned the color value of the point closest to the viewer or a weighted average of all points projecting onto the same pixel may be taken. The second algorithm for approximating an IFS is an immediate result of the fact that every object A will approximate the attractor /i' of an IFS under iteration of function IV{). Therefore the deterministic algorithm approximates the attractor as follows: A' :
W
\A)
where nmax determines the level of accuracy of the approximation. We did use the deterministic algorithm for visualizing 3D nonlinear IFS. Although the stochastic algorithm is usually much faster, there are same advantages to using the deterministic algorithm. Start-
ing with a 3D solid A the deterministic algorithm produces a 3D solid approximation of the fractal attractor instead of a mere point set as the stochastic algorithm does. So hidden surface procedures applied to such a 3D approximation greatly increase the depth perception for the viewer. In addition the simulation of complex global lighting effects, e.g., shadowing, shading, reflection, transparency, is often tied to 3D models with surface normals. Fractal objects do not have surface normals that are, however, required to evaluate a more complex shading model. Hart and DeFanti[3] propose several strategies to simulate nonexistent surface normals of their linear fractals. As we render only 3D approximations, ^"'^^A), of the attractor of an IFS there is no problem with missing normal vectors. Our algorithm for rendering 3D nonlinear IFS uses ray tracing[8] for high-quality image generation and follows [3] and [ 9 ] . Ray-object intersection testing is the most time consuming step in the ray-tracing process and is accelerated for linear as well as nonlinear IFS by using a hierarchical data structure. Nonlinear functions are chosen, as pointed out above, so that W{A) ^ A. Therefore
PO = P for n = 1 to nmax do begin f wl(Pn-l)^ith probability PI Pn = •! I wN(Pn-l)yi^ith probability PN draw Pn end Fig. 7. Stochastic algorithm for IFS {^; w,, . . . , w^}.
W^'^^^A) ^ W^"
W\A) c W{A) ^ A
constitutes an efficient hierarchical data structure that bounds the attractor on all levels of approximation. Only if a ray intersects an object of W'(A) then the corresponding elements of W'^\A) must be further considered. Due to nonuniform contractivity W'^"'^''{A) contains objects of sometimes largely differing sizes. So rendering ^^"""^"(^4), i.e., all objects on the same level of recursion, especially visualizes the zones with low contractivity. Hart and DeFanti[3] subdivide objects in low contractivity regions to a much higher level, so as to get the best approximation of the attractor that is possible with respect to the given image
405
Nonlinear iterated function systems nonlin. IPS #of functions grid size contract.
comment
"tapering"
4 nonlinear
2x4x2
0.55
tapering of Sierpinski tetrahedron
"twisting"
4 nonlinear
2x4x2
0.69
twisting of Sierpinski tetrahedron
"fantasy"
5 nonlinear
3x2x3
0.64
tapering of grid
"plant 1"
5 linear
2x2x2
0.50
linear plant modeling
5 nonlinear
2x4x2
0.68
nonlinear plant modeling
1 "plant 2"
|
Fig. 8. Statistics of examples of IFSs. resolution. As we are interested in the convergenc e . process itself a fixed level of recursion is appropriate Two types of initial objects A were used in our deterministic algorithm: spheres and the tessellate d outer surface of the grids, which were used to define the nonlinear functions, themselves . Taking a sphere as an ini: First ray-sphere intertial object has two advantages section testing is cheap. Second if W'{A) contains only d with sufspheres then W''^\A) may be approximate ficient accuracy by transforming only the sphere centers and determining the radii of the spheres in W''^\A) considering the contractivity factors of functions Wi. With such an approach W^\A) is not determined t is determined , which is, exactly but only a superse however, in most cases sufficient to visualize the con.A vergence behavior of the approximation process sphere as initial object therefore allows a fast approximate determination of W"'^''{A), which in turn is an approximation of the attractor A'. Taking the initial (function w, defining) grid as initial object A produces results that are more exact but are, at the same time, also more time consuming: Ray-object intersection testing and recursive refinement (going from W'{A) to W''^\A))is much more costly with a grid surface than with a sphere. . Antialiasing has been done through oversampling Refinement of objects may stop adaptively as soon as their projection onto the image plane is smaller than
1 plate
a pixel area. For details see [ 3 ]. In addition shadow rays are cast to each given light source to determine if a point of intersection is in shadow or not. 4. IMPLEMENTATION, RESULTS
We have implemented a system for the interactive specification and rendering of 2D nonlinear IFS (in Turbo Pascal) and a system for the high quality rendering of 3D nonlinear IFS (in C++). The color plates (resolution 360 X 384) show some nonlinear and one linear 3D IFS, which have been rendered with either the stochastic or the deterministic algorithm. Corresponding statistics are given in Figs. 8 and 9. The appendix contains a detailed specification of the IFSs of Fig. 8. A nonlinear function is thereby defined by specs of the points of a regular ifying the transformation initial grid. Color plates 1 through 3 show nonlinear . Plates 1 and distortions of the Sierpinski tetrahedron 2 illustrate nonlinear scaling along the vertical axis (tapering). Plate 1 shows the object that results after applying the tapering functions to the initial grid twice. The effects of the nonlinear functions are clearly visible. Plate 2 depicts the resulting attractor visualized with the stochastic algorithm. Plate 3 illustrates nonlinear rotation along the vertical axis (twisting). Portions of the Sierpinski tetrahedro n with higher z-values are rotated more heavily than lower lying parts. Plate 4 is the image of a rather strange looking nonlinear IFS
nonlin. IFS
algorithm
1
"tapering"
deterministic, A=grid, nmax=2
2
"tapering"
stochastic, 1.000.000 pts.
3
"twisting"
deterministic, A=sphere, nmax=6
4
"fantasy"
deterministic, A=grid, nmax=6
5
"plant 1"
deterministic, A=grid, nmax=l
6
"plant 1"
deterministic, A=sphere, nmax=6
7
"plant 2"
deterministic, A=grid, nmax=l
8
"plant 2"
deterministic, A=sphere, nmax=7 Fig, 9. Statistics for color plates.
|
|
406
E. GROLLER
Plate 1. IPS "tapering," nmax = 2.
Plate 4. IPS "fantasy.'
Plate 2. IPS "tapering."
Plate 5. IPS "plant 1," nmax = 1.
Plate 3. IPS "twisting.'
Plate 6. IPS "plant 1," nmax = 6.
407
Nonlinear iterated function systems
Plate 7. IFS "plant 2," nmax
?-5;r "''B'lffc: f l y f l v' •11;
r • ;flili|j"f';
Plate 8. IFS "plant 2," nmax = 7.
linearity of the defining functions allows the specification of nonlinear IFS with greater modeling flexibility . Nonlinear functions are defined through grid distortions. Currently we are working on an interactive module that should enable an easy and intuitive specification of nonlinear functions. Rendering algorithms for 2D and 3D nonlinear IFS have been discussed . Examples show the wide variety of recursive objects that can be modeled with nonlinear IFS. Future work wil l include parametric approximation of grid points {e.g., with B-Splines or NURBS), more elaborate color assignmen t (each function of a nonlinear IFS is assigned a color, then different strategies may be used to assign varying color values to different parts of the resulting attractor), grid point animation, etc. There might be some future application of nonlinear Iterated Function Systems for fractal image compression. Jacobs, Fisher, and Boss[10] discuss a pixel-based approach that makes use of so called local IFS. Local IFS do not transform the whole underlying metric space but only subsets thereof. As nonlinear IFS are defined on the interior of a regular grid they are local by definition. Right now pixel-based fractal compressio n techniques reduce the tremendous search cost involved to determine the compressin g local IFSs by reducing the allowable class of functions (only simple affine transformations lik e scaling, rotation by 90°, 180°, 270°, horizontal and vertical reflection). Faster algorithms in the future should allow to enlarge the class of admissible functions that could then include nonlinear functions. Nonlinear Iterated Function Systems may be more appropriate to encode pixel blocks which contain, e.g., curved edges, than simple affine transformations. Acknowledgement—The author would like to thank Martin Schwarzinge r for implementing an interactive 2D IFS modeling system. Thanks to Johann Schipfer for implementing the rendering software for 3D nonlinear IFS and for his help in generating the color plates. The helpful suggestion s of an anonymous reviewer were much appreciated . REFERENCES
with five functions. Plates 5 through 8 show the difference of linear and nonlinear IFS. Plate 6 displays a plant-like object that is defined by five linear functions. These functions could be defined by matrix operations as well. But as our program handles functions as grid distortions only, the Unear functions of IFS "plant 1" are specified accordingly: Plate 8 shows the object that results from somewhat similar but nonlinear functions than those used in Plate 6. Using the initial grid as initial object A and taking nmax to be one in Plates 5 and 7, allows to visualize how the defining functions of IFSs "plant 1" and "plant 2" work. Plate 7 illustrates the nonlinear grid distortions used to specify the functions of "plant 2." The greater flexibility of nonUnear IFS may be used to increase realism when modeling natural phenomen a (compare Plate 6 and Plate 8 ). 5. SUMMARY
Iterated function systems are usually defined by a set of linear contractive functions. Abandoning the
1. M. Barnsley, Fractals Everywhere, Academic Press,New York (1988). 2. E. Groller, Fractals and solid modeling. Comp. Graph. Forum 11 (3), 415-424 (1992). 3. J. C. Hart and T. DeFanti, Efficient anti-aliased rendering of 3D-linear fractals. Comp. Graph. 25(4), 91-100 (1991). 4. M. Barnsley and L. Hurd, Fractal Image Compression, AK Peters, Wellesley, MA (1992). 5. H. O. Peitgen, H. Jiirgens, and D. Saupe, Chaos and Fractals, New Frontiers of Science, Springer, Berlin (1992). 6. A. H. Barr, Global and local deformations of solid primitives. Comp. Graph. 18(3), 21-30 (1984). 7. H. O. Peitgen and D. Saupe, The Science of Fractal Images, Springer, Berlin (1988). 8. A. Glassne r (Ed.), An Introduction to Ray Tracing, Academic Press, New York (1989). 9. J. T. Kajiya, New techniques for ray tracing procedurally defined objects. Comp. Graph. 17(3), 91-102 (1983). 10. E. W. Jacobs , Y. Fisher and R. D. Boss, Image compression: A study of the iterated transform method, Signal Processing 29, Elsevier Science Publishers , 251-263 (1992).
408
E. GROLLER APPENDIX
In the following Tables the functions of the IFSs used for the color plates are given. Each function is defined by distorting a regular initial grid. A table contains the point coordinates of the initial grid (column "initial" ) and for each function of the IPS the correspondin g transformed grid point is given (columns "fl, " "f2," • • •)• For reasons of uniformity the linear functions of IPS "plant 1" are given as grid distortions as well (Table 5). Table A1. IPS "tapering" 2 X 4 X 2 grid. Initial
fl
f2
f3
f4
0.00 0.00 0.00
0.00 0.00 0.00
50.00 0.00 0.00
25.00 0.00 50.00
25.00 50.00 25.00
0.00 0.00 100.00
0.00 0.00 50.00
50.00 0.00 50.00
25.00 0.00 100.00
25.00 50.00 75.00
0.00 33.33 0.00
6.67 • 16.67 4.17
56.67 16.67 4.17
31.67 16.67 54.17
31.67 66.67 29.17
0.00 33.33 100.00
6.67 16.67 45.83
56.67 16.67 45.83
31.67 16.67 95.83
31.67 66.67 70.83
0.00 66.67 0.00
13.33 33.33 8.33
63.33 33.33 8.33
38.33 33.33 58.33
38.33 83.33 33.33
0.00 66.67 100.00
13.33 33.33 41.67
63.33 33.33 41.67
38.33 33.33 91.66
38.33 83.33 66.67
0.00 100.00 0.00
20.00 50.00 12.50
70.00 50.00 12.50
45.00 50.00 62.50
45.00 100.00 37.50
0.00 100.00 100.00
20.00 50.00 37.50
70.00 50.00 37.50
45.00 50.00 87.50
45.00 100.00 62.50
100.00 0.00 0.00
50.00 0.00 0.00
100.00 0.00 0.00
75.00 0.00 50.00
75.00 50.00 25.00
100.00 0.00 100.00
50.00 0.00 50.00
100.00 0.00 50.00
75.00 0.00 100.00
75.00 50.00 75.00
100.00 33.33 0.00
43.33 16.67 4.17
93.33 16.67 4.17
68.33 16.67 54.17
68.33 66.67 29.17
100.00 33.33 100.00
43.33 16.67 45.83
93.33 16.67 45.83
68.33 16.67 95.83
68.33 66.67 70.83
100.00 66.67 0.00
36.66 33.33 8.33
86.67 33.33 8.33
61.67 33.33 58.33
61.67 83.33 33.33
100.00 66.67 100.00
36.67 33.33 41.67
86.67 33.33 41.67
61.67 33.33 91.67
61.67 83.33 66.67
100.00 100.00 0.00
30.00 50.00 12.50
80.00 50.00 12.50
55.00 50.00 62.50
55.00 100.00 37.50
100.00 100.00 100.00
30.00 50.00 37.50
80.00 50.00 37.50
55.00 50.00 87.50
55.00 100.00 62.50
Table A2. IPS "twisting," 2 X 4 X 2 grid. Initial
fl
f2
O
f4
-60.10 -25.00 -60.10
-42.50 -25.00 -42.50
7.50 -25.00 -42.50
-17.50 -25.00 7.50
-17.50 25.00 -17.50
-60.10 -25.00 110.10
-42.50 -25.00 42.50
7.50 -25.00 42.50
-17.50 -25.00 92.50
-17.50 25.00 67.50
-60.10 8.33 -60.10
-52.05 -8.33 -30.05
-2.05 -8.33 -30.05
-27.05 -8.333 19.95
-27.05 41.67 -5.05
-60.10 8.33 110.10
-30.05 -8.33 52.05
19.95 -8.33 52.05
-5.05 -8.33 102.05
-5.05 41.67 77.05
-60.10 41.67 -60.10
-58.06 8.33 -15.56
-8.06 8.33 -15.56
-33.06 8.33 34.44
-33.06 58.33 9.44
-60.10 41.67 110.10
-15.56 8.33 58.06
34.44 8.33 58.06
9.44 8.33 108.06
9.44 58.33 83.06
-60.10 75.00 -60.10
-60.10 25.00 0.00
-10.10 25.00 0.00
-35.10 25.00 50.00
-35.10 75.00 25.00
-60.10 75.00 110.10
0.00 25.00 60.10
50.00 25.00 60.10
25.00 25.00 110.10
25.00 75.00 85.10
110.10 -25.00 -60.10
42.50 -25.00 -42.50
92.50 -25.00 -42.50
67.50 -25.00 7.50
67.50 25.00 -17.50
110.10 -25.00 110.10
42.50 -25.00 42.50
92.50 -25.00 42.50
67.50 -25.00 92.50
67.50 25.00 67.50
110.10 8.33 -60.10
30.05 -8.33 -52.05
80.05 -8.33 -52.05
55.05 -8.33 -2.05
55.05 41.67 -27.05
110.10 8.33 110.10
52.05 -8.33 30.05
102.05 -8.33 30.05
77.05 -8.33 80.05
77.05 41.67 55.05
110.10 41.67 -60.10
15.56 8.33 -58.06
65.56 8.33 -58.06
40.56 8.33 -8.06
40.56 58.33 -33.06
110.10 41.67 110.10
58.06 8.33 15.56
108.06 8.333 15.56
83.06 8.33 65.56
83.06 58.33 40.56
110.10 75.00 -60.10
0.00 25.00 -60.10
50.00 25.00 -60.10
25.00 25.00 -10.10
25.00 75.00 -35.10
110.10 75.00 110.10
60.10 25.00 0.00
110.10 25.00 0.00
85.10 25.00 50.00
85.10 75.00 25.00
409
Nonlinear iterated function systems Table A4. IFS "plant 2," 2 X 4 X 2 grid.
Table A3. IFS "fantasy," 3 X 2 X 3 grid. Initial
fl
f2
B
f4
f5
Initial
fl
a.
f3
f4
f5
0.00 0.00 0.00
0.00 0.00 0.00
50.00 22.22 0.00
50.00 22.22 50.00
0.00 22.22 50.00
25.00 100.00 25.00
-21.20 -20.00 -23.37
-2.10 -20.00 -0.10
-10.00 0.00 -10.00
-7.07 -17.07 -10.00
12.20 -17.07 -1.12
-5.12 -17.07 11.12
0.00 0.00 50.00
0.00 20.32 25.00
50.00 22.22 25.00
50.00 22.22 75.00
0.00 20.32 75.00
25.00 100.00 50.00
-21.20 -20.00 23.37
-2.10 -20.00 0.10
-10.00 0.00 10.00
-7.07 -17.07 10.00
-5.12 -17.07 -11.12
12.20 -17.07 1.12
0.00 0.00 100.00
0.00 22.22 50.00
50.00 22.22 50.00
50.00 22.22 100.00
0.00 0.00 100.00
25.00 100.00 75.00
-21.20 -6.67 -23.37
0.90 -13.33 -0.10
-8.00 6.67 -10.00
-11.79 -12.36 -10.00
14.55 -13.36 -5.21
-2.77 -13.36 15.21
0.00 100.00 0.00
0.00 50.00 0.00
50.00 61.11 0.00
50.00 61.11 50.00
0.00 61.11 50.00
25.00 61.05 25.00
-21.20 -6.67 23.37
0.90 -13.33 0.10
-8.00 6.67 10.00
-11.79 -12.36 10.00
-2.77 -13.36 -15.21
14.55 -13.36 5.21
0.00 100.00 50.00
0.00 60.16 25.00
50.00 61.11 25.00
50.00 61.11 75.00
0.00 60.16 75.00
25.00 61.11 50.00
-21.20 6.67 -23.37
-1.10 -6.67 -0.10
-10.00 13.33 -10.00
-16.50 -7.64 -11.00
16.91 -5.64 -9.29
-0.41 -6.64 19.29
0.00 100.00 100.00
0.00 61.11 50.00
50.00 61.11 50.00
50.00 61.11 100.00
0.00 50.00 100.00
25.00 61.05 75.00
-21.20 6.67 23.37
-1.10 -6.67 0.10
-10.00 13.33 10.00
-16.50 -7.64 9.00
-0.41 -5.64 -19.29
16.91 -6.64 9.29
50.00 0.00 0.00
25.00 20.32 0.00
75.00 20.32 0.00
75.00 22.22 50.00
25.00 22.22 50.00
50.00 100.00 25.00
-21.20 20.00 -23.37
-0.10 0.00 -0.10
-8.00 20.00 -10.00
-21.21 -2.93 -7.00
19.27 -2.93 -13.37
1.95 1.07 23.37
50.00 0.00 50.00
25.00 22.09 25.00
75.00 22.09 25.00
75.00 22.09 75.00
25.00 22.09 75.00
50.00 100.00 50.00
-21.20 20.00 23.37
-0.10 0.00 0.10
-8.00 20.00 10.00
-21.21 -2.93 13.00
1.95 -2.93 -23.37
19.27 1.07 13.37
50.00 0.00 100.00
25.00 22.22 50.00
75.00 22.22 50.00
75.00 20.32 100.00
25.00 20.32 100.00
50.00 100.00 75.00
21.20 -20.00 -23.37
2.10 -20.00 -0.10
10.00 0.00 -10.00
7.07 -2.93 -10.00
5.12 -2.93 11.12
-12.20 -2.93 -1.12
50.00 100.00 0.00
25.00 60.16 0.00
75.00 60.16 0.00
75.00 61.11 50.00
25.00 61.11 50.00
50.00 61.11 25.00
21.20 -20.00 23.37
2.10 -20.00 0.10
10.00 0.00 10.00
7.07 -2.93 10.00
-12.20 -2.93 1.12
5.12 -2.93 -11.12
50.00 100.00 50.00
25.00 61.05 25.00
75.00 61.05 25.00
75.00 61.05 75.00
25.00 61.05 75.00
50.00 61.11 50.00
21.20 -6.67 -23.37
1.10 -13.33 -0.10
12.00 6.67 -10.00
2.36 1.79 -10.00
7.48 0.79 7.04
-9.84 0.79 2.96
50.00 100.00 100.00
25.00 61.11 50.00
75.00 61.11 50.00
75.00 60.16 100.00
25.00 60.16 100.00
50.00 61.11 75.00
21.20 -6.67 23.37
1.10 -13.33 0.10
12.00
6.67 10.00
2.36 1.79 10.00
-9.84 0.79 -2.96
7.48 0.79 -7.04
100.00 0.00 0.00
50.00 22.22 0.00
100.00 0.00 0.00
100.00 22.22 50.00
50.00 22.22 50.00
75.00 100.00 25.00
21.20 6.67 -23.37
-0.90 -6.67 -0.10
10.00 13.33 -10.00
-2.36 6.50 -11.00
9.84 8.50 2.96
-7.48 7.50 7.04
100.00 0.00 50.00
50.00 22.22 25.00
100.00 20.32 25.00
100.00 20.32 75.00
50.00 22.22 75.00
75.00 100.00 50.00
21.20 6.67 23.37
-0.90 -6.67 0.10
10.00 13.33 10.00
-2.36 6.50 9.00
-7.48 8.50 -7.04
9.84 7.50 -2.96
100.00 0.00 100.00
50.00 22.22 50.00
100.00 22.22 50.00
100.00 0.00 100.00
50.00 22.22 100.00
75.00 100.00 75.00
21.20 20.00 -23.37
0.10 0.00 -0.10
12.00 20.00 -10.00
-7.07 11.21 -7.00
12.20 11.21 -1.12
-5.12 15.21 11.12
100.00 100.00 0.00
50.00 61.11 0.00
100.00 50.00 0.00
100.00 61.11 50.00
50.00 61.11 50.00
75.00 61.05 25.00
21.20 20.00 23.37
0.10 0.00 0.10
12.00 20.00 10.00
-7.07 11.21 13.00
-5.12 11.21
12.20 15.21 1.12
100.00 100.00 50.00
50.00 61.11 25.00
100.00 60.16 25.00
100.00 60.16 75.00
50.00 61.11 75.00
75.00 61.11 50.00
100.00 100.00 100.00
50.00 61.11 50.00
100.00 61.11 50.00
100.00 50.00 100.00
50.00 61.11 100.00
75.00 61.05 75.00
-11.12
4 10
E. GROLLER
Table A5. IFS "plant 1,"2 X 2 X 2 grid. Initial
fl
f2
f3
f4
f5
-42.43 -40.00 -23.37
-0.20 -40.00 -0.20
-20.00 0.00 -20.00
-14.14 -24.14 -20.00
24.39 -24.14 -2.25
-10.25 -24.14 22.25
-42.43 -40.00 23.37
-0.20 -40.00 0.20
-20.00 0.00 20.00
-14.14 -24.14 20.00
-10.25 -24.14 -22.25
24.39 -24.14 2.25
-42.43 40.00 -23.37
-0.20 0.00 -0.20
-20.00 40.00 -20.00
-42.43 4.14 -20.00
38.53 4.14 -26.74
3.89 4.14 46.74
-42.43 40.00 23.37
-0.20 0.00 0.20
-20.00 40.00 20.00
-42.43 4.14 20.00
3.89 4.14 -46.74
38.53 4.14 26.74
42.43 -40.00 -23.37
0.20 -40.00 -0.20
20.00 0.00 -20.00
14.14 4.14 -20.00
10.25 4.14 22.25
-24.39 4.14 -2.25
42.43 -40.00 23.37
0.20 -40.00 0.20
20.00 0.00 20.00
14.14 4.14 20.00
-24.39 4.14 2.25
10.25 4.14 -22.25
42.43 40.00 -23.37
0.20 0.00 -0.20
20.00 40.00 -20.00
-14.14 32.43 -20.00
24.39 32.43 -2.25
-10.25 32.43 22.25
42.43 40.00 23.37
0.20 0.00 0.20
20.00 40.00 20.00
-14.14 32.43 20.00
-10.25 32.43 -22.25
24.39 32.43 2.25
PART VI COMPUTER ART
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 VI. Computer Art
Opinions have always been mixed about whether or not fractal computer graphics are art. For example, Roger James, a fluid dynamics programmer at Pratt and Whitney, wrote to me: Art is the creation of the mind, an idea. A painting, a piece of music, or a sculpture is only the embodimen t of that idea. Turning an idea into a work of art is a skill. There must be a direct relationship between what the observer sense s and the original idea. You have to see exactly what e the artist saw. Choosing coloration for Julia, Mandelbrot, and other fractal patterns is not art becaus the "artist" saw an equation and a set of rules, while the observer sees a colorful rendering of the Julia set. It may be interesting to look at, but it is not art. Tom McMillan, Editor of Resolution, has a different view: Art affects the sense of beauty, and we all know that beauty is in the eye of the beholder. Try as he or she might, an artist is not an artist unless his or her work affects someon e else's sense of beauty. The so-called art world tends to discredit art in the computer graphics medium, making it difficult for artists even to get an audience . While [computer art] may not rank up there with Monet's paintings, it nonetheles s does affect my sense of beauty. You may decide for yourself if the images in this book should be considere d high-quality art. I look forward to hearing from readers . See my web site for some of the latest information on fractal art and for web sites on fractals and chaos: http://sprott.physics.wisc.edu/pickover/home.htm . Also see the Usenet newsgroup sci.fractals for more reference s to chaos, fractals, and art. For a fascinating web exploration of fractal art by many different artists, see the webring "The Infinit e Fractal Loop" at http://vv^w.fractalus.com/ifl/ . If Leonardo da Vinci were alive today, would he forsake canvas and brush for a computer terminal? Would he be interested in fractals and chaos? Even if Leonardo could not obtain funding from the National Science Foundation or the National Endowment for the Arts, he could - with just a persona l computer - create, manipulate, and store sophisticate d art works. Colors could be mixed and chosen from a palate of millions of different hues. Screen resolution could emulate the grit of the canvas. His colleagues from around the world could receive his images over the world wide web for their comment and collaboration. Probably Leonardo would spend a large amount of his time inventing entirely new computer input devices to substitute for today's standard mouse. These devices would allow him to precisely emulate his own masterful brush stokes, the viscosity and drip of wet paint, or a chisel chipping away at an imaginary chunk of shiny marble. Within the next decade , persona l computers will increasingly feature hands-on manipulation of computer-generate d images along with tactile sensation s and force feedback. Artists such as Leonardo will work within an artificial reality, where computer sensors measure the position of the head, and track eye and hand movements . Voice recognition programs will allow Leonardo to make voice requests , and special goggles will allow him to peer into colorful new worlds limited only by computers and the imagination. Today, computer graphics has become indispensabl e in countless areas of human activity from colorful and lighthearted television commercials , to strange new artworks, to evolutionary biology, to processe d images from the edges of the known universe. Whether advertising a commercial product, visualizing complicated data, or creating art just for fun, computer graphics allows human creativity and imagination to soar in ways never before possible. I 413
414 conclude this introduction by adding my voice to the chorus of others who sugges t there is often a fine line between science and art. Sven G. Carlson in his letter to Science News says it well: Art and science will eventually be seen to be as closely connecte d as arms to the body. Both are vital elements of order and its discovery. The word "art" derives from the Indo-Europea n base "ar", meaning to join or fit together. In this sense , science, in the attempt to learn how and why things fit, becomes art. And when art is seen as the ability to do, make, apply or portray in a way that withstands the test of time, its connection with science becomes more clear.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
415
Chaos and Graphics
AUTOMATI C PARALLEL GENERATION OF AEOLIAN FRACTALS ON THE IBM POWER VISUALIZATIO N SYSTEM CLIFFORD A. PICKOVER
IBM T. J. Watson Researc h Center, Yorktown Heights, NY 10598, USA Abstract—Simple approache s to pattern generatio n using a parallel graphics computer are described . Using these methods , a computer can automatically select parameter s and generat e a large collection of diverse, aestheticall y appealing fractal patterns . Computationa l recipes are included to encourag e reader involvement. The describe d approache s will work using inexpensive persona l computers , although computation s done in parallel provide for much quicker generation . The following section describes a preferred hardware and software environment for computationa l speed, Science is not about control. It is about cultivating a perpetua l although the methods described in this paper will work condition of wonder in the face of something that forever l computers . grows one step richer and subtler than our latest theory about on standard persona it. It is about reverence , not mastery. 2. HARDWARE AND SOFTWARE OVERVIEW Richard Powers, The Gold Bug Variations 1. INTRODUCTION
The line between science and art is a fuzzy one; the two are fraternal philosophies formalized by ancient Greeks like Eratosthene s and Aristophanes . Computer graphics and mathematic s help reunite these philosophies by providing scientific ways to represen t natural and artistic objects [ 1 ]. This informal paper concerns the generation of mathematically and visually interesting patterns from formulas implemented on a parallel graphics supercomputer. One of the most interesting challenges for those interested in aesthetic pattern formation by computationa l meansis the developmen t of algorithms for the automatic generation of interesting forms. The simple methods described here virtually guarante e users an infinite collection of attractive structures with only minimal user input. When human input is desired it usually only involves changes to the image boundaries and slight modifications to coloration. Aside from the artistic appeal of this approach , there is a more scientific, practical side to such explorations becaus e the images reveal and characteriz e the intricate behavior of algebraic transformation s in the complex plane. The mathematic s of the iteration of algebraic functions has been studied for many years. However, the striking beauty and complexity of patterns resulting from such iterative calculations has only been explored in detail within the last decade or two due, in part, to advances in computer graphics. B. Mandelbrot has been initially responsible for extending the theory and graphic presentatio n of iterated functions as a special class of the new geometry known as fractal geomet objects or patterns that aptry [2]. Fractals represen pear "self-similar"; i.e., no matter what scale is used to view the pattern, the magnified portion of the fractal shape looks similar to the original pattern. Structures repeat at all size scales.
Like the legal process of binding arbitration, all programming r language s are a compromise between the way the programme or user 'capitalist' thinks about solving a problem and the way the computer "laborer" actually goes about solving it. Bill Caffery, The Gartner Group Various software and hardware options facilitated the rapid generation of the high-resolution, high-iteration fractal images in this paper. The software for fractal generation was designed to run on 8 to 32 processors in parallel using a custom C-language program making Express calls on a graphics supercompute r known as an IBM Power Visualization System (PVS). Express (ParaSoft Corporation, Pasadena , CA, USA) is a software package addressin g all phases of the parallel application developmen t cycle in an architecture independen t manner. The PVS consists of a computationa l server, attached disk array, and high-resolution video display controller. The server uses up to 32 RISC processor s operating in parallel for computation. HiPPI (High Performanc e Parallel Interface) output from a PVS I/O processo r drives a PVS Video Controller to provide real-time video output (Fig. 1). The PVS model 4 uses Intel i860XP processors . Each processo r is tightly coupled with 16 MB of private local memory and can address up to 2GB of shared memory over a high bandwidth internal bus. Fractal images may be stored on a 21GB disk array which is HiPPI-attache d to the server. The disk array uses parallel transfer to disks for optimum performance (transfer rate up to 5 5 MB/second). 3. MATHEMATICA L BACKGROUND
I computed all of the intricate Julia sets J{fc) in this paper by iterating the map X: C ^ C, z„+, = zl-\- c, cGC
Reprintedfrom Comput. & Graphics Vol 18, No. S, pag. 407-416, 1994
(1)
416
C. A. PiCKOVER
approach the "cardiodisc" method for reasons that will become clear. First, choose a random angle 6 on the cardioid defined by
Mainframe/Supercomputer
r= aX[\
- c o s ( 0 )] +0.25
d in following para(Various values for a are discusse graphs.) Note that since the quantity ds/dB is constant only for a circle (where s is the circumference , and 6 the polar angle) the random selection of ^ values from a uniform distribution between 0 and 27r will not yield a uniform distribution along the circumference of the , we expect: cardioid. In general, for polar coordinates Disk Array Subsystem
Video Controller
Fig. 1. Configuration of the Power Visualization System.
^V('-(f))
In fact, a quick Monte Carlo demonstratio n of the resultant nonuniform probability distribution function for complex values of z and c. For a given value of c, is illustrated in Fig. 2a where one million random 6 , and then the distribution of radii the set of initial values ZQ for which z„ are bounded values were selected form the "filled-i n Julia set." (The Julia set is the in a cardioid defined by r = .5 X [1 + cos(^)] plotted. boundary of the filled-in Julia set.) Computer experi- Even though the probability peaks at both ends, this ments have shown that different values of c can lead does not imply that points will be sampled with equal to a beautiful variety of Julia sets, minute changes in frequency at both ends as shown in Fig. 2b. Figure 2b dQ c often causing enormous changes in the shape of the illustrates this by showing points for equal-space values. In fact, there is a higher sampling near the pinch Juliaset[l,2, 3, 4, 5, 6 ]. n of sample As is well-known, if the value of c is chosen outside point (r = 0). This higher concentratio the Mandelbrot set (denoted by M) for the self-squaring points near the pinch point is useful for the automatic e it is in this region that process in Eq. (1), infinity is the only attractor, and generation of fractals becaus of the mos t visuall y interestin g structures are som e the Julia set dissolves into a cloud of points variously known as Fatou dusts[4], "floating-dust" Cantor manifested at a given magnification. The entire iteration in Eq. 1, expresse d in real (x) sets [ 6 ], and Cantor dusts [ 3 ]. Mathematically speaks in a computer program, ing, this meansthat when the Julia set is a disconnecte d and imaginary (y) component : dust, the iteration in Eq. (1) has no attractive periodic therefore becomes points. The dust of points becomes thinner the farther w = x^ - / + a[( 1 - cos(^)] X cosiS) + .25 c is from the Mandelbrot set. (It can be shown that if I c| > 2 then J{fc) is guarantee d to be "totally discony=2xy-\- a[\ - cos(^)]sin(^) nected" [5].) If c is near the boundary of Af, the dust X = W. makes fascinating figures, always fractal, self-similar and exhibiting chaotic dynamics. e on re- We also wish to perform the iteration for 6 values on In the method described here, I concentrat gions near the Af cardioid and prominent circular disc a circular disc centered at — 1: abutting the cardioid. If c is in the main cardioid of M, then the Julia set is a simple closed curve. Such w = jc^ - y^ + a cos(^) - 1 curves are sometimes referred to as quasi-circles [ 5 ]. y = Ixy -\- a sin(^) (Jifc) will be a fractal curve if | c| > 0). If c is in the circular disc defined by | c + 11 < | then the iteration X = w in Eq. (1) has an attractive periodic orbit of period 2. Pinch points exhibited by these "period-2" Julia sets for each (x, y) pair in the complex plane. In a computer make the Julia sets topologically more complicated program, the values of cos B and sin B are precompute d than those in the cardioid case. outside the standard iteration loops for computationa l efficiency. The use of a = 0.5 and a = 0.25 for the 4. AUTOMATED GENERATION OF AEOLIAN FORMS cardioid and disc respectively would correspon d to a perfec t outline of the body an d disc of the M-set . Then began the Aeolian Harp of the Creation to tremble and We desire that the computer automatically choose to sound. Carlyle, 1869 points slightly outside the M-set cardiodisc in order to encouragethe formation of Cantor dusts, which tend The procedure for implementing a computer search to have a visually more complex structure than confor interesting Julia sets is straightforward. I call this nected forms. Therefore, for the cardioid, I use a '^
417
Automatic parallel generation of Aeolian fractals
(a)
1
1
1
1
1
1
1
1
1
1
Seahorse Valley
_[
40500 w 36000 i 31500 1 Elephant Valley g 27000
2 22500 I 18000
4
1
E 13500 ^
9000
_
4500 n 0.0
1
1
1
1
0.1
0.2
0.3
0.4
_
_
—
—
-
^
1 1 0.5 0.6 Radius
1 0.7
1 0.8
1 0.9
1.0
Probability Distribution Function (b)
u./u
1
1
1
1
•
•.
1
1
1
• ••
•
•
0.42
0.14
1
••
0.56
0.28
1
•
•
• •
•
•• • •• ••
• •• • •
0.00
< -0.14
-0.28 -0.42
-0.56
-0.90
•• • • • • •• •
•• • • ••
• •
•• •
•
'•• -0.76 -0.62 -0.48 -0.34 1 1 1 1
••* 0.08 -0.20 -0.06 1 1 1 X
1
0.22
1
0.36
0.50
Cardioid Sampling Fig. 2. Sampling the cardioid. (a) The nonuniform cardioid probability distribution function is easily illustrated in a Monte Carlo simulation (see text) for r = .5[1 + cos(^)]. (Equal sized r bins are used to create this plot.) Note the naturally high probabilities at the cardioid pinch point {r = 0) and opposite smooth end of the cardioid (r = 1). These regions correspon d to the "Elephant Valley" and the "Sea Horse Valley" regions of the M cardioid defined by r = a[l — cos(^)] -f 0.25. (These regions have been so-name d in the scientific literature {e.g., [11]) becaus e many structural features in Sea Horse Valley vaguely resemble sea horses and their tails. Those in Elephant Valley sometimes remind viewers of elephantine forms.); (b) Uniform 6 sampling of the cardioid leads to higher point density near r = 0.
0.52. (This correspond s to the second inner circumference in Fig. 3.) For the circle, I prefer a ^ 0.252. You may lik e to think of the various rings in Fig. 3 as ascending energy levels in which the probability of chaotic fragmentation increases for each successiv e level. As one explores the different a levels for a particular value of 6, a startling metamorphosi s of forms occurs. You will certainly wish to try different values for a, although much higher values wil l usually lead to forms too sparse to be visually interesting. The
probability of selecting a "good" c value by random searching of the complex plane can be estimated by comparing appropriate areas of the complex plane. For example, the area of the dust-strewn region around the cardioid for (.5 > a > .52) is easily estimated from 3/27r(a2 ~ «?)• By contrast, sampling uniformly and randomly over the much larger bounding area (—2 > Re(c)> 1 ) , ( - 1 .5 > Im{c)> 1.5) would yield a very small percentag e of visually interesting forms. Therefore, the cardiodisc approach appears to provide a sen-
418
C. A. PiCKOVER
1.5
1
1
1
1
1
1
1
1
No Attractive Orbits (The Land of Dust)
0.9
0.3
—
Period 1
— -0.3
-
-1.2
-
-2.0
;;|[ P2 ;; NlV
Area = 3/2na^
1
1
1
-1.4
-1.1
1 -0.8
—
J
{The Land of Quasi-Circles)
-1.7
—
1
\ 1
1
1
1
-0.5 X
-0.2
0.1
1
-
1 0.7
1.0
How to Generate Aeolian Fractals
Fig. 3. Cardiodisc method for Aeolian art forms, a is 0.5, 0.52, 0.54, 0.56, 0.58, and 0.6 for the cardioid, and 0.25, 0.27, 0.31, 0.33, and 0.35 for the disc. In practice, I usually used a = .52 for the cardioid and a = 0.252 for the disc. Higher a values (dotted lines) lead to uninteresting , sparse Julia sets. Note that any starting values within the central cardioid are attracted to a period 1-orbit. Those in the disc have a period 2-orbit. sitive test for excluding the vast majority of uninteresting cases that would result from a random choice of c. Of course, even with a > 0.5 and a > 0.25 for the cardioid and circle respectively, sometimes a randomly selected point will lie within M {e.g., on a small bud) where J(fc) is connected , or at a neck (e.g., where a bud touches a parent region that produces a Julia set with tendrils), or on one of the hairs of M that produces a dendritic tree-like form. Other possibilities are discussed in [ 5 ] . What term then shall we use for the plurality of predominately dusty forms near the boundary of M for the given a values (denoted by M«)? When showing the images to artists friends, they often made remarks as to their dusty, atmospheric , wind-blown look. Therefore, I've called the shapes Aeolian fractals after Aeolus, the Greek god of the winds in classical mythology. (According to most dictionaries, "Aeolian" has come to mean "produced as if by the wind." Interestingly there exist all kinds of natural Aeolian structures such as "Aeolian geological formations"—rocks accumulate d by the drifting action of the winds.) To enhance the quality and connectivity of structures in the images and visually bring out various fine structures, I used a computationa l technique called the "Milnor-Thurston distance estimator method" [ 3 ] . For M, one can estimate the distance d from a point c to the boundary of M by d{zo, Jc) = 2 — 7 - l n | z J.
(2)
(The derivation for this formula is discusse d in [ 3 ] , which also presents Pascal-like pseudocode. ) A similar approach can be used for Julia sets. In a practical implementation of Eq. (2) in a program, various threshold and overflow parameter s are set to efficiently carry out this computation (see Appendix A ) . In practice, we must save the orbit {Zo, Zi, Z2,. . . ,} and compute the derivative z' of the real and imaginary parts of the orbit as outlined in the pseudocode . I find it most useful to have the computer assign the final values of the image array A for the Julia set as follows:
A =
rO,
'\{d{zo)
[ m i n [ 2 5 5, logio(m) X s)]
where m is the iteration count (see Appendices). (Note that for c outside the A/-set, the filled-in Julia set and the Julia set are the same set.) Here d = r X {xmax xmin)/{nx - 1) where nx is the image resolution in the A'-direction, xmax and xmin are the high and low X-values of an image window, and r ~ 0.001. By default, the program uses picture boundaries of ( - 1 > x > 1) and ( - 1 > y> 1), which always yield interesting images. The user is then free to quickly magnify regions of particular interest if desired. Table 1 gives a sampling of c and r values, which produce intriguing Julia sets. The number of iterations used for the images ranged from 1000 to 8000. Except for a few values in Table 1 (see Acknowledgments) , all values were generate d using the Aeolian approach. In a computer program.
419
Automatic parallel generation of Aeolian fractals Table 1. Typical parameters .
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 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
Real
Imaginary
-.7499385 -.749940 -.15652 -.773998 -.763715 -.198616272 -.742575 -.14347945 -.803861 .27914 -1.251 .372233 .012809 .237555 .261248 .369591 .272038 .377575 .279875 -.756138 -.793179 -1.25259 -.76540 -.821962 -1.244433 -1.253 -1.252504 -.833830 -.760809 -.805695 -1.248875 -1.006340 .-.892487 -1.144088 -.749049 -.747699 -.751449 -.749989 -.742806 -.750109 -.749388 -.747950 .252094 .252235 .251341 .252368 -.03249108 .4052405 -.74858089 .37953073 -.09571678 -.194 -.481762 .2739 -.39054 -.38 .279132
0.0169434 0.0169316 1.032247 .112351 .094920 1.100346063 .208924 -1.0189654 .17854 -.60527 .010877295 0.271274 .655364 -.532015 -.002406 -.143015 -.006791 .266555 -.010962 -.067383 .145719 -.014401 -.094844 .179754 -.065279 .000484 -.015757 -.190779 .082441 -.162033 -.045499 .250420 .229020 -.207961 -.067997 -.075680 -.027124 -.016770 -.099015 -.010990 -.032905 -.054731 .000189 .000208 .000097 .000227 .79245342 .1467907 .06360646 .20567030 .65403036 .6557 -.595 .00742
Tau .0001 .001
1 .01 .01 .007
.05 .1 .05 .05 .00001 .005
.01 .01 .0001 .0001 .0001 .0001 .00001
.01 .01 .001 .015 .0001 .005 .005 .005 .005 .005 .005 .005 .005 .005 .005 .005 .005 .00005 .00005 .000005 .005 .000005 .000005 .000005 .000005 .000005 .000005 .001 .001 .001 .001 .001 .001 .001 .001
partition the job over an arbitrary number of nodes, n Nodes. The final step in aesthetic Aeolian fractal presentation involves the automate d mapping of escape times (image array values A) to color. To achieve rapid data coloration, custom software was used which runs on an IBM RISC System/6000using the GL programming interface. The program selects a waveform for the red, green, and blue color component s in RGB space. The frequency / m ay be user-determine d but the phase 0 is random. For gradual (smooth) mappings, three sine waves are used (Fig. 4). If more discontinuous maps are desired, various ramps and truncated sines may be used for each of the RGB components : \p = AX 127 X [sin(/X / + 0) + 1.], \P=AX256X
(sine wave)
[|(sin(/X / + (/))|], (sharpene d sine)
\P =AX256X
max[0, (sin(/X / + 0))], (truncated sine)
4/ = AX (256/5) X mod(/ + 0, s), (ramp, sawtooth)
where s = fX (160/.02). Here 0 < / < 255, corresponding to 255 entries in a 255 X 3 color table. In this manner, an infinite variety of interesting color look-up tables are generate d where coloration gives an indication of the rate of explosion for initial points in the complex plane. This waveform approach using random phases, of course, does not produce a color table filled with random numbers becaus e the use of sinusoids naturally forces correlations between neighbor values in the color table. These correlated values are much more useful artistically, and for the purpose of revealing structures of the Julia set, than "white" noise tables. If desired, the user may have the computer generate and step through hundreds of random-phas e tables and in real-time select the one with greates t appeal. For greater artistry, or to reveal structures in the map not as obvious with the automatic tables, the user may intervene and use a mouse to conveniently add or subtract Gaussian s of a particular width and position .01 -.6 to alter the RGB curves. In my program, 3-mouse but.01 -.6 tons alter the red, green, and blue maps, respectively. .01 .473906 The width of the Gaussia n is controlled by arrow-keys, and the color table is displayed on screen using three A is an output array in which each array element is overlapping colored curves (intensity vs. position in one byte, s is scale factor typically around 77 for the color table) that change shape upon modification. GL images in this article. Array elements that have value calls to a high performance hardware board facilitate 0 correspon d to black regions. Code Fragment 1 (Ap- rapid 24-bit color selection. Figure 4 shows a graphical representatio n of a typical pendix A) shows an implementation of this in the prod sinusoids. gramming language C. Code Fragment 2 (Appendix RGB color look-up table for phase-shifte s luminosity (inB) shows the main loop structure for carrying out Eq. The solid line in the graph represent (1) in parallel on a number of nodes for a set of values tensity) defined by L = 0.30 X R-^ 0.59 X G + 0.11 t of a color TV signal in the complex plane. Note the relative ease with which X B.{L would be the componen a programme r using Express language conventions may that would be shown on black and white TV). Using
420
C. A. PiCKOVER
/ / . / \ \
26
51
V. y\ \ I '\i>-'y I 77 102 128 154 179 205 230 256 Image Value Typical Color Map
Fig. 4. A typical RGB color look-up table for three phase-shifte d sinusoids . (Dotted, red; dashed , green; dotdash, blue; solid, luminosity respons e curve). in an automatic fashion. Like an Aeolian harp—a stringed instrument that produces musical sounds on exposure to the winds—a parallel computer allows mathematicians , artists, and programmer s to produce visually-interesting structures with littl e effort (see Fig. 5). Using the Power Visualization System, I was able to compute, store, and display low-resolution images in fractions of a second, and then store and print the most interesting Julia sets at higher resolution. Using typical parameter s (e.g., 15 processors , 1600 X 2400 a = ([0.30 cos((/),) + 0.59 cos((/)2) + 0.11 cos((/)3)]^ resolution, 1000 iterations) a high-resolution, high-it+ [0.30 sin(0,) + 0.59 sin(02) + 0.11 sin((/)3)]2)-'/^ eration image required approximately 2 minutes of elapsed time. (This time included computation of the distance estimator, disk storage,and screen display over and whose phase is determined by a network.) For this paper, the images were subsequently converted from a 1-byte/pixel image with a tan(0) color look-up table to a postscript file, and imaged on [0.30 sin(0i) +0.59 sin()2) + 0.11 sin()3)] a 35 mm slide via a Matrix QCR camera. Printing and " [(0.30 cos((/),) +0.59 cos((/)2) +0.11 cos((/)3)] format conversion were done in a parallel batch mode, so that the printing process did not delay additional (To derive this, recall that B sm(x -\- y) = B X Julia set computation. sin(j\:)cos(>^) + B cos(x)sin(>^).) An interesting future To artists and computer graphics programmers , the experiment would be to determine a useful luminance automated generation of Aeolian Julia sets has great contour, for example one that highlights a region of appeal becaus e the speed with which the structures can interest, and then have the computer automatically be generate d allows the human analyst the freedom to step through different RGB sinusoids that produce the experiment with many parameter s and even make target luminance curve. mistakes. (Imagine typing in a "wrong" parameter , and waiting a day to find the resultant screen all black.) 5. IMPLICATIONS The dust-producin g cardiodisc approach using random angle s allows user s to convenientlyselect from an inParallel Processin g is the Heimlich maneuve r on the Von finite reservoir of magnificent shapes . Neumann bottleneck. Bill Caffery, The Gartner Group Students and teachers will enjoy such an approach as they explore and demonstrat e the complexity and d with simple formulas. Mathematician s The idea that mathematics , pattern, and art are in- chaos associate e the sheer number extricably linked is not new—and neither is the ap- may find the approach useful becaus plication of that idea in computer graphics. What is of different structures they can generate and observe special is the use of rich software tools and powerful has the potential for making complex behaviors apnew hardware to quickly visualize mathematica l forms parent, which might have been overlooked using trathree equal-frequenc y sinusoids, the resultant luminosity usually changes in a useful way for an image. For example, for the most interesting images, both bright and dark areas should be present in the same image. The use of three equal-frequenc y sinewaves guarantee s a sinusoidal luminosity respons e curve whose frequency is equal to the RGB frequencies but whose amplitude is determined by
Automatic parallel generatio n of Aeolian fractals
421
Fig. 5. Examples of Aeolian fractals produced using the methods describe d in the text. ditional approaches . Interestingly, the use of parallel processin g makes this approach a good example of the "ultimate" image compressio n method. For example,
the image generation is so fast that I never store the resultant images after they are sent to a printer. I merely regenerat e them, as needed , from their single c value.
422
C. A. PiCKOVER
Fig. 5. (Cont'd.).
"No two are alike!" the saying goes, when describing the intricate patterns found in snowflakes. Likewise, the few illustrations of the fractals here are a small set of the remarkable panoply of structures automatically generate d by the algorithm. By "turning a dial" that controls a (or the other parameter s in the program fragments), an infinite variety of attractive designs is generate d with relative computationa l simplicity. For this reason, the Aeolian program may be of interest to designers of museum exhibits and other educationa l displays for both children and adults. Obviously the approach will work using inexpensive persona l computers, although computations done in parallel provide for much quicker generation . Interestingly, Professo r J. C. Sprott (University of Wisconsin) has recently suggeste d the use of the Lyapunov exponent, L, as an alternative method for automatically generating interesting Julia sets (persona l
communication). He has found that cases with small positive L values (0 > L > 0.2) produce interesting dusts, such as the ones in this paper. He prefers sets that are slightly connected , and these can be found by searching for small negative exponents . This approach uniformly samples all regions of the boundary of the Mandelbrot set and works for mappings other than the self-squaring process . Thus it appears that the Lyapunov exponent method, although conceptually more difficult, also provides a sensitive test for excluding uninteresting cases that would result from a random choice of c over some appropriate interval. For additional work in the area of automatic generation of aesthetic chaotic structures including dynamical systems see Sprott [7,8]. The automatic computer synthesis of mathematically-base d ornamenta l patterns such as self-decoratin g Easter eggs, marble patterns, and other chaotic structures [ 9 ] has also been
Automatic parallel generation of Aeolian fractals
423
Fig. 5. (Cont'd.). discusse d in the past. For an informative discussion on the frontiers of parallel programming, and predictions for the future, see CafFery[10]. For a Usting of other unusual Julia set c values that produce visuallyinteresting graphics, see Philip [11]. Acknowledgements—I thank R. Walkup for introducing me to Express, and for his kind and able assistanc e with parallelizing my software. I thank D. Piatt, J. Sprott, T. Jackman , and M. Frame for useful comments . Jay R. Hill suggeste d the c value for set 3 in Table 1. Ken Philip suggeste d values for sets 1, 2, 4, 5, and 6 in Table 1.1 maintain a list of interesting c values contributed by researchers . Please contact me for more information or to contribute to the list. REFERENCE S 1. Pickover, C, Mazes for the Mind: Computers and the Unexpected, St. Martin's Press, New York (1992). 2. Mandelbrot, B., The Fractal Geometry of Nature, Freeman, New York (1982). 3. Peitegen , H. and Saupe,D., The Science ofFractal Images, Springer, New York (1988).
Peitgen, H. and Richter, P., The Beauty of Fractals, Springer, New York (1986). Falconer, K., Fractal Geometry, Wiley, New York (1990). Schroeder , M., Fractals, Chaos, Power Laws, Freeman , New York (1991). Sprott, J., Strange Attractors, M& T Books, New York (1993). Sprott, J., Automatic generation of strange attractors. Comp. & Graph. 17, 325-332 (1993). Pickover, C, Chaos in Wonderland, St. Martin's Press, New York (1994). The current paper on Aeolian fractals is number 100 in a "Mathematics and Beauty Series" which emphasize s the aesthetic side of mathematics . Most of the papers in the series have been collected in the following books: Pickover, C, Computers, Pattern, Chaos and Beauty, St. Martin's Press, New York (1990); Pickover, C, Computers and the Imagination, St. Martin's Press, New York (1991); Pickover, C, Visions of the Future: Art, Technology, and Computing in the Twenty First Century, St. Martin's Press, New York (1994). 10. Caffery, W., Frontiers of parallel processing , MATTER 1(3), 11-55 (1991). {MATTER is published for clients of Advanced Technology Groups by Gartner Group Inc.
424
C. A. PlCKOVER
Reprints available from: Gartner Group, 56 Top Gallant Road, Stamford CT 06904-2212.) 11. Philip, A., The evolution of a three-armed spiral in the
Julia set, and higher order spirals. In Spiral Symmetry, I. Hargittai, and C. Pickover, (Eds), World Scientific, River Edge, NJ (1992).
APPENDIX A: PROGRAM FRAGMENT 1—DISTANCE ESTIMATOR /* Subroutine to enhance image quality with distance estimator method */ /* Routine called for each point—see Code Fragment 2*/ juliadistO {
int i; double temp; dist = 0; overflow = 1.0e20; huge = 100000; delta = tau*(xmax - xmin)/(res - 1); if(rsq>huge) { xder = yder = 0; flag = 0; /* The values for m, xorb, yorb and kPix come from Program Fragment 2 */ for(i = 0 ; i < m ; i + + ) { temp = 2*(xorb[i]*xder - yorb[i]*yder) + 1; yder = 2*(yorb[i]*xder + xorb[i]*yder); xder = temp; if (max(fabs(xder), fabs(yder)) > overflow) flag = 1; }
if (flag = = 0 ) dist = log(rsq)*sqrt(rsq/( xder*xder + yder*yder)); }
/* Fill in values for image array, A */ if (dist < delta) A[kPix] = (unsigned char) 0; else A[kPix] = (unsigned char) min(255, loglO(m)*77); } APPENDIX B: PROGRAM FRAGMENT 2— MAIN COMPUTATIONAL LOOPS /* . . . Determine the parallel environment (Express) variables -— */ exparam(&env); nNodes = env.nprocs; /* the number of nodes */ myNode = env.procnum; /* a particular current node */
/*
V res = 1600; xmax = 1; xmin = - 1 ; ymax = 1; ymin = - 1 ; maxit = 1000; /* 3-to-2 aspect ratio used for images */ dx = (xmax - xmin)/(res* 1.5); dy = (ymax - ymin)/res; /* Number of rows each parallel processor evaluates */ numrows = 3*res/(2*nNodes);
/* Make sure program will work on an arbitrary number of nodes */ if ((3*res/2)%nNodes = = 0 ) pixpernode = 3*res/(2*nNodes); else pixpernode = 3*res/(2*nNodes) + 1; if (myNode!=nNodes-1) numrows = pixpernode; if (myNode ==nNodes—1) numrows = 3*res/2 - (nNodes—1 )*pixpemode; xwidth = (xmax-xmin)*pixpernode/(1.5*res); myxmin = xmin-l-myNode*xwidth; myxmax = myxmin-I-xwidth; /* Allocate space for image array, A */ A = (unsigned char *) malloc(numrows*res*sizeof(char)); kPix = - 1 ; /* Each processor computes a strip in the i direction */ for(i=0, rrz=myxmin; (rrz<=myxmax) && (i < numrows); i+-l-, rrz += dx) { for(j = 0, iiz = ymin; (iiz<=ymax) && (j huge) goto Break; }
Break: juliadistO; } }
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
425 Chaos and Graphics
JULIA SET ART AND FRACTALS IN THE COMPLEX PLANE IAN D . ENTWISTLE
44 Woodside Gardens, Sittingbourne, KENT, ME 10 ISG, UK Abstract—In this paper, computer graphics is used to explore the dynamical behaviour of the Julia sets and related iterated sets derived by using alternative divergence tests. INTRODUCTION
The study of the dynamics of complex analytical maps started in the early 20th century[1, 2]; however, recently there has been renewed interest in this work due in part to advances in computer graphics[3]. The term "chaos" is often used to describe the complicated behaviour of nonlinear systems, and complex maps are useful in describing certain aspects of dynamical systems exhibiting irregular ("chaotic") behaviour [4, 5 ]. Algorithms for the generation of beautiful and complicated structures describing dynamic properties of
complex recursion are currently being studied, and their popularity is evidenced by the proliferating number of articles in the scientific and popular Uterature[6, 7]. Patterns resulting from the iteration of complex algebraic functions have been described in detail, and probably the best studied (and understood) function has been the self-squaring generator, z ~> z- + /i[3, 6]. One of my goals is to demonstrate how research in iterated complex maps reveals an inexhaustible new reservoir of magnificent shapes and images. Extension
Fig. 3. Plot of a Julia set for z •
Fig. 1. Pattern of a Julia set for z -• z^ + M with bounded points mapped as minimum values of | z | ^.
Fig. 2. Pattern of a Julia set for z -* z" + ^ resulting from variation of the value of/x.
Fig. 4. Pattern of a Julia set for z -• (z^ + M)' "^ M with all points mapped as minimum values of I z j -.
Reprintedfrom Comput. & Graphics Vol 13, No. 3, pag. 389-392, 1989
426
IAN D . ENTWISTLE
^^^^I^^UlUii^
Fig. 5. Pattern of a Julia set for z - • sinh(r) with bounded points mapped as minimum values of |z|^
4tTTTTTrrmtlt1Tk of the published methodology into the study of other polynomials and the use of alternative convergence tests have now resulted in a variety of exciting new maps.
Fig. 7. Magnification of the central part of r -* (: in map Fig. 6.
- Ai)' -
M
GRAPHICS AND OBSERVATIONS
The Julia set for the d y n a m i c / ( r ) = z^ -\- n has been widely studied and some of the beautiful images resulting from a boundedness test \Zn\ > 2 have been widely published [ 3 , 8 ] . Fewer studies have been made on the patterns which emerge when alternative tests or additional ones are applied to the values of those numbers which do not diverge, e.g., by trapping the minimum values achieved during the iterative process for each point in the complex plane corresponding to
Fig. 8. Pattern of z ->• (z^ + ^l)^ + ^ in the complex plane mapping points converging for Izreail" > 10.
Fig. 6. Pattern of a Julia set for z -* (z'^ 4- ^)^ + ^ using double boundedness tests and low iteration values.
Fig. 9. Pattern of z - • (z^ + M)^ + M omitting mapping of values with low iteration in Fig. 8.
Julia set an and fractals
Fig. 10. Pattern resulting from variation of/* in generatio n of Fig. 8. a point in the Julia set for z^ + fi, and mapping those values which fall close together alternatively in black or white, produces the maps shown in Fig. 1 ( AI = 0.11, 0.6557i) and Fig. 2 (M = 0.32, 0.043i). Of more novel interest was the application of this method to the Julia set associate d with the generato r f(z) = (z^ + M)^ + M. My own study of the M plane set of this function (to be published separately ) had yielded points in the fi plane which allowed generation of rather attractive Julia sets, e.g., see Fig. 3 (M = -0.53, O.Oi). Plotting the iterations for minimum values for all points, both divergent and bounded, results in images of the type seen in Fig. 4 (^ = -0.48, O.Oi). This point is inside the n plane bounded set. The points of the bounded set are clearly distinguished . Fig. 5 (M = -1.1666, -0.808642i) illustrates the use of this method for/(z) = sinh(z) + fi. The algorithms for a Julia set generating the hyperbolic sine function can be constructe d by sines and cosines (see Appendix). The amount of CPU time to compute (Fig. 5) is very high on the average micro-computer , but access to a machine with 4 MIPS or greater performance .
427
Fig. 12. Pattern of a Julia set for z -• z^ + ^ at low iteration values and non-classica l test. even with high level languages , can alleviate this problem. Earlier studies of complex polynomial iteration have used alternative criteria for convergenc e to achieve striking images. Using only a few iterations (f) and checking for IZ^zil or IZimagi being less than 10[9, 10]. Applying alternative tests such as these has yielded the new images (Figs. 6-12) from various transformations. In Fig. 6,/(z) = (z^ + M)^ + M is iterated for M =0.8, -0.2i and testing for convergenc e successivel y using I Zreai I + I ^imag I > 100 and then filtering this for ABSOLUTE iZreall < 10 or ABSOLUTE |Zin,agl < 10. The number of iterations is 16. Fig. 7 is a magnification of the central part of Fig. 6 and illustrates the fractal nature of these images. If a simplified test is applied, such as I Zreai I ^ > 10, then Fig. 8 is obtained. By omitting low iteration points. Fig. 8 becomes Fig. 9. Setting
e to Fig. 12 for the function z -• Fig. 11. Pattern ofz-^(z^-fM)" + M mapped by ignoring Fig. 13. Pattern comparabl low iteration values in Fig. 10.
428
IA N D . E N T W I S T LE
Table I. Function r^ + M
sinh(2) + jj. -5
. „
Imaginarv' part
Real part x^ - y^ + a x^ - 3xy^ + a (1) xi-y] + a (2) xl -yl + b 0.5*(e"'^ - e'') 4- cos(>') + a x^ - 10;cV^ + 5 . v/ + a
2xv + 6 3x'y -y^
+ b
(1) 2.x,y,+6 (2) 2x2^. + a -0.5*(e-^ + ^^)*sin(>') + Z7
the value of/x to 0.9, —0.1 i for the same function yields 11. R. Waddilove, Zoom in on fractals. Atari ST User 5 , 4 64 7 ( 1 9 8 7 ). Fig. 10 which, when iteration values up to 4 are ignored, illustrates a "biomorph" [ 10], Fig. 11 resembles an ex- 12. S. D. Casey, Formulating fractals. Comp. Language. April , 2 8 - 4 0 ( 1 9 8 7 ). otic snail or a shell fish. 13. A. K. Dewdney, Beauty and profundity: The Mandelbrot Application of the test |Zreail^ < 100 to the transset and a flock of its cousins called Julia. Scientific American 251(5), 1 1 8 - 1 2 2 ( 1 9 8 7.) f o r m a t i o n / ( r) = z-^ + /u for f = 14 results in Fig. 12. When this test is used with the transformation/(z) - • 14. H. J. Hubbard, Order in chaos. Cornell Engineering Quarterly 2 0 ( 3 ) , 20-26 (1986). z^ + /u, a pentasta r is formed (Fig. 13). The low iter- 15. C. A. Pickover, Math and beauty. Comp. Graphics World. ation numbers required to obtain this type of graphic July, 1 4 3 - 1 4 6 ( 1 9 8 7.) allow for rapid study of various values for ^i. Of note APPENDIX 1 is the observation that utilising higher iterations, does For computation using languages where complex variables not change the image, as divergence occurs at low itare supported, e.g., F O R T R AN 77, the polynomials can be eration values, and the image disappear s at high itercalculated directly [12]. For applications using BASIC, analysis ation values. into real and imaginary parts needs to be undertaken . Table In order to encourage wider study of the images ob- 1 above lists the analysis used. tainable by the methods briefly alluded to, the AppenAPPENDIX 2 dix contains some more detailed information on the . ^1plane coordinates computing techniques and algorithms needed. The Values associate d with the processe s z -* z" + /x, sinh(z) basic computer programs for producing maps of po+ M. lynominal functions have been widely reported for Z\ plane pictures for Figs. 1-13. computers ranging from Atari to D e c [ l l , 12]. The references [9, 10, 13-15] are useful starting points for Imagz Realr n real /x imag Fig. discussions of the methods used in this paper. -1.4, 1.4 -1.4, 1.4 0.6557i 1 - 0 . 11 Acknowledgements—My thanks to the staff of Shell Researc h 2 -1.4, 1.4 -1.4, 1.4 0.32 0.043i Ltd's Sittingboume Researc h Centre for help with the manuO.Oi - 0 . 53 3 -I, I -I, 1 script and image reproduction. 4 -1.8, 1.8 -1.8, 1.8 - 0 . 48 O.Oi -1.8,2 - 2, 1.8 -0.808642i - 1 . 1 6 66 5 - 2 ,2 - 2, 2 - 0 . 2i 6 0.8 REFERENCE S 7 -0.35, 0.35 -0.35, 0.35 - 0 . 2i 0.8 1. P. Fatou, Sur I'iteration des fonctions transcendante s en- 2 ,2 - 2 ,2 - 0 . 2i 8 0.8 tieres. Acta Math 47, 337-370 (1926). - 2 ,2 - 2 ,2 - 0 . 2i 9 0.8 2. G. Julia, Iteration des applications fonctionnelles. / Math. - 2 ,2 - 2, 2 - O . li 10 0.9 Pares Appl. 4, 47-245 ( 1 9 1 8 ). - 2 ,0 11 0.9 - O . li - 1, I 3. B. Mandelbrot, The Fractal Geometry of Nature, Freeman, -2.5, 2.5 -2.5, 2.5 12 0.6 - O . li San Francisco ( 1 9 8 2 ). 0.7 -1.4, 1.4 -1.4, 1.4 0.0 li 13 4. P. Fisher and W. Smith, Chaos, Fractals and Dynamics, Marcel Dekker, Inc., New York ( 1 9 8 5 ). 5. G. Taubes, The mathematics of chaos. Discover Magazine. Septembe r Issue, 30-45 (1984). 6. A. Douady and J. Hubbard, Iterations des polynomes quadratiques complexes. Compte Rendiis (Paris) 2941, 1 2 3 - 1 2 6 ( 1 9 8 2.) 7. A. K. Dewndey, A tour of the Mandelbrot set aboard the Mandelbus. Scientific American 2 6 0 ( 2 ), 88-91 (1989). 8. H.-O. Peitgen and P. H. Richter, The Beauty of Fractals, Springer-Veriag, Beriin, Heidelberg, New York, Tokvo (1986). 9. C. A. Pickover, Computer graphics generate d from the iteration of algebraic transformations in the complex plane. Comp. & Graphics9{2), 147-151 ( 1 9 8 5 ). 10. C. A. Pickover, Biomorphs: Computer displays of biological forms generate d from mathematica l feedback looks. Comp. Graphics Forum 5, 313-316 ( 1 9 8 6 ).
Real z and imaginary z are maximum and minimum coordinates in the z plane. Their difference controls the scale of the plots. All of the black and white illustrations were printed on an Epsom FX1000 printer directly from an Apple He computer. These prints were made at 1620 X 2400 or 1280 X 1650 pixels. Colour prints (not shown in this paper) were obtained on an Integrex Colorjet 132 printer using either an Apple He or an Acorn Archimedes 440 computer. The calculations were run at 1280 X 1800 to 2600 pixels. Variations were chosen to control the aspect ratio of the picture frame. Much less CPU time would be required for screen plots or smaller prints. The visual impact of high resolution is, however, worth the longer CPU time.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
429 Chaos and Graphics
METHODS OF DISPLAYING THE BEHAVIOUR OF THE MAPPING z + IA N D. ENTWISTLE
44 Woodside Gardens , Sittingbourne , Kent MEIO ISG, UK Abstract—Variations in the disptay of the computer-generate d patterns associate d with the mapping z -• z^ + /I can be achieved by studying change s in the escap e radius utilised to test the values of the real and imaginary parts of | z|. Additional graphic effects can be achieved by sorting the values of | z| generate d for points within the main body of the Mandelbrot set. INTRODUCTION
The mapping of the quadratic/^(z) = z^ + /i in the complex z plane has been widely studied following the observation s of Mandelbrot [1,2] who first described the fractal nature and beautiful patterns of the mapping[3]. The set of initial points for which all subsequent values of I z I are bounded for this mapping has become known as the "Mandelbrot (M) Set." Divergent points in the z plane iteration of z + L j t are identified by the iteration value for which \z\ < 2. This definition of the escape radius was implemented by Mandelbrot [4] and is more rigorously defined by the lemniscate / * ( 0 , M) = 2. This determines that the curve for iteration value k = 1 is a circle. The other smooth curves familiar to students of the Mandelbrot set for values /c> 1 are topologically identical to circles. Their overall shape more closely resemble s the M set as the . The iteration of z^ + /LI for divervalue of A: increases gent points in the z plane rapidly yields very high values after escape (with only a few additional iterations). Alternative larger values of the escape radius have thus been utilised, e.g., \z„\ = 100. This affects only the shape of the curvature of the lemniscate . Equipotential lines more closely representin g the situation of the M set bearing an electrical charge have been widely illustrated[5]. These observation s prompted investigations of alternative tests for divergence as a means of widening the appealing variations of images. In order to increase the speed of computation, especially on microcomputer s without floating point processors , the value of | z | ^ is compared with an escape radius. This avoids calculation of a square root. The rate at which both component s of | z| increase during iteration is significantly different. The real part is the major componen t which diverges itself towards infinity. Alternative mappings are thus obtained if the two components of \z„\ are compared separately . An additional feature of the mapping of z^ + /u, which has not been widely reported, is the variation of the values of | z„ | for points which are contained in the M set. An illustration of such behaviour has been published [ 6 ].
Differentiation of the values of | z„ | on iteration for the points in the M set is most conveniently achieved by classifying the minimum value of |z„| reached for each point and by coding ranges of values with different plotting colours. The combination of this method and the variations in escape radius gives rise to Figs. 1 and 2. METHOD
The M set consists of those complex numbers z such that the sequence , z = 0, Zi = z, Z2 = z^, Z3 = (z^ + z)^, .. ., never satisfies \z„\ > 2. A number of algorithms has been successfull y applied for carrying out the iterative process[7 , 8], and program listings for many types of computers[9] have been published. A modification of the commonestapproach [10] was used to obtain Figs. I and 2 on an Acorn Archimedes 440 computer outputting to an Integrex 132 Colorjet printer. In order to convert the standard algorithm to produce the divergent points as "petals," the test for convergenc e used for Fig. 1 was |z„real| < 100 and for Fig. 2 I z„imag| < 10. The significant difference in the patterns is readily discerned . In order to classify the minimum value of | z„ | reached for each point, an additional variable (e.g., min = 5) is set along with ZQ = 0. The value of \z„\ is then compared to min. If \z„\ < min then min = \z„\. This value is then classified as being in a range and accorded a colour value. Figs. I and 2 illustrate the miniature M set centered at -1.768, 0/. The plotting data for use with the standard scanning algorithm is listed in Table 1. Some variations in colour allotment can be seen in Figs. I and 2. Other variations of petalation are possible, and a wider variation in colours and narrowing of plotting ranges produce even more fascinating views of the Mandelbrot set. These are more easily realised using screen output. It is hoped that this study helps to widen the appeal of the beautiful images that computer graphics yields using the mapping of the quadratic z -> z^ + /i. The reader may wish to examine additional work using similar graphic methods applied to Julia sets[9].
Reprintedfrom Comput. & Graphics Vol 13, No. 4, pag. 549-551, 1989
430
IAN D . ENTWISTLE
Fig. 1. Petalation resulting from comparing |z real| with escape radius 100.
Fig. 2. Petalation resulting from comparing |z imagi with escape radius 10.
Displaying the behaviour of the mapping z -*- z^ -^- n Table 1. M
Maximum dwell (k)
-1,801, 0.0898/
100
z Plane pixels
Scale
1280 X 2800 0.066, 0.0898
Acknowledgements—My thanks to the reprographics staff of the Sittingboume Research Centre of Shell Research Ltd. for the figure reproductions.
REFERENCES 1. B. B. Mandelbrot, On the quadratic mapping of z -* z^ + At: The fractal structure of its "A/" set and scaling. Physica 7D, 224-239 (1983). 2. B. B. Mandelbrot, The Fractal Geometry ofNature, Freeman, San Francisco (1983).
431
3. H.-O. Peitgen and P. H. Richter, The Beauty of Fractals. Springer-Verlag, Berlin (1986). 4. P. Fisher and W. Smith (Eds.), Chaos. Fractals, and Dynamics, Marcel Dekker, New York (1985). 5. A. K. Dewdney, Beauty and profundity: The Mandelbrot set and a flock of its cousins called Julia. Scientific American 257(5), 118-122(1987). 6. Mapart, Frontiers of Chaos. University of Bremen, FRG (1985). 7. A. K. Dewdney, A computer microscope zooms in for a look at the most complex object in mathematics. Scientific American 255(7), 16-32 (1985). 8. H.-O. Peitgen and D. Saupe (Eds.), The Science ofFractal Images, Springer-Verlag, Beriin (1988). 9. I. D. Entwistle, Julia set art and fractals in the complex plane. Comp. and Graphics 13(3), 389-392 (1989); C. Pickover, Chaotic fragmentation in Halley's Paradise. Physica Scripta 39, 193-195 (1989); C. Pickover and E. Khorasani, Computer graphics generated from the iteration of algebraic transformations in the complex plane. Comp. and Graphics 9, 147-151 (1985).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
433 Chaos and Graphics
AUTUMN— A RECIPE FOR ARTISTIC FRACTAL IMAGES J A M ES E. LOYLESS
Simons-Easter n Consultants , Inc., P.O. Box 1286, Atlanta, GA 30301 Abstract—The artistic value of fractal imaging is demonstrate d in a black-and-white cubic Julia set using staggere d alternation. INTRODUCTION
Fractal geometry is more than mathematics ; it is art as well. Fractals can be seen as mysterious expression s of beauty representin g exquisite preordaine d shapes that mimic the universe. Surely they show the practical connections between mathematic s and the mysteries ofart[l] . The image shown in Fig. 1, entitled "Autumn" (1988), demonstrate s this assertion in black-and-white . Complex plane fractal images have several important attributes: the iteration formula and escape criteria, the region of the complex plane to be explored, and the artistic display of raw data as texture and shade. THE CUBIC SET
The mathematica l set employed here is based on Newton's method for cubics, an algorithm more involved than the self-squaring process so familiar to fractal devotees . The cubic equation was provided by Dr. Homer Smith of Cornell, through ArtMatrix, Inc. Cubic sets typically appear to be surrounde d by structures resembling soap bubbles. Dr. Smith's version (program name: JLNAP) was originally written in Fortran, which can interpret complex formulas. To run the set in BASIC requires a derivation, as follows. For each complex grid point z, where z = x -^ yi using seed point c, where c = a + bi\
Considerable magnification must be employed before one of the bug-like forms is apparent . A cubic Julia set can be generate d in the usual manner, by using a seed point from a particular nodule or point in the Mandelbrot set. This particular Julia set was seede d from a nodule of bifurcation order five, and thus has six arms. Dr. Mandelbrot affectionately refers to these kinds of Julia sets as dragons, and so this is a six-armed dragon[2]. The seed point is c = 0.8738 + 0.9201/. The overall Julia set is similar to the Mandelbrot set except that it has three interlocking webs imbedded with tiny six-armed dragons. The portion of the Julia set presente d in Fig. 1 is centered at zero and requires a zoom factor of 15. The grid coordinates are (real) -0.26 to 0.26 and (imaginary) -0.2167 to 0.2167. Iteration cut-off (dwell) is 600. STAGGERED ALTERNATION
The medium used for the image is a 24-pin printer with a dot matrix array 1440 by 1440 points: something over 2 million points in all. Double strike was used to improve the technical quality of the print. Calculations were done on an 8088 processo r with a math co-processor. The visual power of a fractal image, however, lies as much in the way color or shade is assigne d to each point's iteration value as in its technical features.
asq=a*a\bsq=b*b for iter = l to
\\xmV.xsq=x*x:ysq=y*y
p=2*x*xsq-6*x*ysq-asq+bsq+.25:q=6*xsq*y-2*ysq*y-2*a*b r=3*xsq-3*ysq-asq-\-bsq-J5:s='6*x*y-2*a*b:rs=r*r-\-s*s x={p*r-\-q*s)/rs:y
=
(q*r-p*s)/rs
i;=x-l:if(i;*i;+>;*j;)<.00000 1 then (escape ) v=x-a-\-.5:w=y-b:if{v*v-\-w*w)<.00000\
then (escape)
v=x-\-a-\-.5:w=y-\-b:if{v*v-¥w*w)<.00000l
then (escape)
next iter: iter=iter - 1 The algorithm is only the compass with which to explore the fractal landscape.One must find an appropriate region on the complex plane before a worthwhile image emerges . The cubic Mandelbrot set is a thin and lacy curved form of two interlocking torus structures, strewn with tiny Mandelbrot-like forms which resemble bugs caught in a torn spider's web.
Artistic experimentatio n is required to achieve an effect. A simple swirling form surrounde d by alternation can be dramatic, but alternation of black and white usually yields a predictable effect. If the alternation is interrupted randomly, a sense of variety results. Notice that the cavities surrounding the Julia set
Reprinted from Comput. & Graphics Vol. 15, No. 1, pag. 87-88, 1991
434
JAMES E. LOYLESS
Fig. 1. Autumn—a fractal image using staggere d alternation.
dragon are filled with concentric alternating circles, lik e peering eyes with haunting stares. As the eyes get smaller, they begin to take on personalities of their own, almost as if a family of bats were issuing from the dragon's lair. This effect is achieved by staggering the usual alternation pattern with bands of solid, eluding its precitability. Assignment of black and white values follows:
REFERENCES 1. Jack Fredrick Myers, The Language of Visual Art, Holt Rinehart and Winston, New York, 185 (1989). Computer graphic image created by fractal geometry (Mandelbrot set) as an example of design by process . 2. Benoit B. Mandelbrot, The Fractal Geometry of Nature, Freeman, New York, 180-192 (1983). The original treatise which introduced the Mandelbrot set as a fractal construct. BIBLIOGRAPHY
Alternation : 1-15 iterations (black=even; white=odd) White:
16-18 iterations
Black:
19-20 iterations
White:
21-23 iterations
Black:
24-25 iterations
White:
26-599 iterations
Black:
600 iterations (cut-ofT value)
A. K. Dewdney, Computer Recreations , Scientific American 16-20, August (1985). An introduction to the Mandelbrot set and fractal images. Margaret Livingstone and David Hubel, Segregatio n of form, color, movement, and depth: anatomy, physiology, and perception. Science 740-749, May 6 (1988). Summarize s the anatomical, physiological, and psychologica l factors in perception to the primate visual system. Heinz-Otto Peitgen and Dietmar Saupe, (Eds.), The Science of Fractal Images, Springer-Verlag , New York (1988). An overview of fractal geometry by various contributors, including B. B. Mandelbrot. H.-O. Peitgen and P. H. Richter, The Beauty of Fractals, Springer-Verlag , New York, (1986). Illustrations of color and monochrome fractal images with the theory behind their creation. Readings from Scientific American, Image, Object and Illusion, Freeman , New York, 46-58 (1971). Discussion of spacial perception in vision.
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
435 Chaos and Graphics
BIOMORPHIC MITOSIS DAVI D STUEDELL
All Saints School, P.O. Box 6081, St. Thomas, Virgin Islands 00804 Abstract—Presente d is an informal computer graphics investigation of biomorphs. These graphical entities r in a mathematica l feedbac k resemble biological structures which undergo mitosis (cell division) as a paramete loop is varied. The term "biomorph" is a name given to a computer graphic representatio n which resemble s a biological morphology, hence the name "biomorph" [ 1 ]. As the term implies, biomorphs look like simple lifeforms, and the natural extension of the biomorph would obviously be their reproduction and cell division. It is amusing to note that as one varies the constant c associated to the complex function z" + c, the interior region goes through stages which resemble biological mitosis (cell division) (see Fig. 1). This is especially interesting in z^ + c, as c varies from 0 to 2, becaus e the change resemble s the natural cell division closely. If one continues to increase c, the original biomorph will split into n new baby biomorphs, where n is the power to which z is raised. The mitosis of the biomorph may lead computer graphics investigators to create a mathematica l "tissue." In this process , biomorphsin each cell go through
various stages of mitosis. The constant could then represent the time it takes cells to divide and die. The pictures were created using the same algorithm described in Scientific American[2], with a loop for the constant c. These forms are related to JuHa sets, which have been described in ref. [3] . The graphics were generate d on a Macintosh SB computer and an Imagewriter printer. Acknowledgements—I thank J. Harper for the useful ideas and encouragement . REFERENCE S 1. C. Pickover, Biomorphs: computer displays of biological forms generate d from mathematica l feedbac k loops. Computer Graphics Forum 5(4), 313-316 (1987). 2. A. Dewdney, Computer recreations . Scientific American 110-113 (July, 1989). 3. B. Mendelbrot, The Fractal Geometry of Nature, W. H. Freeman , New York (1982).
Fig. 1. Biomorphic mitosis produced by the iteration of z = z^ + c in the complex plane as c varies from 0.7 to 1.0.
Reprintedfi-om Comput. & Graphics Vol. 15, No. 3, pag. 455, 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
437 Chaos and Graphics
COMPUTER ART REPRESENTING THE BEHAVIOR OF THE NEWTON-RAPHSON METHOD DAVI D JOHN WALTER
Nanyang Technologica l University, BEE, Nanyang Avenue, Singapore 2263 Abstract—The Newton-Raphso n method is used to solve a family of 786,432 complex cubic equations . The resulting beautiful fractal images in the complex plane indicate the intricate behavior of this method.
The Nev^on-Raphso n method (or more commonly, "Newton's Method") is a well-known algorithm that can converge rapidly to yield the solution of nonlinear equations[l]. Recently computer graphics has become an important tool for studying this and similar algorithms[2], and many useful and beautiful fractal images have resulted [3,4]. As part of a study of fractals and Newton's method, the family of complex cubic equations / ( z) = {z-
\){z-c
+ 0.5) (z + c + 0.5) = 0
was solved using Newton's algorithm modified by parameter p 1 :
Fig. 2. Pinkmask Xmin/Xmax/rmin/ymax = -0.361324/ 0.586676/-0.638263/0.62573 7 PI = -0.6 maxiter = 3000.
Z„+i = Z „ - / ( z ) / ( / ' ( z ) + /7l) Z„+i = Zn- {z^ -{c^ + 0J5)z + c^ - 0.25}/ {3z2 - (c^ -h 0.75 + pi)} The initial value for z was chosen as the coordinate of each pixel in the complex plane: z(0) = pixel = X + iy. In addition, the complex constant c takes on the value of the coordinates of each pixel, thereby enabUng
us to look at a family of 1024 X 768 = 786,432 equations (1024 X 768 is my screen resolution). The resulting fractal images were coloured to indicate the number of iterations necessar y to converge to the solution within lOE—6. The graphics display gives an immediate indication of the rate of convergenc e of the method for each member of the family, becaus e the color of each pixel correspond s to the number of iterations used to seek the solution of the equation for that pixel. The 256
/ Fig. 3. Picass Fig. 1. Earing Xmin/Xmax/rmin/ymax = 1.500580414 o ^min/Xmax/rmin/rmax = 1.50509231 / 1.50147007/-0.05016097/-0.0489747 6 PI = -1.0 maxiter 1.50790363/-0.14496525/-0.1412168 2 PI = -1.0 maxiter = 3000. = 3000. Reprintedfrom Comput. & Graphics Vol 17, No. 4, pag. 487-488, 1993
438
D. J. WALTER
Fig. 4. Whale X m i n / X m a x / y m i n / r m ax = 1.50782656 / 1.50967758/0.07084562/0.0733136 5 PI = 1.0 maxiter = 150.
colour palette may be edited to enhance the beauty of the pattern. Varying paramete r p 1 allows us to study the sensitivit y of Newton's method to variations in the derivative term, and enables a substantia l range of different patterns to be created, such as seen in Figs. 1 to 4, which represen t different regions of the complex plane.
Acknowledgement—The author wishes to acknowledge the use of the FRACTINT software, which is supplied with [4], and two of the authors for their help: Mark Peterso n (70441,3353 on CIS, who wrote the formula interpreter used for this equation), and Timothy Wegner (e-mail: [email protected]) .
REFERENCE S R. L. Burdon and J. Douglas Faires, Numerical Analysis, PWS Publishers , Boston MA (1985). H.-O. Peitgen and P. H. Richter, The Beauty ofFractals, Springer Verlag, Berlin (1986). Mieczyslaw Szyskowicz, Computer art generate d by the method of secants in the complex plane. Comp. & Graph. 14,509(1990). T. Wegner and M. Peterson , Fractal Creations, The Waite Group Mil l Valley, CA Press, (1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
439 Chaos and Graphics
SYSTEMISED SERENDIPITY FOR PRODUCING COMPUTER ART DAVI D WALTER
Signals Processin g Group, Electrical Engineering Department , Imperial College of Science, Technology and Medicine, Exhibition Rd, South Kensington, London SW7 2BT Abstract—Serendipity applied to Newton's method, and its derivative the Secant Method, produces unusual and beautiful fractal patterns.Serendipity may be systemised , for example, by the introduction of a perturbation paramete r PI, [I ] to facilitate searche s for interesting pattern variations. Recursive methods for the solutions of nonlinear equations are a rich source for the generation of fractal patterns [2 ] . As part of a study of nonlinear equations, the equation
ing the sign of 2~^ln z in the derivative from minus to plus gave rise to the most unusual pattern shown in Fig. 1. I've called it "The Winged Temple." The equation was coded as a FRACTINT FORMULA as follows:
/ ( z ) = ^" + 2 -" - 2 cos 2 - 6 = 0 COMMENTS was solved using Newton's Method [ 3 ] , perturbed by parameter P I: ^«+i = z„-f{z)/lf'{z)
+
P\],
^n+i = Zrt - (e^ + 2 ^ ~^2 cos z - 6 ) / ( ^ ' - 2 - ^ l nz + 2 sin z + P I ) . The initial estimate ZQ of the solution was chosen to be the coordinate of each pixel. This was coded for computation as a formula in the fractal generating program called F R A C T I N T [ 4 ], which resulted in interesting patterns on the screen. However, serendipitousl y setting PI = 0.5 and chang-
^x4cwithPl = { z = pixel: ex = exp(z); 2z = 2 ( - z ); n = ex^lz2*cos(z) - 6; d= ^x + 2z*0.69314718 + 2*sin(z) + P 1; z = z - n/d, 0.001 <= \n\
*Name of formula *initia l estimate *start iteration *numerator *denominator *Newton's formula *tolerance condition.
The Secant Method [ 3 ] was also used as a comparison to Newton's Method, and Figs. 2 and 3.resulted. The Secant Method has been proposed as an alternative to Newton's method if it is impossible or not desired to find the derivative/'(z) analytically. In essence , the derivative is approximated by:
Fig. 1. The Winged Temple. Coordinates of corners: top left X = -0.15519, F = 1.49606; bottom right X = -2.39919, Y= -1.49605. Paramete r PI = 0.5, maximum iterations = 511. Reprinted from Comput. & Graphics Vol. 17, No. 6, pag. 699-700, 1993
440
D. WALTER
/'(z)^[/(z,)-/(zo)]/[z, -zo], and requires two initial estimates ZQ and Zx of the solution. The second estimate Zi may be avoided by relating it to the first estimate using the fundamenta l definition of the derivative: / ' ( z ) ^ [/(zo + deltaz) - / ( z o ) ] / d e l t a z. This was coded such that deltaz could be varied by changing PI as shown below, and paramete r PI was used to perturb the secant formula in order to change the pattern. It would not converge to give a coherent picture even if the tolerance condition was set to 0.1 and deltaz = 0.1. The sign of the "derivative" was changed by making d = {n — «J)/deltaz as shown in the FRACTINT FORMULA code below: COMMENTS *formula name *delta varied by P2 *firs t estimate *second estimate
ex4csecda v = { deltaz = P2 + 0.0001 z = pixel zd = z -\- deltaz: n = exp(z) + 2 ( - z) - 2*cos(z) - 6; nd = exp{zd)
*start iteration
+ 2(-z^) *incremented function *"derivative" *P\ is perturbation *tolerance condition.
2*cos{zd) - 6; d = (n - nd)/de\Xa.z; z = z - n/{d -\- P\y, 0.01 < = \n\
Note that the sign of 2 ^In z in the "derivative" has not been changed—it has not been "serendipitated. "
Fig. 3. Super Dudu. Coordinates of corners: top left X = -1.78704, y = -1.06399; bottom right ^ = -0.19104, Y = 1.06399. Paramete r P\ = 0, P2 = 0.5, maximum iterations = 150.
Figure 2 is a photograph of the SVGA display (1024 X 768 X 256 colours) when PI = 0 and P2 = 0.1, and which I've called "Surgeon Fish." Changing P2 to 0.5 gives rise to the "insect" shown in Fig. 3, which is called "Super Dudu," ("Dudu" is Swahili for "insect.") The secant method took about 40% more computation time than Newton's Method, and converged less readily. The "floating point" option in FRACTINT was used. The tolerance had to be reduced to about 0.001 to facilitate convergence , and decreasin g it to 0.01 also increases the size of the image. Serendipity and variants of the Secant Method can yield very striking examples of computer art, often radically different from those obtained using Newton's method as Newton intended. Acknowledgement—The author wishes to acknowledge the use of the FRACTINT software that is supplied with [4], and two of the authors for their help: Mark Peterso n (70441, 3353 on CIS, who wrote the formula interpreter used for this equation), and Timothy Wegner (e-mail: [email protected]). REFERENCES
f?S?v. Fig. 2. Surgeon Fish. Coordinates of corners: top left X = 0.01036, Y = 1.49223; bottom right X = -2.23263, Y = -1.49842. Paramete r PI = 0, P2 = 0.1, maximum iterations = 511.
1. D. J. Walter, Computer art representin g the behaviourof the Newton-Raphso n method. Comp. & Graph. 17,487488(1993). 2. C A. Pickover, Computers, Pattern, Chaos and Beauty, St Martin's Press, New York (1990). 3. R. L. Burden and J. Douglas Faires, Numerical Analysis, PWS Publishers , Boston, MA (1985). 4. T. Wegner and M. Peterson , Fractal Creations, The Waite Group, Mil l Valley, CA (1991).
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V. All rights reserved
441
Chaos and Graphics
COMPUTER ART FROM NEWTON'S, SECANT, AND RICHARDSON'S METHODS DAVI D WALTER
Signals Processin g Group, Electrical Engineering Department , Imperial College of Science , Technology and Medicine, Exhibition Rd, South Kensington, London SW7 2BT Abstract—1992 is the 350th anniversar y of Newton's birthday, and the equation he used to demonstrat e his iterative method for solving equations is used to create some interesting fractal patterns . The secan t variation was used to create a pattern called "Newtons Powerful Brain," and a "Pointillist" version of "Newton's Ghost." For highly magnified fractal patterns Richardson' s Extrapolation was used to compute f'{z) numerically, becaus e it is fundamentall y more accurate than the secan t method. 1. INTRODUCTION
Newton was born on Decembe r 25th, 1642 (old style calendar)[l], andiractographer s the world over should celebrate this anniversary , becaus e Newton's Method produces beautiful fractal patterns[2]. The equation he first used to demonstrat e his method is z^ — 2z — 5 = 0, and every student of numerical mathematic s should solve this venerable equation [ 3 ]. In this paper it is solved in order to create fractal patterns, which show bands of colour representin g areas of constant iteration number, in three ways:
The three methods are coded as FORMULAS in the fractal generating software called FRACTINT[5] in a unified way, so that readers may easily edit them for other equations .
2. NEWTON, SECANT, AND RICHARDSON
2.1. Newton's method The method is to solve/(z) = 0 by iterating the equation: z„^i=z„-/(z)/[/'(z)],
1. Newton's method, but with the derivative perturbed by paramete r Pl:/'(z) + PI [4]. Patterns produced this way serve as reference patterns for comparison with those produced using numerical approximations to the derivative. 2. The Secant Method, where/'(z) is approximate d by [/(z + /z) —/(z)]//z, with an error of the order ofh. This error is a useful tool for creating unusual patterns. 3. Richardson' s Extrapolation f o r / ' ( z ), which approximates/'(z) with an error of the order of h"^, or better. This method is vastly superior to the Se-
until/(z) < TOL, where TOL is the allowable tolerance. If the paramete r PI is added to the derivative it may be used to vary the number of iterations leading to a solution, and thereby allows a variety of fractal patterns to be created for the same equation[4, 6]. Applying this to Newton's venerable equation we get z„+
z„- ( z ^ - 2 z - 5 ) / ( 3 z 2 -2 + P l ).
The initial estimate z^ of the solution was chosen to be the coordinates of each pixel, and the code for the FRACTINT formula is: COMMMENTS
newtonseq n (XAXIS) = { z = pixel: fz = z^3 - 2*z - 5; /dashz = 3*z^2 - 2; z = z - / z / ( / d a s hz + Pl); 0.001 < \fz\ }
*Name of formula *initia l estimate *start iteration derivative of function *Newton's formula *tolerance condition.
2.2. The Secant method The Secant Method[3] is useful in situations where cant Method at higher magnifications, (for example e to find the derivative 6 million), when the small values of /z (such as it is impossible or undesireabl d 10"^) necessar y using the Secant method to com- / ' ( z) analytically. The derivative was approximate pute a sufficiently accurate numerical derivative by truncating Taylor's series for/(z + h) and rearsuffer from computer round off". Using h = 10"^ in ranging: Richardson's method, is generally equivalent to using /z = 10"^ in the Secant method. r(z)^[fiz-\-h)-f(z)]/h. Reprintedfrom Comput. & Graphics Vol 18, No. 1, pag. 127-131, 1994
442
D. WALTER
which incurs an error E given by:
E=-hf"{z)l2-h^r''{z)/6 - h^f%z)/2A As an idea of magnitude, if z = 2 and h = 1, the approximation gives the derivative as 17, whereas the actual value is 10. This source of large errors was exploited to create interesting variations on the "correct" fractal patterns produced by Newton's Method. The Secant Method was coded such that h could be varied by changing P2 as shown below, and paramete r P\ was used to perturb the secant formula in order to change the pattern. (Parameter s PI and P2 may be changed at run time when using FRACTINT.)
effect of varying the tolerance TOL is surprisingly less powerful at changing the pattern than hor PI. Varying P\, h and TOL leads to many interesting patterns such as Figs. 3 to 5. Figure 3 represent s the "Mitosis," which leads to "Newton's Powerful Brain" shown in Fig. 4, and Fig. 5 "The Galactic Squadron Returns Home," honours Newton's attraction to gravity. Figure 6a show^ a pattern I call "Newton's Ghost," which appears in many fractals using Newton's method, and is produced here at a magnification of s to a 5.96 million. (A magnification of 1 correspond pattern having Ymin = —1 and F max = +1.) Figure 6b shows the Pointillist effect achieved by using the
COMMENTS Newtsec (XAXIS) = { h = F2 z = pixel: fz = z^3 - 2*z - 5; zplh = z -\- h; fzplh = zplh^3 - 2*zplh - 5; fdsLshz = {fzplh-fz)/h;
z = z-/z/(/dashz + Pl); 0.001 ^ |/z| {
Figure 1 shows the variations due to h and P\ in the default pattern on a VGA screen using a 640 X 480 X 256 colour driver in FRACTINT, and the floating point option. The patterns were printed by using FRACTINT's print facility on an HP Deskjet at 300 dpi. Figure la, with h = lO"'*, is identical to that produced using the analytical derivative. Figure 1 b shows the substantia l change caused by putting P\ = 2, and Fig. Ic shows the effect of increasing h to 1.0. Figure 2 was computed using the same parameters , but the tolerance was set at 10. It can be seen that the
(a)
*formula name *h varied by P2 *first estimate ZQ *start iteration *z plus h *incremented function *numerical derivative *P\ is perturbation *tolerance condition.
Secant method when h = 10~^. The "head" has also moved. It was not possible to reproduce Fig. 6a using the secant method on either my 286 or my 486 IBM PC, becaus e of round off* errors. Values of h greater than 10"^ produced clear but different patterns at the same location, and smaller values produced increasingly blurred patterns. However, using Richardson' s Extrapolation to compute more accurate approximations to the derivative overcame this effect (when viewed as a problem).
(c)
Fig. 1. (a) PI = 0;h = 10-^ (b) PI = 2.0; h = 10-^ (c) PI = 0; /? = 1. FRACTINT default patterns s of corners: top left: produced by Newton's venerable equation. Tolerance TOL = 0.001, Coordinate X = -2.0; Y = 1.5, bottom right: X = 2.0; Y = -1.5. Floating point used, maximum iterations = 150.
443
Computer art from Newton's, Secant , and Richardson' s methods
2.3. Richardson 's extrapolation An outline of the derivation of this ingenious method [ 3 ] of reducing the errors in computing the derivative numerically is given to show readers where the errors are and how they are reduced. The Taylor's Series for/(z + /z) and/(z - h) were manipulated to give the derivative as f'{z)
= [fiz + h) -f{z
- h)]/2h -
h'f'''{z)/6
-h'riz)/120
,
which already shows an improvement in that the order of the error is reduced to 0(/z^) if the derivative terms Fig. 2. FRACTINT default pattern produced by Newton's are ignored. Putting z = 2 and h = 1 gives the derivative venerable equation. Tolerance TOL = 10; PI = 0, h = lO""*. as 11, and the error is 1 instead of 7 in the Secant Coordinates of corners: top left: X = -2.0; Y= 1.5, bottom example above. right: X = 2.0; Y = -1.5. Floating point used, maximum iterations = 150.
Fig. 3. Mitosis. Coordinate s of corners: top left: X = 6.6829; Y = 11.8743, bottom right X = 5.4654; r = 7.5154, bottom-left A-= 4.7630; Y= 11.4988. Paramete r PI =-5, h = 0.5, maximum iterations =150.'
Fig. 4. Newton's Powerful Brain. Coordinate s of corners: top left: X = 0.0774; Y = 0.0395, bottom rightr P\ = -2.5, h - 0.5, maximum X = 0.0190; Y = -0.0382, bottom left: X = 0.0190; Y - 0.0395. Paramete iterations = 150.
444
D. WALTER
s of corners: top left: Fig. 5. The Galactic Squadro n Returns Home. Coordinate s Fig. 6a. Newton's Ghost. Coordinate ; Y = -0.0036638 , bottom right: of corners: top left: X = 0.1880; Y - 0.0755, bottom right: X = -0.4133450 . Magnification 5,963,029 . ; Y= -0.0036641 X = 0.8760; Y = -0.0772, Paramete r PI = -1.5, /? = 0.5, X= -0.4133445 Paramete r PI = 0, maximum iterations = 150. maximum iterations = 150.
Put ^{h) = [f(z + h) -f(z thcn^ih)
=
-
h)]/2h,
f'(z)-^h'f{z)/6 + /zV"(z)/120+ • • • ,
and<^(/z/2) =f'(z)
(1)
+ (/2/2)V"'U)/6 + (/z/2)V^(z)/120 + . ..
(2)
To eliminate the error term proportional to /z^, we multiply Eq. (2) by four, and subtract that from Eq. (1). Rearrangemen t then gives nz)
= ^ih/2) -^ H
-^{hyriz)/4so-^ .••, (3) and we see that the order of the error reduced toOih"^), lfh = say 10~^, then the first error term is of the order of 10~^^. The procedure may be repeate d to kill off further error terms, and is known as Richardson' s Extrapolation. However, for polynomials of degree four or less—suc h as Newton's Venerable Equation—the error is analytically zero, becaus e the fifth derivative is zero. The coding for this method of solving Newton's Venerable Equation as a FRACTINT formula is:
Fig. 6b. Newton's Ghost Pointillist Style. Parameter s as above buth = W-\
Computer art from Newton's, Secant, and Richardson' s methods
445
COMMMENTS NewtonRich (XAXIS ) = { h = P2 hovl = h/2 z = pixel: zplh = z -\- h\ zminh = z — h\ zplhovl = z + hovl; zminhovl = z — hov2\ fz = 2^3 - 2*z - 5; fzplh = zplh^3 - 2*zplh - 5; fzminh = zminh^3 - 2*zminh - 5; fzplhov2 = zplhov2^3 - i*zplhov2 - 5; fzminhov2 = zminhov2^} — 2*zminhov2 - 5;
*Name of formula *Use P2 to vary h •Initial estimate
*The / ( z) to be solved * / ( z + h)
M = (fzplh - fiminhyip'h);
*fiz - h) *f(z + h/2) *f{z - h/2) Mh)
flhov2 = (fzplhov2 - Jzhiinhov2)/h; fdashz = fihoy2 + {fihov2 - fih)/3; z = z-fz/{fdashz-VP\)\ 0.001 < \fz\
V ( h / 2) •Derivative o f / ( z) •Newton's Formula •Tolerance condition.
} This coding reproduced Fig. 6a "Newton's Ghost" for values of/z from 10"^ to more than 1000 (!), and a "Pointillist" version (but not shifted as Fig. 6b), for h = 10~^. A "Rectilinear Pointillist" version of Fig. 6a, which tended towards a tartan pattern resulted as h was increased beyond 10"*. Acknowledgement—I wish to acknowledge the use of the FRACTINT freeware software, which is supplied with [ 5 ]. I think that FRACTINT is a shining example of excellence in software becaus e it is very easy to use, has a clear manual, and is highly versatile. It will run from a single floppy if necessary, but will make use of available extended memory and many different graphics cards without the user having to do much, if anything. It is produced by the Stone Soup Group and contributors as an experiment in collaboration. The 108page manual is informative, easy to understand , and funny.
REFERENCES
The New Encyclopaedia Britannica, Micropaedia (Vol. VII) , Encyclopaedi a Britannica Inc., Chicago/London , 305(1976). C. A. Pickover, Computers, Pattern, Chaos and Beauty, St Martin's Press, New York (1990). W. Cheney and D. Kincaid, Numerical Mathematics and Computing, Brooks/Cole Publishing Company, Monterey, CA. D. J. Walter, Computer art representin g the behaviour of the Newton-Raphso n method. Comp. & Graph., 17, 487-488(1993) . T. Wegner and M. Peterson , Fractal Creations, The Waite Group Press, Mil l Valley, CA (1991). D. J. Walter, Systemise d serendipity for producing computer art. Comp & Graph., 17, 699-700 (1993).
This Page Intentionally Left Blank
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V All rights reserved
Author Index
Angers, M., 353 Baier, G., 79 Balkin, S.D., 321 Bow^man, R.L., 133
Lopes, A.O., 93 Loyless, J.E., 433
Canright, D., 383 Collins, J.J., 115 Corbit, J.D., 19 Culik II, K , 361
Mar, G., I l l Markus, M., 73 McCarty, K., 201 Messier, R., 247 Michelitsch, M., 69, 251, 287 Miller , G.T., 297 Mullin , T., 103
Davis Philip, A.G., 269, 331 Diichting, W., 15 Dube, S., 361
Neiger, M., 111 Norton, A., 235 Nugent, J., 207
Entwistle, I.D., 425, 429 Frame, M., 149, 263, 269, 331, 353 Garbary, D.J., 19 Gilbert, WJ., 327 Golebiewski, E.L., 321 Grim, P., 111 Groller, E., 401 Hess, B., 73 Holden, A.V, 33 Hooper, K.J., 255 Hudson, J.L., 79 Hv^ang, S.C., 193 Jeffrey, H.J., 5 Jones, J.D., 259 Kahlert, C, 79 Kim, H.O., 301, 313 Kim, H.S, 301, 313 Kim, Y.B., 313 Klein, M., 79 Lakhtakia, A., 185, 191, 247 Li , W., 177
Panfilov, A.V, 33 Parisi, J., 79 Passoja , D.E., 185 Peinke, X, 79 Philip, K.W., 291 Pickover, C.A., 27, 41, 127, 201, 341, 415 Pottinger, D., 103 Pulsifer, J.E., 155 Qammari, H., 35 Reeves, R., 253, 281 Reiter, C.A., 61, 155, 169, 283, 321 Robertson, J., 263 Robucci, A., 269, 331 Rodrigues, I., 103 Rojas, R., 121, 225 Rosenstein , M.T., 115 Rossler, O.E., 69, 79, 287 Shepard, S., 161 Shin, S.Y., 301,313 Shirriff, K.W., 23, 307 Simoson, A., 161 Skeldon, A., 103 Sprott, J.C, 53, 341, 391 447
448
St. Denis, P., 111 Stuedell, D., 435 Szyszkowicz, M., 217
Venkatesan , A., 35 Walter, D., 411, 439 ^^j^^^^ ^ j ^ ^^^
Todd, S., 103
Yang, H.S., 193
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V All rights reserved
Subject Index
Aeolian fractals Amalgamated Research , vii Apollonian packing, 27 Art, 3 4 1 , 4 1 3 ^ 45 Artificia l intelligence, 53, 61, 341, 415 Attractors, 49-142
Fractal Antenna Systems , vii Fractal fiberoptics, vii Fractal Loop, viii Fractals, practical, vii Fractals, terrain, 41 Fractint, viii
Bamsley, M., 349 Basins of attraction, 79, 341 Batrachions, 127 Bifiircation, 103 Biology, 5, 15, 33, 435 Biomorphs, 435 Blaschke products, 301 Bubbles, 31
Games, 161 Gaskets, 145-218 Gauss sums, 247 Genetic sequences ,5 Goose fractal, vi
Cancer grow^th, 15 Cantor cheese , 201 Cardiac tissues, 33 Cellular automata , 145-218 Chaos game, 5 Chaos, control of, 35 Chaos, filtering, 115 Chaotic forcing, 79 Chemistry, 35 Circle packing, 27 Clarke, A., 222 Complex maps, 221-345 Correlation dimension, 391 Critical points, 263, 321 Diffusion limited aggregation , viii DNA, 5 Dueling symmetry, 61 Eigenvalue estimation, 283 Ellipti c curves, 321 Epsilon cross, 255 Field lines, 291 Filtering, 115 Fischer, Y., 349
Halley's method, 253, 281 Henon's map, 69 Integer sequences , 127, 247 Iterated fiinction systems , 349-410 Julia sets, 221-345 Koch curves, 145-218 L-systems, 19 Leaf patterns, 23 Lebesgue measure , 93 Life, game of, 155 Logic, 111 Logical operators , 217 Logistic map, 73 Lyapunov exponent, 50, 53, 73, 391 Mandelbrot set, scaling, 269 Mandelbrot sets, 221-345 Mandelbrot, B., vi Mathematica, 133 Menger sponges , 169 Midgets, 269, 331 Moon, E, vii Mountains, 41 Multidimensionality, 103 Mutually recursive fiinction systems, 361 449
450
Nature, 3 ^ 5, 79 Neural networks, 121 Newton's method, 313, 327, 437, 439, 441 Noise spheres , 137 Oscillations, 35 Osculatory packing, 27
Random numbers, 133 Rayleigh quotient iteration, 283 Repellers, 93 Root-finding, 253, 259, 283, 313, 327, 437, 439, 441 Seaweed , 19 Secant method, 259, 439, 441 Self-similarity, 79 Siegel disks, 297 Sierpinski gaskets , see Gaskets Solenoid, 201 Spatio-tempora l chaos, 33
Paradoxes , 111 Pascal's triangle, 207 Pendula, 103 Phase portraits, 103 Phase transition, 93 Plants, 19, 23 Poincare cross-section , 108 Practical fractals, vii Prime numbers, 191
Terrain, 41 Tumor growth, 15 Tutorials, 225, 297
Quaternions , 225
Voronoi diagrams, 23
Chaos and Fractals: A Computer Graphical Journey C.A. Pickover (Editor) © 1998 Elsevier Science B.V All rights reserved
About the Editor
"Pickover has published nearly a book a year in which he stretches the limits of computers , art and thought." Los Angeles Times
Cliffor d A. Pickover is currently a Researc h Staff Member at the IBM TJ. Watson Researc h Center v^here he has received numerous av^ards for his work. He received his Ph.D. from Yale University's Departmen t of Molecular Biophysics and Biochemistry. Dr. Pickover became an associat e editor for the "Chaos & Fractals" section of the journal Computers & Graphics in 1989. He is also an associat e editor for the scientific journals Computers in Physics and Theta Mathematica Journal Dr. Pickover is an active editorial board member for the follovv^ing journals: Odyssey, Speculations in Science and Technology, Idealistic Studies, Leonardo, and YLEM. Dr. Pickover has published numerous books including: Strange Brains and Genius: The Secret Lives of Eccentric Scientists and Madmen (1998) Time: A Traveler's Guide (1998) The Alien IQ Test (1997) The Loom of God (1997) Black Holes - A Traveler's Guide (1996) Fractal Horizons (1996) (Editor) Keys to Infinity (1995) Visualizing Biological Information (1995) (Editor) The Pattern Book: Fractals, Art, and Nature (1995) (Editor) Future Health (1995) (Editor) Chaos in Wonderland: Visual Adventures in a Fractal World (1994) Visions of the Future: Art, Technology, and Computing in the Next Century (1993) (Editor) Mazes for the Mind: Computers & the Unexpected (1992) Computers for the Imagination (1991) Computers, Patterns, Chaos and Beauty (1990) Dr. Pickover received first prize in the Institute of Physics' "Beauty of Physics Photographi c Competition." His computer graphics have been featured on the cover of many popular magazines , and his researc h has recently received a considerabl e amount of attention by the press. 451
452 Pickover has received U.S. Patents for a 3-D computer mouse, strange computer icons, and for black-hole transporte r interfaces to computers . For more information regarding Clifford A. Pickover, please visit his website at: http://sprott.physics.wisc.edu/pickover/home.ht m or write him at RO. Box 549, Millwood, New York, 10546-0549 , USA.