25
Fractals - the ultimate art of mathematics Adam Kozak

Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Fractals - the ultimate art of mathematics

Adam Kozak

Page 2: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Outline

What is fractal?

Self-similarity dimension

Fractal types

Iteration Function Systems (IFS)

L-systems

Introduction to complex numbers

Mandelbrot sets

Julia and Fatou sets

Mandelbulbs

2

Page 3: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

What is fractal? Why should I payattention to it?

Geometric object with property of self-similarity in any scalefactor – in exact manner, approximate or stochastic

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

Relatively simple recursive definitions

3

Applications:

Fractal compression

Fractal art

Ideas in engineering, electronics, chemistry, medicine, urban planningwhich have self-similarity patterns

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

Page 4: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Fractals in nature

4

Sou

rce:

Wik

iped

ia

Romanesco broccoli

High voltage breakdown within a 4″ block of acrylic

Fern

Coast with rivers

Page 5: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Kolmogorov complexity

Everyting what can be described, can be described as a string of characters overany 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 computerTHIS STRING IS COMPUTABLE

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

It is also called informational complexity

5

Kolmogorov(„Ala ma kota, Ala ma kota, Ala ma kota, Ala ma kota, Ala ma kota, …”)

=

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

Page 6: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

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 copies of this object to fill the area of originalobject where d is dimension

6

1,58496...2log

3log

2log

3loglim

3,21

1log

loglim1

0

n

n

n

nn

d

d

N

NdN

d1

Page 7: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

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

Page 8: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Contracting mapping

Let (X, d) be a metric space, then f: X X is a contractingmapping if:

Banach fixed point theorem: There exists exactly one pointpX such, that f(p)=p (fixed point of contracting mapping)

8

212121 ,)(),(:,:1,0 aadafafdXaa

Recursive execution of

contracting mapping:

f(x,y)=(x/3,y/3)

1010101 coscoscoscoscoscoslim

xfxxxxfx n

nnn

Page 9: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Iterated Function Systems (IFS)

9

Recursive transformations of geometric object which sum productof a set of n affine contracting mappings (compositions of rotation, reflection, translation and contracting scaling): {Fi : X X } (1i n)

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

S is a fractal – an attractor 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)

kk

n

i

kik SSSFSSS

lim1

10

Page 10: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Iterated Function Systems (IFS)

10

Any affine contracting mapping Fi in space 2 has the followingformula:

1111

cossin

sincos

'

',

'

'

yx

y

x

yx

yx

y

x

it

t

y

x

y

xyxF

feydxy

cbyaxx

2

0

30

4

1

2

1

y

x

yx

y

x

t

t

x

y

Page 11: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

An example of IFS – Sierpiński triangle

IFS: {Fi: 2 2} (i=1..3):

Sierpiński triangle is a fixed point (attractor) of IteratedFunction System {F1, F2 , F3}

11

43

0

10

01

21

21,

0

41

10

01

21

21,

0

41

10

01

21

21,

0

3

2

1

y

xyxF

y

xyxF

y

xyxF

yx

yxF ,1 yxF ,2

yxF ,3

Page 12: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

IFS – workshop

12

Barnsley fern

with some clues ;)

[src: Wikipedia]

Sierpiński carpet

[src: Wikipedia]

Sierpiński triangle in 3D space (pyramid)

[src: Wikipedia]

Task: locate, count and define contractig mappings

Page 13: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

L-system (Lindenmayer system)

L-systems are based on recursive grammar with definedvariables, 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°

13

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/#

Page 14: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Quick introdution to complexnumbers

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 𝐢

14

Real numbers

Imaginary numbersComplex plane

i

1

-i

-1

1+i

Let’s preserve addition and multiplication like for real numbers keeping in

mind, that 𝒊2 = −𝟏:𝒂 + 𝒃𝒊 + 𝒄 + 𝒅𝒊 = 𝒂 + 𝒄 + 𝒃 + 𝒅 𝒊

𝒂 + 𝒃𝒊 𝒄 + 𝒅𝒊 = 𝒂𝒄 + 𝒂𝒅 + 𝒃𝒄 𝒊 + 𝒃𝒅𝒊𝟐 = 𝒂𝒄 − 𝒃𝒅 + 𝒂𝒅 + 𝒃𝒄 𝒊

Page 15: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Quick introdution to complexnumbers

But there is another representation!

15

Real numbers

Imaginary numbersComplex plane

i

1

-i

-1

1 + 𝑖 = 𝑟 𝑐𝑜𝑠 + 𝑖𝑠𝑖𝑛 = 2 𝑐𝑜𝑠45+ 𝑖𝑠𝑖𝑛45

= 22

2+ 𝑖

2

2

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)

r

Page 16: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Riemann sphere

Let’s map whole complex plane onto a spehere, whereinfility corresponds to a noth pole

16

Page 17: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Mandelbrot sets

1. Mandelbrot sets are defined for rational functions over closedset of complex numbers (z* corresponds to infinity)

2. Rational function is a division of two polynomials:

3. Let Wc denote a rational function dependent on parameter

4. Let

5. Mandelbrot set M(Wc) of a rational function Wc is a set of suchpoints that is not convergent to z*:

17

01

1

1

01

1

1

)(

)()(

bzbzbzb

azazaza

zl

zwzW

m

m

m

m

k

k

k

k

)()( 1 zWWzW n

cc

n

c

)0(n

cW

*})0(lim:{ zWCcWM n

cn

c

12 iwherebiacCc

*}{zCC

Cc

CCW :

Cc

Page 18: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

0cc

Mandelbrot sets

This may be satisfied in two ways:

Recursion is convergent to some point c0

Recursion finally falls into a cycle(number of stable cycles is related to degree of W)

18

*})0(lim:{ zWCcWM n

cn

c

CcwherecW n

cn

00)0(lim

c

Orbit of point c

Orbit of point c

Page 19: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Mandelbrot set - example

The first and best known Mandelbrot set was defined for polynomial function

Thus we need to check for each point in cC ifsequence c, c2+c, (c2+c)2+c2+c, … goes toinfinity or not

Workshop: Check, if point c=0+i belongs toMandelbrot set for this function

19

czzW n

c 2)(

.....

11)0(

1211)0(

1)0(

0)0(

24

23

22

21

iiiiW

iiiiiW

iiiW

iiW

c

c

c

c

Orb

it o

f poin

t c

Page 20: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Mandelbrot set journeyhttp://www.youtube.com/watch?v=9G6uO7ZHtK8

20

Page 21: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Does Mandelbrot set exist? Take a look

21

„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);

}

}

Page 22: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Newton method for finding functionroot

22

)('

)(1

n

nnn

xf

xfxx

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

Page 23: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Julia and Fatou sets

23

Are based on the same rational functions as Mandelbrot setsand are strictly related to them (Julia set is connected forparameters 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 isattracted by infinity point (z*).

32)( 2 zzzW

323

1

)('

)()(

,231,231,1

111)(

2

2

3

210

20

32,1,0

33

zzz

zz

zf

zfzzW

izizz

ezzzzf n

ki

k

Here is Julia/Fatou set for function W(z) obtained fromNewton’s method for function f(z) = z3-1. Thus attractingpoints for Wn(z) correspond to roots of f(z).

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

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

Page 24: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

Mandelbulbs – Mandelbrot sets in 3D

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

24

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

Page 25: Fractals - the ultimate art of mathematics ultimate art … · Fractals - the ultimate art of mathematics Adam Kozak. Outline What is fractal? Self-similarity dimension Fractal types

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 VirtualLaboratory Series, Springer 1996.

B. Mandelbrot. The fractal geometry of nature. W.H. Freemen and Co. New York, 1982.

http://www.skytopia.com/project/fractal/mandelbulb.html

http://bugman123.com/Hypercomplex/

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