Chaotic Fun with Fractals or Fractals and Mandelbrot Sets and Chaos

Notes on the talk given by Peter Smith on 17th November 2017

Fractals

Although there are fractals in nature, the term itself was coined only in the mid-twentieth century when enough computing power became available to investigate fractals mathematically.

Peter had brought some natural fractals for us to take apart. While bemoaning the lack of Romanesco in Waitrose, the idea of fractals was amply demonstrated by us taking a cauliflower apart and examining the way in which the floret shape is repeated as you progress down in size from the whole vegetable to the tiniest parts you can see. However, the structure does get rather less like itself as you progress downwards. You can see about 3 or 4 iterations.

Other examples of natural fractals are ferns, cow parsley and trees.

Peter gave each of us a sheet of paper ruled into triangles and had us produce Koch snowflakes. This kept us all quiet with our tongues out for a good long time – some longer than others. We replace each line of the initial triangle with a shape like this

And then did it again (& again if we felt so inclined), producing shapes like these.

The limit to this kind of iteration is the thickness of the pencil, but in maths, a line has no thickness so you can go on forever.

So natural fractals are not the same as mathematical fractals.

All we need to produce these fractals is a starting point and some rule for the next stage e.g. starting point is an equilateral triangle and the rule is to replace each straight line with a pointy hat. We looked at various series of numbers and Menger’s sponge[1] to illustrate this way of proceeding.

Chaos

There are lots of examples where you can find the (n+1)th term of a series from the nth term

e.g. un+1 = un +2

If we start with 1, the series would be 1, 3, 5, 7 and so on. This just gets bigger and bigger to infinity. We tried to guess what would happen to various series. For example –

un+1 = 1 - 2un2

Start at 3 and this just gets bigger and bigger to infinity. These are examples of well-behaved functions.

Some things are unexpected, for example if you start with 0.5 in the last example, the values are 0.5 repeated forever. But, if you start with -0.17, you get a very different look

n / un
0 / -0.17
1 / 0.9422
2 / -0.77548
3 / -0.20274
4 / 0.91779
5 / -0.68468
6 / 0.062435
7 / 0.992204
8 / -0.96894
9 / -0.87768
10 / -0.54063
11 / 0.415433
12 / 0.654831
13 / 0.142392
14 / 0.959449
15 / -0.84108
16 / -0.41485
17 / 0.655803
18 / 0.139844
19 / 0.960887
20 / -0.84661
21 / -0.4335
22 / 0.624164

It’s not random because it is totally determined from the formula but it’s unpredictable. You can play with different starting values and get some very strange results. For example, a starting value of 0.2 gives a very different graph to a starting value of 0.2001. They look similar at the beginning but then begin to look quite different at larger values. This is CHAOTIC behaviour. You can’t predict it but it isn’t random and very small changes in starting values give very different results.

Recognise the weather? The Met office is pretty good at predicting the weather in the next 24 hours but after that results begin to get much poorer. Economic theory is also chaotic in this mathematical sense of the word.

Mandelbrot Set

We ended up by looking at what are essentially 2 dimensional fractals. If we start off with an image on the computer made up of around 1 million pixels, and then we take one of those pixels as a test start – say 0.2, 0.3 (assuming a Cartesian coordinate system with 0, 0 in the centre of the image) and then use a formula to work out the next value in the same way as we did with fractals – let’s use

(xn+1, yn+1) = (xn2 – yn2 + xtest, 2xnyn + ytest)

Then we work out the values to see if the series goes off to infinity or not. If it does, it is not in the Mandelbrot set and we colour it blue as in the example below. If it stays in the area, it is in the Mandelbrot set and we colour it black. We do this for every pixel in the image so it is a huge computational task, although the calculation itself is simple enough. Pixels where the series takes a while to shoot off to infinity are rendered in intermediate colours, hinted at in the white pixels at the border of the Mandelbrot set.

https://en.wikipedia.org/wiki/Mandelbrot_set

As well as being amazing images to look at, the introduction of Mandelbrot sets led to the introduction of fractal compression which allows many types of images to take up much less space on the computer with almost undetectable or at least immaterial loss of resolution.

M. Rose

[1] The starting point of a Menger’s sponge is a cube. The rule is to replace each cube by a 3x3x3 cube – i.e. the second iteration is a Rubik cube.