$Z.include office:crest $M0.75",0.75",6.7",10.5" $Bulletin(24)$H{COMPUTER SCIENCE$B0AT OPEN DAY}$B2 $Crest(6",0,1) $X0$Y2" $Bulletin(32)$H{THE MANDELBROT SET$B^1 } $H{ $Bulletin(12) The Mandelbrot Set is a mathematical abstraction of quite dazzling beauty and intricacy. From a simple computer program (with sufficient time!) it is possible to generate patterns which embody some of the subtler aspects of natural forms and offer some complex puzzles in pure Mathematics. To understand the Mandelbrot Set one first requires an elementary knowledge of complex numbers, principally ... that a complex number z may have a real part x and an imaginary part y such that z = x + iy, where i is the square root of -1 i.e. i$bulletin(8)-{2} = -1 that any complex number may be plotted on an Argand diagram - a set of axes with the real component running from left to right and the imaginary component running up and down and that any complex number has a magnitude equal to the square root of the sum of the squares of the real and imaginary components (it equals the length of the line from the origin to the point on an Argand diagram). Given that, we may evaluate functions of z, and in this case we are interested in the function f(z) = z$bulletin(8)-{2} + c, where z, c and the result f(z) are all complex. Start with z=0. $b0 Now for any arbitrary value c, apply f(z) repeatedly to itself, i.e. f$bulletin(8)+{1}(z) = z$bulletin(8)-{2} + c f$bulletin(8)+{2}(z) = f(f(z)) = (z$bulletin(8)-{2} + c)$bulletin(8)-{2} + (z$bulletin(8)-{2} + c) f$bulletin(8)+{3}(z) = f(f(f(z))) ... and so on. For certain values of c, the magnitude of f$bulletin(8)+{n}(z) will become infinite. For others it will remain finite. These latter points comprise the Mandelbrot set. The interesting parts (for us!) are the borders of the Mandelbrot set, where the magnitude of f$bulletin(8)+{n}(z) changes suddenly from being finite to being infinite. Small variations of c in this region produce chaotic behaviour in the number of iterations required to make the iteration infinite. We plot the numbers of iterations required to make f$bulletin(8)+{n}(z) infinite versus c and get the plots you see on the screens. Each colour represents a different number of iterations (modulo 256). "Infinite" in the calculation is actually represented by sqr(2) as if the polynomial reaches this value, it will certainly become infinite. It is also necessary to limit the number of iterations one performs before deciding the polynomial has stabilised. The higher this number the greater the detail (provided one can display it) but the longer the computation time. The Set itself is usually represented by black "Seas" and "lakes". It is not generally well known that all these seas and lakes are actually linked, sometimes by tenuous threads. Other characteristics of the Set worth noting are how small "clones" of the set appear at different magnifications, each slightly different. The "slide-show" on the displays are simply different parts of the edge of the Set at different magnifications. A simple BBC-B program to generate portions of the Set $l0 10 REM Mandelbrot Set in BBC BASIC Courtesy J. Greening (C) 30 MODE1: VDU29,800;512; 50 FOR x=-2 TO .56 STEP .01 60 FOR y=1.28 TO -1.28 STEP -.01 70 r=0:i=0:C%=0 80 REPEAT 100 a=r*r: b=i*i: n=a-b+x: m=2*r*i+y: C%=C%+1 140 s=a+b: r=n: i=m 170 UNTIL s>4 OR C%>100 240 IF C%<3 GCOL0,2:GOTO 330 250 IF C%<4 GCOL0,3:GOTO 330 260 IF C%<5 GCOL0,1:GOTO 330 270 IF C%<6 GCOL0,2:GOTO 330 280 IF C%<9 GCOL0,3:GOTO 330 290 IF C%<13 GCOL0,1:GOTO 330 300 IF C%<26 GCOL0,2:GOTO 330 310 IF C%<101 GCOL0,3:GOTO 330 320 GOTO360 330 PLOT69,400*x,400*y 360 NEXT:NEXT 370 *SAVE"MANDEL" 3000 8000 380 END If you want to learn more, try.. Exploring the Mandelbrot Set - Scientific American August 1985 Schondheit im Chaos ("Frontiers of Chaos") - Peitgen and Richter The Fractal Geometry of Nature - B. Mandelbrot [Freeman 1983] "Acorn User" May 1986 } $C $E*