<<

Fractals - the ultimate art of mathematics

Adam Kozak Outline

 What is ?  Self-similarity dimension  Fractal types  Iteration Function Systems (IFS)  L-systems  Introduction to complex numbers  Mandelbrot sets  Julia and Fatou sets 

2 What is fractal? Why should I pay attention to it?

 Geometric object with property of self-similarity in any scale factor – in exact manner, approximate or stochastic  Similarity dimension may be not equal to topologic dimension (non-integer value)  Relatively simple recursive definitions

Applications:  Fractal compression   Ideas in engineering, electronics, chemistry, medicine, urban planning which have self-similarity patterns

Fractal antenna in mobile phones capable of capturing much wider scope of frequencies in much smaller areas than classic antenna

3 in nature

Romanesco broccoli Fern

Wikipedia : :

High voltage breakdown within a 4″ block of acrylic

Source Coast with rivers 4 Kolmogorov complexity

 Everyting what can be described, can be described as a string of characters over any alphabet of size > 1.

 E.g. infinite string Ala ma kota, Ala ma kota, Ala ma kota,…

 To encode such a string literally we would need infinite memory, however… we know that we can recreate its any finite substring simply using a computer THIS STRING IS COMPUTABLE

 Kolmogorov complexity of a finite string is a length of the shortest computer program which recreates the string (this is an uncomputable function – there is no algorithm to evaluate it!)

Kolmogorov(„Ala ma kota, Ala ma kota, Ala ma kota, Ala ma kota, Ala ma kota, …”) = Length(„while (true) print(’Ala ma kota, ’);”)

 It is also called informational complexity

5 Hausdorff similarity dimension

 Similarity dimension may be not equal to topologic dimension (non-integer value)

 For „normal” geometric object if we scale it by factor  (0<<1), we need  1  d copies of this object to fill the area of original object where d is dimension

d log N  N   1    d  lim  0 log1    1 2n , N   3n  log 3n log 3  d  lim  1,58496... n log 2n log 2

6 Fractal types

 Fractals may be obtained from different concepts: . Atractors of Iterated Function Systems (IFS)

. Julia & Fatou sets

. Mandelbrot sets

. L-system (Lindenmayer system)

7 Contracting mapping

 Let (X, d) be a metric space, then f: X  X is a contracting mapping if:  0,1:a1,a2  X : d f (a1), f (a2 ) da1,a2   Banach fixed point theorem: There exists exactly one point pX such, that f(p)=p (fixed point of contracting mapping)

Recursive execution of contracting mapping: f(x,y)=(x/3,y/3)

   xn1  f xn  lim xn  x x  f x  cos10   coscos 10  coscoscos 10  n

8 Iterated Function Systems (IFS)

 Recursive transformations of geometric object which sum product of a set of n affine contracting mappings (compositions of rotation,

reflection, translation and contracting scaling): {Fi : X  X } (1i n) n

S0  S Sk  Fi Sk 1  S  lim Sk  k i1

 S is any non empty set of points in a given space X

 S is a fractal – an of IFS, it’s independent of initial S (S is a fixed point of set of contracting mappings {Fi} in metric space (H, h) where H is set of all compact subsets of X and h is Hausdorff distance)

9 Iterated Function Systems (IFS)

2  Any affine contracting mapping Fi in space  has the following formula:

x' ax  by  c x'  x cosx sin  y x tx    Fi x, y            y' dx  ey  f y'  y sin x cos y y t y 

1  x 1  1  y 1

 y

1  x  2  x 1   y 4

 x   y  30

tx  0

t y  2

10 An example of IFS – Sierpiński triangle

2 2  IFS: {Fi:    } (i=1..3): F3x, y

x   y  0 1 21 0x 1 4 F1x, y         1 20 1y 0  1 21 0x 1 4 F2 x, y         1 20 1y 0  1 21 0x 0  F3 x, y         1 20 1y  3 4 F2 x, y F1x, y  Sierpiński triangle is a fixed point (attractor) of Iterated

Function System {F1, F2 , F3}

11 IFS – workshop

Task: locate, count and define contractig mappings

Sierpiński triangle in 3D space (pyramid) [src: Wikipedia] [src: Wikipedia] Barnsley fern with some clues ;) [src: Wikipedia]

12 L-system (Lindenmayer system)

 L-systems are based on recursive grammar with defined variables, constants, rules, axiom and generating parameters; we can assign some operations to each symbol eg.: . variables : X F . constants : + − [ ] . axiom: X . rules : (X → F-[[X]+X]+F[+FX]-X), (F → FF) . parameter - angle: 25°

Assigned meaning of symbols for above L-system: ( F ) draw forward ( - ) turn left 25° ( + ) turn right 25° ( X ) does nothing, just controls evolution of the curve ( [ ) saves coordinates and angle on stack (push) ( ] ) recovers coordinates and angle from stack (pop)

Exemplary generator: http://www.kevs3d.co.uk/dev/lsystems/# 13 Quick introdution to complex numbers

 There is no a real number x such, that 풙2 = −ퟏ  Ok, so let’s create a number which is two-dimensional, and put such a number on imaginary axis, let’s call it 퐢 Complex plane Imaginary numbers 1+i i

Real numbers -1 1

-i

Let’s preserve addition and multiplication like for real numbers keeping in mind, that 풊2 = −ퟏ: 풂 + 풃풊 + 풄 + 풅풊 = 풂 + 풄 + 풃 + 풅 풊 풂 + 풃풊 풄 + 풅풊 = 풂풄 + 풂풅 + 풃풄 풊 + 풃풅풊ퟐ = 풂풄 − 풃풅 + 풂풅 + 풃풄 풊

14 Quick introdution to complex numbers

 But there is another representation!

Complex plane Imaginary numbers 1 + 푖 = 푟 푐표푠 + 푖푠푖푛 = 2 푐표푠45 + 푖푠푖푛45 i 2 2 = 2 + 푖 r 2 2  Real numbers -1 1

-i

Now applying the rules for trygonometric functions we see that multiplication is actually related to rotation on a plane! Complex plane is a field.

풂 + 풃풊 풄 + 풅풊 = 푟1 푐표푠1 + 푖푠푖푛1 푟2 푐표푠2 + 푖푠푖푛2 = 푟1푟2 cos(1 + 2) + 푖푠푖푛(1 + 2)

15 Riemann sphere

 Let’s map whole complex plane onto a spehere, where infility corresponds to a noth pole

16 Mandelbrot sets

1. Mandelbrot sets are defined for rational functions over closed set of complex numbers C  C {z*} (z* corresponds to infinity) cC  c  a bi where i2  1 2. Rational function W :C  C is a division of two polynomials:

k k1 w(z) ak z  ak1z  a1z  a0 W (z)   m m1 l(z) bm z  bm1z  b1z  b0

3. Let Wc denote a rational function dependent on parameter cC n n1 4. Let Wc (z) Wc Wc (z)

5. M(Wc) of a rational function Wc is a set of such n points cC that Wc (0) is not convergent to z*:

n M Wc  {cC : lim Wc (0)  z*} n

17 Mandelbrot sets

n M Wc  {cC : lim Wc (0)  z*} n  This may be satisfied in two ways:

. is convergent to some point c0 n lim Wc (0)  c0 where c0 C n c c Orbit of point c 0 . Recursion finally falls into a cycle (number of stable cycles is related to degree of W)

Orbit of point c

18 Mandelbrot set - example

 The first and best known Mandelbrot set was defined for

polynomial function n 2 Wc (z)  z  c  Thus we need to check for each point in cC if sequence c, c2+c, (c2+c)2+c2+c, … goes to infinity or not

 Workshop: Check, if point c=0+i belongs to Mandelbrot set for this function 1 2 Wc (0)  0  i  i  2 2 Wc (0)  i  i  i 1  3 2 Wc (0)  i 1  i  1 2i 1 i  i  4 2 Wc (0)   i  i  1 i  i 1

Orbit of point c point of Orbit ..... 

19 Mandelbrot set journey

http://www.youtube.com/watch?v=9G6uO7ZHtK8

20 Does Mandelbrot set exist? Take a look  „visual” complexity very low Kolmogorov complexity of its image for (int y = 0; y < HEIGHT; y++) { for (int x = 0; x < WIDTH; x++) { double zx = zy = 0; double cX = (x - WIDTH/2) / ZOOM; double cY = (y - HEIGHT/2) / ZOOM; for (int it = MAX_ITER; zx * zx + zy * zy < 4 && it > 0; it--) { tmp = zx * zx - zy * zy + cX; zy = 2.0 * zx * zy + cY; zx = tmp; } image[x][y] = color(it); } }

21 Newton method for finding function root

https://commons.wikimedia.org/wiki/File:NewtonIteration_Ani.gif

f (xn ) xn1  xn  f '(xn )

22 Julia and Fatou sets

Are based on the same rational functions as Mandelbrot sets and are strictly related to them ( is connected for parameters belonging to Mandelbrot set).

Fatou sets are areas in C which are attracted by some points (here colors red, blue and green) for rational function W(z)

Julia set is a ,,border’’ between Fatou set areas which is

attracted by infinity point (z*). 02k i 3 3 3 n f (z)  z 1  z 1  zk0,1,2  1e

z0 1, z1  1 i 3 2, z2   1 i 3 2, f (z) z3 1 W (z)  z   z   2z  z 2  3 f '(z) 3z 2 W(z)  2z  z2  3

Here is Julia/Fatou set for function W(z) obtained from Newton’s method for function f(z) = z3-1. Thus attracting points for Wn(z) correspond to roots of f(z). http://www.youtube.com/watch?v=nczm0jdyWps

Green color is attracting basin of z0, red of z1, and blue of z2.

23 Mandelbulbs – Mandelbrot sets in 3D

 Defined by Daniel White and Paul Nylander using double rotation transformation for spherical coordinates, since there is no 3D equivalence to 2D complex numbers having all properties of field

http://www.youtube.com/watch?v=rEhWtQfx5nw

24 Thank you for attention

References:  T. Martyn. Fraktale i obiektowe algorytmy ich wizualizacji. Nakom, Poznań, 1996.  J. Kudrewicz. Fraktale i chaos. WNT, Warszawa, 2007.  P. Prusinkiewicz and A. Lindenmayer. The Algorithmic Beauty of Plants. The Virtual Laboratory Series, Springer 1996.  B. Mandelbrot. The fractal geometry of nature. W.H. Freemen and Co. New York, 1982.  http://www.skytopia.com/project/fractal/man delbulb.html  http://bugman123.com/Hypercomplex/

Background source: http://www.skytopia.com/project/fractal/mandelbulb.html 25