Mathematics and beauty V: Turbulent complex curls

Mathematics and beauty V: Turbulent complex curls

('omput. & Graphics Vol. 1 I, No. 4, pp. 499-508, 1987 0097-8493/87 $3.00 + .00 (c 1987 Pergamon Journals Ltd. Printed in Great Britain. Graphics A...

2MB Sizes 0 Downloads 21 Views

('omput. & Graphics Vol. 1 I, No. 4, pp. 499-508, 1987

0097-8493/87 $3.00 + .00 (c 1987 Pergamon Journals Ltd.

Printed in Great Britain.

Graphics Art

MATHEMATICS

AND

BEAUTY

COMPLEX

V:

TURBULENT

CURLS

CLIFFORD A. PICKOVER IBM Thomas J. Watson Research Center, Yorktown Heights, NY 10598 Abstract--To help characterizecomplicatedphysicaland mathematicalstructuresand phenomena, computers with graphics can be used to produce visual representations with a spectrum of perspectives. In this paper, algorithms are described for the computer graphics rendering of a particular class of chaotic structures created from complex iteration. This paper differs from others in that its focuses on one small region of the complex plane and on nonstandard convergencetests. Reader involvement is encouraged by giving"recipes'" for the various turbulent forms, and the resulting maps reveal a visuallystriking and intricate class of shapes. INTRODUCFION

"Some people can read a musical score and in their minds hear the music. . . . Others can see, in their mind's eye, great beauty and structure in certain mathematical functions. . . . Lesser folk, like me, need to hear music played and see numbers rendered to appreciate their structures."--Peter B. Schroeder

appealing and mathematically interesting patterns derived from simple functions. The resulting pictures should be of interest to a range of scientists as well as home-computer artists. In this paper, algorithms employing complex analytic maps are used to create intricate spiral shapes. MOTIVATION

From the tiny twisted DNA molecules in all living cells to the gargantuan curling arms of many galaxies, both mathematical and physical realms contain a startling repetition of spiral patterns[l]. In this paper, spiral forms resulting from the iteration of complex equations are examined. In the past, computers with graphics have played a critical role in studying iterated sets and in helping mathematicians form the intuitions needed to prove new theorems about convergence of points in the complex plane. The study of the dynamics of complex analytic maps started in the early Twentieth Century[2]; however, recently there has been renewed interest in this work due in part to advances in computer graphics. This revival has been stimulated by the famous work ofB. Mandelbrot in the new field of fractal geometry[3], and, since about 1980, there has been worldwide increasing interest in complex dynamical systems[4]. The term "chaos" is often used to describe the complicated behavior of nonlinear systems, and complex maps are useful in describing certain aspects of dynamical systems exhibiting irregular ("chaotic") behavior[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 literature[6, 7, 8]. The generation of structures resembling primitive aquatic organisms and plant-forms[9] using similar iterative mathematics has also been described. Apart from their curious mathematical properties, these nonlinear maps now have an immense attraction to physicists, because of the role they play in understanding certain phase transitions and other chaotic natural phenomenon[ 10]. The present paper is number five in a "Mathematics and Beauty" series[ 1, 9, I 1] which presents aesthetically

One goal of this paper is to demonstrate and emphasize the role of recursive algorithms in generating spiral forms and to show the reader how to create such shapes using a computer. Another goal is to demonstrate how research in simple mathematical formulas can reveal an inexhaustible new reservoir of magnificent shapes and images. Indeed, structures produced by these equations include shapes of startling intricacy. The graphics experiments presented, with the variety of accompanying parameters, are good ways to show the complexity of the transition region between convergence and divergence, and a variety of"views" and graphic techniques are provided. METHOD

In order to produce the patterns in this paper, I used "mathematical feedback loops," similar in spirit to those of Julia set theory[3]. This article differs from others in that it focuses on one small region of the complex plane which yields particularly interesting maps, and also on additional convergence tests. Reader involvement is encouraged by giving "recipes" for the various turbulent structures. Other papers which I have published on related topics discuss a variety of generating formula and networks of complex equations [ 12]. We wish to consider the iteration of a function q, for a complex z plus a complex constant, ~:

f(z):

z ~ ~I,(z) + u.

( I)

Insight into the complexity of this nonlinear system may be gained from experimentation on the computer. My goal is to describe the behavior of points under recursion o f f For each selected initial point, Zo, the function flz) is iterated ~ , - J ( z . ~,~t); n = 1,2,3 • • • oc,.

(2)

500

C . A . PICKOVER

For certain values of Zo the sequence z, may diverge (grow increasingly large), and for others the function converges. Regions which are stable (do not grow large) are differentiated by regions in the z plane which do not explode upon iteration by black and white coloration. In this paper, • is simply t-he function z 2, and therefore z = z 2 + ~ describes eqn (1). Traditionally, convergence is often checked by testing whether z goes beyond a certain threshold, r, after n iterations: [z.[ < r -~ convergent,

(3)

where Iz.I = g[Retz)] 2 + [Ira(z)] 2. In this paper, other convergence tests are used as well. For example, one test examines the real and imaginary component of z after n iterations, and a dot on the graphics screen is plotted when IRe(z)l < ~-/X IIm(z)l < r.

(4)

The specific use of this test in conjunction with others is demonstrated more clearly in the Appendix. From a purely artistic standpoint, this test is useful since visually intricate shapes are produced even at low iteration with little computation.

OBSERVATIONS

All maps in this paper were generated using a constant,/~, as described above, in the region of the ~ plane indicated in Fig. 1. In this figure, g values selected outside the central body do not lead to convergence in eqn (2). Exploration on the computer indicates that the tiny region indicated by the arrow, in particular, gives rise to beautiful curling patterns. Since these ~t are chosen close to the edge of the bounded region in Fig. 1, they are delicately poised between order and c h a o s - - a n d this helps to give the figures their intricate features. Because the ~t values are on the o u t s i d e of the bounded shape, repeated iteration yields structures with a dusty, evanescent quality (and in fact, structures such as these are known as "Fatou dusts"). The further u is from the bounding central shape in this figure, the dust of points gets thinner and thinner. The process of iteration can be likened to pulling layers from a fruit whose center contains a hard kernel. These curls are such "kernels" which remains after a high degree of recursion, and they have a boundary of extreme convolution and complexity. With these dusts, the kernels are especially small. Note that the triangular network of shapes in some of the figures is caused by the nonstandard convergence

Fig. 1. Convergence plot for the u plane. This set controls the Julia sets in the following plots. The boundaries for this figure are (-2.0, 0.5, -1.25, 1.25) (in the order of: real min, real max, imag min, imag max). All other maps in this paper are generated using a constant/~ in the region of the/~ plane indicated by the arrow. Exploration on the computer indicates that this tiny region, in particular, gives rise to beautiful curling patterns when the various convergence tests in the paper are used. All other figures represent various perspectives, described in the text, of the z-plane.

"rl

"tl

0<:

Mathematics and beauty V: turbulent complex curls

Fig. 6.

Fig. 7.

503

"rl "rl

o~ < t'n

©

8

506

C.A. P1CKOVER

.

~ . $ ~ .

Fig. 12.

test. The striped effect in some of the figures is produced by plotting points using an additional convergence test (plotting points if the iteration counter is even (i = 0 mod 2), see Appendix). Some of the figures are plotted in reverse video; i.e., black is represented as white and vice versa. This not only provides visual variety but also also allows certain mathematical structures to be more clearly visualized. The figures illustrate the diversity of forms produced by the techniques described. In order to facilitate comparison and characterization of complicated dynamics, it is important to single out parameters which can be followed in a detailed and an objective fashion. A joystick-driven cursor enables the user to magnify regions of interest and display them in an interactive manner. Several variables may be may be entered at the terminal keyboard; these include the picture boundaries (e.g., z plane boundaries), threshold values, r, for converge testing, and the number of iterations, n. It is possible to toggle between/z and z plane views and to toggle between convergence testing methods. Any coordinate values of interest on the complex plane may be queried and printed simply by pointing on the screen with the joystick-driven cursor. For the pictures, no arrays are stored so that memory requirements are not a problem even for very high-resolution maps. Pictures in this study were usually constructed with a 2000 by 2000 point grid.

SUMMARY AND CONCLUSIONS "Blindness to the aesthetic element in mathematics is widespread and can account for a feelingthat mathematics is dry as dust, as exciting as a telephone b o o k . . . On the contrary, appreciation of this element makes the subject live in a wonderful manner and burn as no other creation of the human mind seems to do."--P. J. Davis and R. Hersch Among the methods available for the characterization of complicated artistic, mathematical, and physical phenomena, computers with graphics are emerging as an important tool (for several papers by this author, see [13]). Today, there are several scientific fields devoted to the study of how complicated behavior can arise in systems from simple rules and how minute changes in the input of a nonlinear system can lead to large differences in the output; such fields include chaos and cellular automata theory[ 14]. Even in the simple equations in this paper, both stable and exploding behavior can emerge--the difference caused by a minute change in the input values. This behavior is qualitatively similar to turbulent fluid systems where there are eddies, vortexes, and blossoms on many size scales at once, and consequently two points that are initially very close in the fluid may soon be located in far away regions in the fluid[15]. In the chaotic regime, arbitrarily close initial conditions can lead to trajectories, which, after a sufficiently long time, diverge widely.

Mathematics and beauty V: turbulent complex curls Note that the Julia-Curl-Explorer program and its joystick-driven cursor allows the researcher to search for a n d magnify pockets of abstract geometric space. The richness of resultant forms contrasts with the simplicity of the generating formula (z --~ z 2 + #). The esthetic a n d functional appreciation of complicated patterns involving the interconnection of rings, knots, a n d spirals dates back to early civilizations[ 16]. These forms appear in sculptures, Mosques, floor a n d ceiling tilings, rugs, braided coiffures a n d formal gardens. In the present paper, the periphery of the various shapes corresponds to a magnificently complicated transition region which no one could fully have appreciated or suspected before the age of the computer. The term " t r a n s i t i o n region" denotes the fact that points inside the b o u n d i n g shapes have different fates upon iteration t h a n those on the outside. Like classic fractal structures, some of the b o u n d a r i e s r e m i n d one of coastlines and, in fact, the boundaries are "self-similar." If we look at any one o f the peninsulas or bays we notice that the same shape is found at a n o t h e r place in a n o t h e r size. In summary, all sets shown here have infinitely m a n y buds a n d bays, a n d although the equations seem to display what might be called " b i z a r r e " behavior, there nevertheless seems to be a limited repertory of recurrent patterns. A report such as this can only be viewed as introductory. However, it is hoped that the techniques, equations, a n d systems will provide a useful tool a n d stimulate future studies in the graphic characterization of the morphologically rich structures produced by relatively simple generating formula.

Acknowledgements--I owe a special debt of gratitude to Ron Feigenblatt for providing code to transfer the digitized images to a high-resolution photocomposer output device and for useful discussions. REFERENCES

1. C. Pickover, Mathematics and beauty II: a sampling of spirals and "strange" spirals in civilization, nature, science, and art. Leonardo, in press (1987). 2. G. Julia, Iteration des applications fonctionnelles. J. Math. Pures Appl. 4, 47-245 ( 1918). 3. B. Mandelbrot, The Fractal Geometry of Nature. Freeman, San Francisco (1982). 4. P. Fischer and W. Smith, Chaos, Fractals, and Dynamics. Marcel Dekker, New York (1985). 5. J Crutchfield, J. Farmer and N. Packard, Chaos. Scientific American 255, 46-57 (1986). 6. C. Pickover and E. Khorasani, Computer graphics generated from the iteration of algebraic transformations in the complex plane. Computer and Graphics 9, 147-151 (1985); C. Pickover and A. Khorasani, Fractal structure of speech waveform graphs. Computers and Graphics 10, 51-61 (1986); C. Pickover, A Monte Carlo approach for placement in waveform fractal-dimension calculation. Computer Graphics Forum 5(3), 203-209 (1986). 7. R. Rivlin, Computer graphics: the arts. Omni Magazine 8, 30 (1986).

507

8. C. Pickover, Biomorphs: computer displays of biological forms generated from mathematical feed back loops. Computer Graphics Forum 5(4), 313-316 (1987). 9. C. Pickover, Mathematics and beauty IV: computer graphics and wild monopodial tendril plant growth. Computer Graphics World 10(7), 143-145 (1987). 10. A. Robinson, Fractal fingers in viscous fluids. Science 228, 1077-1(180 (1985). 11. C. Pickover, Mathematics and beauty: time-discrete phase planes associated with the cyclic system, 1.~(t) - -J(y(t)), )~,t) -/Ix(t))}. Computers and Graphics 11(21, 217-226 (1987); C. Pickover, Blooming integers. Computer Graphics World 10(3), 54-57 (1987). C. Pickover, Graphics, bifurcation, order and chaos. ('omputer Graphics Forum. 6, 26-33 (1987). 12. C. Pickover, Computers, pattern, chaos, and beauty. Computer Graphics in the Arts and Sciences. in press (1987); C. Pickover, Pattern formation and chaos in networks. ACM Commun., in press (1987). 13. C. Pickover, The use of computer-drawn faces as an educational aid in the presentation of statistical concepts. Computers and Graphics 8, 163-166 ( 1984); C. Pickover, The use of symmetrized-dot patterns characterizing speech waveforms. Z Acoust Sot'. Am. 80, 955-960 (1984). C. Pickover, On the educational uses of computer-generated cartoon faces. J. Educational Tech. Syst. 13, 185-198 (1985); C. Pickover, Frequency representations of DNA sequences: Application to a bladder cancer gene. J. Molec. Graphics 2, 50 (1984); C. Pickover, Representation of melody patterns using topographic spectral distribution maps. Computer Music Journal 10, 72-78 (1986); C. Pickover, Computer-drawn faces characterizing nucleic acid sequences. J. Molec. Graphics 2, 107-110 (19851; C. Pickover, DNA vectorgrams: representation of cancer gene sequences as movements along a 2-D cellular lattice. 1BMJ. Res. Dev. 31, 111-119 (1987); C. Pickover, The use of random-dot displays in the study of biomolecular conformation. Journal of Molecular Graphics 2, 34 (1984). C. Pickuver, What is chaos? J. Chaos and Graphics 1(2) (Note: for copies of this newsletter, contact the author). 14. S. Levy, The portable universe: getting to the heart of the matter with cellular automata. The Whole Earth Review Magazine, winter issue, 42-48 (1985). 15. D. Hofstadter, Strange attractors. Scien. Amer. 245, 1629 (19811. 16. S. Wasserman and N. Cozzarelli, Biochemical topology: applications to DNA recombination and replication. Science 232, 951-956 (1986); D. Postle, Fabric of the Universe. Crown, NY (1976). 17. For more information on image processing techniques used to obtain the halftoned maps presented here, see the following papers which are available as IBM Research Reports until they are accepted for publication in external journals. C. Pickover, Mathematics and beauty VII: quaternionic images, submitted to Computer Graphics World (IBM RC 12623) (1987); C. Pickover, The use of image processing techniques in rendering maps with deterministic chaos, submitted to IBM J. Res. Dev. (IBM RC 12483) ( 19871; C. Pickover, Rendering of the Shroud of Turin using sinusoidal pseudo-color and other image processing techniques, Computers and Graphics (IBM RC 12558) (in press). To order, write: IBM Thomas J. Watson Research Center, Distribution Services F-I 1 Stormytown, PO Box 218, Yorktown Heights, NY 10598. 18. C. Jackson, Fractal zoom. Antic (Atari Resource Magazine) 4, 16 (1986).

APPENDIX: RECIPE FOR PICI'URE COMPUTATION

In order to encourage reader involvement, the following pseudocode is given. Typical parameter constants are given within the code. Readers are encouraged to modify the equa-

tions to create a variety of self-squared patterns of their own design. For each picture there are roughly 400 million zsquared operations (2000 × 2000 × 100 iterations). Some

508

C. A. PICKOVER

useful graphic techniques are also presented below which help create visually and mathematically interesting pictures even on a m o n o c h r o m e display. Convergence tests generally follow the value o f z as a function is iterated. The position o f z in the z-plane after n iterations determines whether or not a dot is printed on the graphics screen. Usually ifz grows very large, the equation is considered to have diverged, and no dot is printed. Other tests are also given within the code. In addition, possible color parameters are given. If no color options are available, printing a black dot works well. It is also possible to m a p the iteration number,

ALGORITHM

Complex

Squaring

INPUT: T w o R e a l N u m b e r s : t h e r e a l c o m p o n e n t of a c o m p l e x n u m b e r . OUTPUT: The real and magnitude squared. REAL IMAG REAL SIZE

i, to halftones; i.e., the higher the value of i the darker or lighter the shades become. For readers without access to complex data types, the squaring process can still be easily achieved. Consider the complex number Z (where Z = R + l i ) with real and imaginary components R a n d / , where R and I are real numbers. W h e n z is squared, we get ( R + 1) 2 ~ R 2 + 2 R I + 12. The final term turns out to be a real number, -12. This is because: 12 ~ 12i 2 and i 2 = - 1. Collecting real and imaginary terms we get: R = R 2 - 12 and I = 2R/. Therefore, a program with no complex data types would look like:

imaginary

TEMP = REAL * REAL - IMAG = REAL * IMAG * 2 = REAL TEMP = REAL*REAL + IMAG* IMAG

(REAL)

component

and

imaginary

after

squaring,

(IMAG)

and the

* IMAG

See [18] for BASIC programs used in fractal generation (using the one-step squaring process) as well as for an excellent explanation of "self-squaring" using BASIC.

/* P S E U D O - C O D E /* V a r i a b l e s : /* /*

FOR CALCULATION rz,

OF CHAOTIC

DUSTY

iz = real, i m a g i n a r y c o m p o n e n t i = iteration counter u, z = c o m p l e x n u m b e r s

*/

CURLS of c o m p l e x

number

*/ */ */

u = -.74 + .11 i; /* t y p i c a l u v a l u e */ /* r e a l a x i s d i v i d e d i n t o 2000 p i x e l s */ D O rz = -I to I b y .001; /* imag. a x i s d i v i d e d i n t o 2 0 0 0 p i x e l s */ DO iz = -I to I by .001; I n n e r L o o p : D O i = I to 100; /* i t e r a t i o n l o o p */ z = cplx(rz,iz); /* c p l x r e t u r n s a c o m p l e x n u m b e r */ /* m a i n c o m p u t a t i o n */ z = z**2 + u; */ rz = r e a l ( z ) ; iz = i m a g ( z ) ; / * c o n v e r t to r e a l and i m a g c o m p o n e n t if s q r t ( r z * * 2 + iz**2) > 2 then leave InnerLoop; END; /* I n n e r L o o p */ c o l o r = i; /* a s s i g n c o l o r i n d e x b a s e d on i */ if c o n v e r g e n c e _ t e s t = a t h e n if r z * * 2 + i z * * 2 > 4 t h e n PRINTDOT(rz,iz,color); if c o n v e r g e n c e _ t e s t = b t h e n if ((abs(rz) < 2 ) £ (abs(iz) < 2 )) t h e n t h e n PRINTDOT(rz,iz,color); if c o n v e r g e n c e t e s t = c t h e n if r z * * 2 + i z * * 2 > 4 & m o d ( i , 2 ) = 0 t h e n PRINTDOT(rz,iz,color); END; /* iz l o o p */ END; /* rz l o o p */