Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Fun with Fractals Mike Whittaker University of Glasgow Royal Institution of Great Britain Masterclass in Mathematics University of Glasgow 7 November 2015 Plan for today: 1. Introduction 2. Introduction to complex numbers 3. Julia sets 4. The Mandelbrot set Romanesco broccoli A fractal A fern The Barnsley Fern Lungs A fractal Snowflake The Koch Snowflake Painting “Winter Oak” by Virginia Daley Fractal tree What are fractals? Definition (Oxford English Dictionary) A fractal is a curve or geometrical figure, each part of which has the same statistical character as the whole. They are useful in modelling structures (such as snowflakes) in which similar patterns recur at progressively smaller scales, and in describing partly random or chaotic phenomena such as crystal growth and galaxy formation. Fractals often come from unexpected places... Paper folding Take your long piece of paper and fold it once. With the fold to the left make a 2nd fold (this isn’t really important but will make sure we all get the same result). Now unfold the result After 2 folds you should get Paper folding Refold your paper (with the first fold to the left). Now make a 3rd fold and unfold the result. It should look like: Paper folding Refold your paper (with the first fold to the left). Now make a 4th fold and unfold the result. It should look like: Paper folding Refold your paper (with the first fold to the left). Now make a 5th fold and unfold the result. It should look like: Paper folding 6th iteration: Paper folding 7th iteration: Paper folding 8th iteration: Paper folding 9th iteration: Paper folding 10th iteration: Paper folding 11th iteration: Paper folding 12th iteration: Paper folding 13th iteration: Paper folding 14th iteration: Paper folding 15th iteration: Paper folding ... 20th iteration: Aside about paper folding How many times do you think you could fold a piece of paper? I bet you all a chocolate bar that none of you can fold a piece of paper 10 times... Lets work out how thick the paper will be if you could fold it 10, 15, 20, and 43 times... Let’s assume that a standard piece of paper is 0.05mm thick (I got this figure from the internet). If you fold the paper 10 times how many sheets of paper thick is the stack? Hint: Use your paper to check the numbers for 2,3,4,5 folds. Aside about paper folding At 10 folds your paper is 210 sheets thick. So we have 210 × 0.05mm = 1024 × 0.05mm = 51.2mm At 15 folds your paper is 215 sheets thick. So we have 215 × 0.05mm = 32768 × 0.05mm = 1638.4mm ≈ 1.6m At 20 folds your paper is 220 sheets thick. So we have 220 × 0.05mm ≈ 1718kms At 43 folds your paper is 243 sheets thick. So we have 243 × 0.05mm ≈ 439804kms Note: The distance from earth to the moon is 384400kms. Part 2: Introduction to complex numbers Introduction to complex numbers Is there a solution to the polynomial equation x 2 + 1 = 0? Solving for x we have x2 + 1 = 0 =⇒ x 2 = −1 =⇒ √ x = ± −1. But hold on! You can’t take the square root of a negative number.............. In the 1500s, this annoyed Rafael Bombelli. So he came up with an alternative: √ Bombelli’s idea is to imagine that −1 does exist, and to declare √ i = −1. Introduction to complex numbers √ Assuming that i = −1 exists we still get a mathematically consistent framework (i.e. this crazy idea actually works!). We call i an imaginary number since you have to imagine that it exists. Lets check that x = i is a solution x 2 + 1 = 0: √ i 2 + 1 = ( −1)2 + 1 = −1 + 1 = 0 X Introduction to complex numbers A complex number is a number of the form a + bi where a and b are real numbers. We can add and multiply complex numbers as follows: (a + bi) + (c + di) = (a + c) + (b + d)i and (a+bi)(c +di) = ac +bci +adi +bdi 2 = (ac −bd)+(bc +ad)i. For example (3+2i)2 = (3+2i)(3+2i) = 9+6i+6i+4i 2 = (9−4)+(6+6)i = 5+12i On your scrap paper try working out (1 + i)(4 − 2i) = 4 − 2i + 4i − 2i 2 = (4 + 2) + (−2 + 4)i = 6 + 2i The geometry of complex numbers For any complex number a + bi we have two coordinates, the real coordinate and the imaginary coordinate imaginary a + bi b a real The modulus of a complex number is the quantity p |a + bi| = a2 + b 2 . Using the Pythagorean Theorem, the modulus is the length of the blue arrow. Part 3: Julia sets 0.5 0.0 -0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 Julia sets Consider the equation f (z) = z 2 + c for c a complex number. Let f 2 (z) = f (f (z)) and f 3 (z) = f (f (f (z))) and so on. For each fixed complex number z0 we want to look at the values |f (z0 )|, |f 2 (z0 )|, |f 3 (z0 )|, |f 4 (z0 )|, |f 5 (z0 )|, · · · and determine if this sequence of numbers bounded or if is goes off to infinity. The (filled) Julia Set is the set of complex values where the above sequence is bounded. Julia set example: f (z) = z 2 − 1 Lets see what sort of sequences we get for f (z) = z 2 − 1. First look at 0. We get f (0) = 02 − 1 = −1 f 2 (0) = f (f (0)) = f (−1) = (−1)2 − 1 = 1 − 1 = 0 f 3 (0) = f (f 2 (0)) = f (0) = −1 f 4 (0) = f (f 3 (0)) = f (−1) = 0, and the pattern repeats. So the sequence we get is {1, 0, 1, 0, 1, 0, · · · }. This is a bounded sequence, so 0 belongs to the Julia set of f (z) = z 2 − 1. Question: Is 1 in the Julia set of f (z) = z 2 − 1? Solution: Yes! Since f (1) = 12 − 1 = 0, using the sequence for 0 we get {0, 1, 0, 1, 0, · · · } which is bounded. Julia set example: f (z) = z 2 − 1 Lets take a look at the sequence for the complex number i: f (i) = i 2 − 1 = −1 − 1 = −2 f 2 (i) = f (f (i)) = f (−2) = (−2)2 − 1 = 4 − 1 = 3 f 3 (i) = f (f 2 (i)) = f (3) = 32 − 1 = 8 f 4 (i) = f (f 3 (i)) = f (8) = 82 − 1 = 63, and we get a sequence that grows very large. So the sequence we get is {2, 3, 8, 63, 3968, · · · }. This is an unbounded sequence, so i does not belong to the Julia set f (z) = z 2 − 1. Question: So what’s the point? Answer: The set of complex numbers that give bounded sequences (the Julia Set) is a remarkable geometric object. The Julia set of f (z) = z 2 − 1 0.5 0.0 -0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 Every point in the black part of the image above is in the Julia set and the coloured points are not! The Julia set of f (z) = z 2 Exercise for problem session: Can you work out (guess) the Julia set of f (z) = z 2 ? Hint: Plug in some complex numbers and see what you get! 1.0 0.5 0.0 -0.5 -1.0 -1.0 -0.5 0.0 0.5 1.0 You get a circle of radius 1. The Julia set of f (z) = z 2 + i 1.0 0.5 0.0 -0.5 -1.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 + 8i/9 1.0 0.5 0.0 -0.5 -1.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 − 1.3 0.6 0.4 0.2 0.0 -0.2 -0.4 -0.6 -2 -1 0 1 2 The Julia set of f (z) = z 2 − 1.7549 0.4 0.2 0.0 -0.2 -0.4 -2 -1 0 1 2 The Julia set of f (z) = z 2 − 0.12256 − 0.74486i 1.0 0.5 0.0 -0.5 -1.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 − 1.037 + 0.17i 0.5 0.0 -0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 − 0.52 + 0.57i 1.0 0.5 0.0 -0.5 -1.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 + 0.295 + 0.55i 1.0 0.5 0.0 -0.5 -1.0 -1.0 -0.5 0.0 0.5 1.0 The Julia set of f (z) = z 2 − 0.624 + 0.435i 1.0 0.5 0.0 -0.5 -1.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 − 0.8 − 0.175i 0.5 0.0 -0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The Julia set of f (z) = z 2 − 0.8 − 0.15i 0.5 0.0 -0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 Part 4: The Mandelbrot set Benoı̂t Mandelbrot 1924–2010 The Mandelbrot set To study Julia sets we considered complex functions f (z) = z 2 + c. What happens if we study these functions as the value c varies? Let fc (z) = z 2 + c and look at the sequence {fc (0), fc2 (0), fc3 (0), · · · } (1) for different values of c. The Mandelbrot Set consists of the values of c where the sequence (1) is bounded. For example, in the Julia set section, we saw that the sequence (1) is bounded for f0 and f−1 So what does the collection of all points that are bounded look like... The Mandelbrot Set 1.0 0.5 0 -0.5 -1.0 -2.0 -1.5 -1.0 -0.5 0 0.5 The Mandelbrot set “There is nothing more to this than a simple iterative formula. It is so simple that most children can program their home computers to produce the Mandelbrot set... Its astounding complication was completely out of proportion with what I was expecting.” - Benoı̂t Mandelbrot. Zooming in on the Mandelbrot set 0.70 0.65 0.60 0.55 0.50 -0.65 -0.60 -0.55 -0.50 -0.45 -0.40 The complexity of the Mandelbrot set is absolutely astounding. Zooming in on the Mandelbrot set 0.195 0.195 0.190 0.190 0.185 0.185 0.180 0.180 0.175 0.175 -0.740 -0.735 -0.730 -0.725 -0.740 -0.735 -0.730 -0.725 These two images are both the same region in the Mandelbrot set. On the left we have coloured points black that have sequences that get larger than 2 after 300 iterations and on the right after 800 iterations. Zooming in on the Mandelbrot set https://www.youtube.com/watch?v=PD2XgQOyCCk This video uses 10227 iterations to produce this high resolution version of the Mandelbrot set. To give you a sense of the scale of this number: The universe is estimated to contain between 1078 and 1082 atoms. it took 4 weeks for a really fast computer to produce. Another definition of the Mandelbrot set There is an alternative definition: The Mandelbrot set consists of the points c such that the Julia set of fc (z) = z 2 + c is connected. Connectedness is a topological property. So the Mandelbrot set can be said to be a single object encoding interesting features of the collection of all Julia sets. Lets see this with some more pictures... Finding Julia sets in the Mandelbrot set 1.0 0.5 1.0 0.0 0.5 0.0 -0.5 -0.5 -1.0 -1.0 -2.0 -1.5 -1.0 -0.5 0.0 0.5 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 The red dot in the Mandelbrot set shows where this Julia set on the left comes from in within the Mandelbrot set. Finding Julia sets in the Mandelbrot set 1.0 1.0 0.5 0.5 0.0 0.0 -0.5 -0.5 -1.0 -2.0 -1.0 -1.5 -1.0 -0.5 0.0 0.5 -1.0 -0.5 0.0 0.5 1.0 The red dot in the Mandelbrot set shows where this Julia set on the left comes from in within the Mandelbrot set. Some Julia sets of the Mandelbrot set Resources The Dragon Curve - by Numberphile video: https://www.youtube.com/watch?v=wCyC-K_PnRY Mandelbrot Set - by Numberphile video: https://www.youtube.com/watch?v=NGMRB4O922I Filled Julia Sets - by Numberphile video: https://www.youtube.com/watch?v=oCkQ7WK7vuY Mandelbrot zoom video: https://www.youtube.com/watch?v=PD2XgQOyCCk The images were produced by Mathematica.