Fractal Geometry Course

111

Click here to load reader

description

Many computer graphics and Image Processing effects owe much of their realism to the study of fractals and noise. This short tutorial is based on over a decade of teaching and research interests, and will take a journey from the motion of a microscopic particle to the creation of imaginary planets.Further resources at: http://wiki.rcs.manchester.ac.uk/community/Fractal_Resources_Tutorial

Transcript of Fractal Geometry Course

Page 1: Fractal Geometry Course

Fractals and Noise – Creation and Fractals and Noise – Creation and ApplicationApplicationShort TutorialShort Tutorial Fractal Geometry Properties and Fractal Geometry Properties and Exploitation: 30+ years of ImagesExploitation: 30+ years of Images

Martin J. Turner

Research Computing, University of Manchester

[email protected]

Page 2: Fractal Geometry Course

Research Computing

The University of Manchester

Web: http://www.rcs.manchester.ac.uk/

•Resources at:

•http://wiki.rcs.manchester.ac.uk/community/Fractal_Resources_Tutorial

Page 3: Fractal Geometry Course

3

Contents of Presentation

Introduction to Fractal Geometry.

Properties – Deterministic Fractals.

Noise – Creation and Images.

Language for Fractals.

Extra bits:– Fractal Compression

– Fractal Segmentation

Page 4: Fractal Geometry Course

4

Introduction to Fractals and Chaos

Algorithms used to generate fractals and chaotic fields depend on:

understanding a physical (e.g. non-linear) system;

clear and concise (mathematical) definition(s) of the field properties.

Page 5: Fractal Geometry Course

5

Example Applications

Signal Processing:

Time Series Analysis, Speech Recognition

Image Processing:

Fractal Compression, Fractal Dimension Segmentation

Simulation:

Terrain Modelling, Image Synthesis, Music, Stochastic Fields

Page 6: Fractal Geometry Course

6

Financial:

Fractal Market Analysis, Futures Markets

Medicine:

Histology, Monitoring, Epidemiology

Military:

Visual Camouflage, Covert Digital Communications

Example Applications

Page 7: Fractal Geometry Course

7

Brief History of Fractals/Chaos

1815-1897: K W T Weierstrass Nowhere Differentiable Functions

1854-1912: J H Poincare

Non-Deterministic (Chaotic) Dynamics

1900s: Julia, Koch & others

Julia sets (simple fractals) - arise in connection with the iteration of a function of a complex variable

Page 8: Fractal Geometry Course

8

1886-1971: P Levy

Fractal Random Walks (Random Fractals)

1960s: E Lorenz

Nonlinear Systems Dynamics and Chaos

1970s: B Mandelbrot

Mandelbrot sets and the development of a general theory on the ‘Fractal Geometry of Nature’ (1975)

Brief History of Fractals/Chaos

Page 9: Fractal Geometry Course

9

Brief History of Fractals/Chaos

1815-1897:

K W T Weierstrass Nowhere Differentiable Functions

Page 10: Fractal Geometry Course

10

Brief History of Fractals/Chaos

1815-1897:

K W T Weierstrass

Matlab – speed.

Page 11: Fractal Geometry Course

11

Brief History of Fractals/Chaos

1815-1897:

K W T Weierstrass Nowhere Differentiable Functions

Dreadful Plague,Hermite

Yesterday, if a new functionwas invented it was to serve some practical end; today they arespecially invented only to show to the arguments of our fathers, andthey will never have any other use

Poincare

Page 12: Fractal Geometry Course

12

Aside: Fourier Series

Page 13: Fractal Geometry Course

13

Hilbert – one of the first useful fractals

Hilbert Space Filling Curve

Suddenly we have uses;

Dimension reduction

Dithering style

Compression codecs

Page 14: Fractal Geometry Course

14

Hilbert – one of the first useful fractals

Hilbert Space Filling Curve

Properties: Function f,

is a one-to-one mapping,

is onto, and

continuous function

There is no continuous inverse mapping.

Page 15: Fractal Geometry Course

15

Robert Brown – Non-Differentiation in nature

varies in the wildest way in magnitude and direction, and does not tend to a limit as the time taken for an observation decrease

nature contains suggestions of non-differentiable as well as differentiable processes

Jean Perrin

Step: 32, Length: 6392

Page 16: Fractal Geometry Course

16

Robert Brown – non-differentiation in nature

varies in the wildest way in magnitude and direction, and does not tend to a limit as the time taken for an observation decrease

nature contains suggestions of non-differentiable as well as differentiable processes

Jean Perrin

Step: 16, Length: 8747

Page 17: Fractal Geometry Course

17

Robert Brown – non-differentiation in nature

varies in the wildest way in magnitude and direction, and does not tend to a limit as the time taken for an observation decrease

nature contains suggestions of non-differentiable as well as differentiable processes

Jean Perrin

Step: 8, Length: 12091

Page 18: Fractal Geometry Course

18

Robert Brown – non-differentiation in nature

varies in the wildest way in magnitude and direction, and does not tend to a limit as the time taken for an observation decrease

nature contains suggestions of non-differentiable as well as differentiable processes

Jean Perrin

Step: 4, Length: 17453

Page 19: Fractal Geometry Course

19

Texture and Fractals

Texture is an elusive notion which mathematicians and scientists find hard to grasp

Much of Fractal Geometry can be considered to be an intrinsic study of texture

Benoit Mandelbrot

Page 20: Fractal Geometry Course

20

The Fractal Geometry of Nature: Clouds

Photo from Manchester, UK

Page 21: Fractal Geometry Course

21

Islamic Art: Self-Repeating Patterns

Page 22: Fractal Geometry Course

22

Self-Similarity by M C Escher

Page 23: Fractal Geometry Course

23

Self-Similarity by K Hokusai -Japanese Art from the 1800s

Page 24: Fractal Geometry Course

24

Self-Similarity by SnowPhotos by Patricia Rasmussen

Page 25: Fractal Geometry Course

25

Texture by Jackson Pollock

Page 26: Fractal Geometry Course

26

Self-Similarity and J S Bach

Page 27: Fractal Geometry Course

27

This movement depicts the island as a physical object. There are three structural principles at work: 1) reading the silhouette of the island seen from the shore (east to west)as a graph with range/density along the y-axis and time (19')along the x-axis 2) alternating "inbreaths" and "outbreaths" of varying durations calculated by careful measurement of the inlets and outlets of the island's shoreline, as shown on a hand- drawn map 3) a series of soundscapes representing the various environments encountered during a brisk walk around the island (which takes 19').

Self-Similarity within MusicISLAND SYMPHONY: Andrew Hugill

Page 28: Fractal Geometry Course

28

Fractal: Origin of the word? 30+ years old!

The word Fractal was introduced by B Mandelbrot in the 1970s.

The term fractal is derived from the Latin adjective fractus. The corresponding Latin verb frangere means ‘to break’, to create irregular fragments. In addition to ‘fragmaneted’ fractus should also mean ‘irregular’, both meanings being preseved in fragment

Page 29: Fractal Geometry Course

29

Intr

oduc

tion

of C

G in

the

70

’s

Fractal: Mandelbrot Sets

“Objets Fractals” – published 1975

“Fractals Form Chanceand Dimension” –published 1977

Zooming into the Mandelbrot Set`

Page 30: Fractal Geometry Course

30

Fractal: Mandelbrot Sets

Intr

oduc

tion

of C

G in

the

70

’s

“The Fractal Geometryof Nature” – published 1982

Zooming into the Mandelbrot Set`

Page 31: Fractal Geometry Course

31

Initiator:

Production Rule:

Properties of Fractals:The Von Koch Curve

Page 32: Fractal Geometry Course

32

Properties of Fractals:The Von Koch Curve

Repeating theProduction ruleagainandagain and again.

Page 33: Fractal Geometry Course

33

Properties of Fractals:The Von Koch Island

Joining threeCurves gives usan Island.

Page 34: Fractal Geometry Course

34

Properties of Fractals:The Von Koch Island

Page 35: Fractal Geometry Course

35

Fundamental properties of a fractal signal

1. It is nowhere differentiable.2. It is infinitely long.3. It is finitely bounded.4. It has a notion of self-similarity at

each level.

Page 36: Fractal Geometry Course

36

Dimension of a Fractal

The dimension is the rate at which the signal approaches infinite length.

A smooth signal has a lower dimension.

Page 37: Fractal Geometry Course

37

Dimension of a Fractal

Page 38: Fractal Geometry Course

38

Box Counting – Dimension

Page 39: Fractal Geometry Course

39

Fractional Brownian Motion

fBm has zero mean Gaussian distribution increments with variance;

with scaling property

Most famous case when, H=1/2

Page 40: Fractal Geometry Course

40

Fractional Brownian Motion

fBm is related to Box Counting

So the number of boxes,

Page 41: Fractal Geometry Course

41

Power Spectrum Method

We consider this a ‘favoured’ system;

We wish to match a power spectrum decay rate, that has similar properties to fBm

Page 42: Fractal Geometry Course

42

Euclidean Objects in Fourier Space

Page 43: Fractal Geometry Course

43

Fractal Objects in Fourier Space

Page 44: Fractal Geometry Course

44

Frequency Spectrum and Log-Log

Frequency spectrum F is proportional to (Frequency)-q or

F = c/k q

where c is a constant and k denotes frequency.

Take logs of both side and we get

log(F) = C - qlog(k) where C = log(c)

Equation describes a straight line with a negative gradient determined by value of q.

Page 45: Fractal Geometry Course

45

Fractal Signal of Koch Curve and its Log-Log Frequency Spectrum

Page 46: Fractal Geometry Course

46

The Fractal Dimension D and q (the Fourier Dimension)

The larger the value of the fractal dimension D the smaller the value of q.

D and q must be related in some way.

For fractal functions: q=(5-2D) /2; 1<D<2.

The Fourier Dimension determines the ‘roughness’, ‘texture’ or frequency characteristics or spectrum of the fractal.

Page 47: Fractal Geometry Course

47

Random Fractals and Nature: Stochastic Noise

Very few natural shapes are regular fractals.

The majority of natural shapes are statistically self-affine fractals.

As we zoom into a random fractal, the shape changes, but the distribution of lengths (texture) remains the same.

Page 48: Fractal Geometry Course

48

Fundamental Definition of a Random Fractal Signal: Frequency Spectrum

Let f be a random function with spectrum F.

Let n be ‘white’ noise with spectrum N.

If F = N/kq where k is frequency, then a property of f is that

Pr[f(x)] = q Pr[f(x)]

N.B. The equation for statistical self-affinity implies that the spectrum of a fractal obeys an inverse q-power law.

Page 49: Fractal Geometry Course

49

Randomisation of the Koch Curve

Page 50: Fractal Geometry Course

50

Aside: all the fractals!

Page 51: Fractal Geometry Course

51

Summary

Objects

Self-similar Classical

Deterministic Statistical

Random RealPure Chaotic

Page 52: Fractal Geometry Course

52

Noise: White to Black

Colour

0 White

1 Pink

1.5 Brown

>2 black

qk/1

kFourier Spectrumhas the property,

Page 53: Fractal Geometry Course

53

Basic property is that the Power Spectrum is proportional to

Basic algorithm is thus:

1. Compute white noise field n.

2. Compute DFT of n to give N (complex).

3. Filter N with filter

4. Compute inverse DFT of result to give u[i] (real part) - fractal signal.

Simulation of Random Fractal Signalsqk/1

2//1 qk

Page 54: Fractal Geometry Course

54

Fractal Signal for D=1.2 (top) with Log-Log Power Spectrum (bottom)

Page 55: Fractal Geometry Course

55

Noise: White to Black – Elegant Algorithm

Page 56: Fractal Geometry Course

56

Noise: Fourier Fractals

Mat

lab

Cod

e

Page 57: Fractal Geometry Course

57

Noise: Non-Fourier

Subdivide – a grid adding noise at each level

Matlab example

ddnH

n

2/

2

1

Page 58: Fractal Geometry Course

58

Perlin Noise – a popular alternative

Similar structure but the sum of weighted frequencies.

Very similar to previous technique but values of ‘d’ from a LUT

Perlin Noise from Jia Liu

Page 59: Fractal Geometry Course

59

Control of Perlin Noise

Perlin Noise from Jia Liu

Page 60: Fractal Geometry Course

60

Parameters control

Perlin Noise from Jia Liu

Page 61: Fractal Geometry Course

61

Tensor Gravity Field Analysis

Perlin Noise from Jia Liu

Page 62: Fractal Geometry Course

62

Tensor Gravity Field Analysis

Perlin Noise from Jia Liu

Page 63: Fractal Geometry Course

63

Aside: Fractional Brownian Motion

Page 64: Fractal Geometry Course

64

Aside: Fractional Brownian Motion

P=0.50, D=1.621

P=0.75, D=1.609

Page 65: Fractal Geometry Course

65

Aside: Fractional Brownian Motion

P=0.10, D=1.690

P=0.25, D=1.641

Page 66: Fractal Geometry Course

66

Adding Deterministic Information

How can we incorporate a priori information on the large scale structure of a fractal field and thus Tailor it accordingly?

Replace white noise field n by (1-t)n+tp where p is a user defined function and t (0<t<1) is a ‘transmission coefficient’.

Page 67: Fractal Geometry Course

67

Example: Sine Wave with Fractal Noise (t=0.1)

0 200 400 600 800 1000 12000.4

0.41

0.42

0.43

0.44

0.45

0.46

0.47

10 0 10 1 10 2 10 3 10 410 -6

10 -4

10 -2

10 0

10 2

10 4

10 6

Page 68: Fractal Geometry Course

68

Adding Deterministic Info.

Page 69: Fractal Geometry Course

69

Adding Deterministic Info.

Matlab system from J. Blackledge

Page 70: Fractal Geometry Course

70

Fractal Clouds: q=1.9

Page 71: Fractal Geometry Course

71

Fractal Clouds: q=1.8

Page 72: Fractal Geometry Course

72

Fractal Clouds: q=1.7

Page 73: Fractal Geometry Course

73

Fractal Clouds: q=1.6

Page 74: Fractal Geometry Course

74

Fractal Clouds: q=1.5

Page 75: Fractal Geometry Course

75

Fractal Clouds: q=1.4

Page 76: Fractal Geometry Course

76

Fractal Clouds: q=1.3

Page 77: Fractal Geometry Course

77

Novel Methods

Use of Transparency as a texture modifier for an ellipse

Page 78: Fractal Geometry Course

78

Novel Methods

Use of 3D fractal texture bumpmap

Fractal transparency for rings on a circle

Page 79: Fractal Geometry Course

Matlab system from J. Blackledge

Page 80: Fractal Geometry Course

80

Divergent fractal fields

Consider the 2D stochastic fractional divergence equation

Matlab system from J. Blackledge

Page 81: Fractal Geometry Course

Matlab system from J. Blackledge

Page 82: Fractal Geometry Course

82

Rotational fractal fields

Consider the 2D stochastic fractional rotation equation

Matlab system from J. Blackledge

Page 83: Fractal Geometry Course

Matlab system from J. Blackledge

Page 84: Fractal Geometry Course

84

Fractal flow fields

Consider the 2D stochastic fractional flow equation

q2>q1: Flow is in x-direction

q2<q1: Flow is in y-direction

Matlab system from J. Blackledge

Page 85: Fractal Geometry Course

85Matlab system from J. Blackledge

Page 86: Fractal Geometry Course

86

Fractals in Haptics

Controlling a multi-frequency haptic vibration device.

Page 87: Fractal Geometry Course

87

Generalisation

Random fractal process: PSDF=ck-q

Ornstein-Uhlenbeck process: ck (k02 +k2)-1

Bermann process: c |k|g (k02+k2)-1

Combining the results we can consider the following generalisation:

c |k|g (k02+k2)-q

where k0 is a ‘carrier frequency’, c is a constant and (q, g) are fractal parameters.

Page 88: Fractal Geometry Course

Book on fractal geometry Book on fractal geometry

Theory, applications

and algorithms of

fractal geometry

for image synthesis,

image processing

and computer vision

Page 89: Fractal Geometry Course

89

Pause…

Page 90: Fractal Geometry Course

90

Language for Fractals

Lindermayer Systems

Page 91: Fractal Geometry Course

91

Language for Fractals: Ex 1.

Page 92: Fractal Geometry Course

92

Language for Fractals: Ex 2.

Page 93: Fractal Geometry Course

93

Language for Fractals: Ex 2.

Page 94: Fractal Geometry Course

94

Language for Fractals: Ex 2.

Page 95: Fractal Geometry Course

95

Language for Fractals: Ex 2.

Page 96: Fractal Geometry Course

96

Language for Fractals: Ex 2.

Page 97: Fractal Geometry Course

97

Language for Fractals: Ex 2.

Page 98: Fractal Geometry Course

98

Language for Fractals: FractInt

Page 99: Fractal Geometry Course

99

Language for Fractals: FractInt Ex. 1

Page 100: Fractal Geometry Course

100

Language for Fractals: FractInt Ex. 2 – (Revisited)

Page 101: Fractal Geometry Course

101

Language for Fractals: FractInt Ex. 3

Page 102: Fractal Geometry Course

102

Language for Fractals: FractInt Ex. 4

Page 103: Fractal Geometry Course

103

Language for Fractals: Ex. 4+

Page 104: Fractal Geometry Course

104

Language for Fractals: Ex. 4++

Page 105: Fractal Geometry Course

105

Language for Fractals: Ex. 4.5++

Simulating and Modeling Lichen Growth – Brett Desbenoit, Eric Galin and Samir Akkouche, LIRIS, CNRS Universite Claude Bernard, Lyon

(Poss. wrong one)

Page 106: Fractal Geometry Course

106

Language for Fractals: VR

VR World of DMU

Page 107: Fractal Geometry Course

107

Language for Fractals: VR

VR World of DMU

Page 108: Fractal Geometry Course

108

Language for Fractals: VR+

VR World of Manchester – Japanese Tuition: Anja Le Blanc

Fractal Plants within a VLE – Virtual Learning Environment: 3D world

Page 109: Fractal Geometry Course

109

Language for Fractals: VR+

Blueberry3D – lots of LOD tricks and billboarding; circa 2003/4

Page 110: Fractal Geometry Course

110

Thanks …

Over 10 years of Fractal curiosity:

Allan Evans, Jonathan Blackledge and all at the old ISS - Institute of Simulation Sciences, De Montfort University

The guys at the Virtual Environment Centre at De Montfort University

All the staff and students at the Manchester Visualization Centre at the University of Manchester

Plus many others (whose credits should be there).

Page 111: Fractal Geometry Course

Research Computing

The University of Manchester

Web: http://www.rcs.manchester.ac.uk/

Resources at:

http://wiki.rcs.manchester.ac.uk/community/Fractal_Resources_Tutorial