computer graphics-lesson 41 fractals

18
Fractal

Upload: koolnash8784

Post on 22-May-2017

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: computer graphics-Lesson 41 Fractals

Fractal

Page 2: computer graphics-Lesson 41 Fractals

Fractal-An Introduction Fractals are geometrical figures that are generated by

starting with a very simple pattern that grows through the application of rules

The rules to make the figure grow from one stage to the next involve taking the original figure and modifying it or adding to it

This process can be repeated recursively (the same way over and over again) an infinite number of times

A fractal is an object or quantity that displays self-similarity The object need not exhibit exactly the same structure at

all scales, but the same "type" of structures must appear on all scales

Page 3: computer graphics-Lesson 41 Fractals

Fractal

Page 4: computer graphics-Lesson 41 Fractals

Fractal A fractal is generally a rough or fragmented geometric

shape that can be subdivided into parts, each of which is (at least approximately) a reduced-size copy of the whole, a property

A fractal often has the following features:

It has a fine structure at arbitrarily small scales A fractal dimension is greater than the topological dimension It is self-similar It has a simple and recursive definition

Page 5: computer graphics-Lesson 41 Fractals

Fractal

Page 7: computer graphics-Lesson 41 Fractals

Topological Dimension

Suppose an object is composed elastic or clay If the object can be deformed into a line ,we give

dimension Dt = 1 If it deforms into a plane or halfplane, we give dimension

Dt = 2 If it deforms into all spaces or half-space, we give

dimension Dt = 3 Dt is called the topological dimension

Page 8: computer graphics-Lesson 41 Fractals

Fractal Dimension Consider a line segment of length L and dividing it into N

identical pieces, each of length l=L/N Each piece look like the original one, only scaled by a

factor 1/s=l/L To get the original line segment from the segments

scaled by 1/s,we must add togetherN=s1

Now consider a square, if the square is scaled down by 1/s,we will get a small square

How many small squares does it take to rebuild the original

N=s2

Page 9: computer graphics-Lesson 41 Fractals

Fractal Dimension

Page 10: computer graphics-Lesson 41 Fractals

Fractal Dimension For a cube, if we scale by 1/s,we find the number of small

cubes needed to assemble a large cube isN=s3

The exponent is measuring the dimension If we scale an object by s and must assemble N of them

to reconstruct the full-sized object, then the dimension D of the object is given by the relation

N=sD

D is known as the fractal dimension D is given by

D= log N / log s

Page 11: computer graphics-Lesson 41 Fractals

Fractal Dimension The fractal dimension, D, is a statistical quantity that

gives an indication of how completely a fractal appears to fill space, as one zooms down to finer and finer scales

There are many specific definitions of fractal dimension and none of them should be treated as the universal one

It is also known as capacity dimension of a fractal

Page 12: computer graphics-Lesson 41 Fractals

Koch Curve

Consider a line segment Divide it into thirds and replace the center third by the two

equivalent sides of an equilateral triangle This gives a curve which begins and ends at the same place

as the original segment but is built of 4 equal length segments, each 1/3 the original length

The new curve has 4/3 the length of the original segment Repeat the process for each of the 4 segments The curve has gained more wiggles and its length is 16/9

times the original

Page 13: computer graphics-Lesson 41 Fractals

Koch Curve Repeating the replacement indefinitely and each

repetition increases the length by a factor of 4/3 The length of the curve is infinite but it is folded in lots of

tiny wiggles If we reduce the scale by 3,we find a curve that looks

just like the original, but we must assemble 4 such curves to make the original

4=3D

Solving for the fractal dimension givesD=log34= log 4/lg 3=1.26

Page 14: computer graphics-Lesson 41 Fractals

Hilbert’s Curve Begin with a square Divide the square into 4 quadrants and draw the curve

which connects the center points of each Further subdivide each of the quadrant and connect the

centers of each of these finer division before moving to the next major quadrant

Continue this process infinitely The curve never crosses itself The curve is arbitrarily close to every point in the square The curve passes through the points on a grid, which

becomes twice as fine with each subdivision There is no limit to the subdivision

Page 15: computer graphics-Lesson 41 Fractals

Hilbert’s Curve The curves fills the square and is infinite With each subdivision, the length increases by a factor of 4 This curve is constructed which is topologically equivalent to a line Dt =

1 The curve has been so twisted and folded that it exactly fills up a

square At each subdivision the scale changes by 2,but the length changes by 4 It takes 4 curves of half scale to build the full-sized object,so D is given

by4=2D

Solving for the fractal dimension givesD= log 4/log 2=2

Page 16: computer graphics-Lesson 41 Fractals

Fractal Line Computer can be used to generate self-similar fractal

curves The self-similar drawing can be done by a self-referencing

procedure (a recursive procedure) A curve which is composed of N self-similar pieces, each

scaled by 1/s,can be drawn by a routine which calls itself N times with arguments scaled by 1/s

Start by looking at the halfway point for the fractal line The halfway points are

((x1+x2)/2 +dx , (y1+y2)/2 +dy , (z1+z2)/2 +dz )Where dx,dy and dz are the offset terms and given by

dx= L * W * GAUSS

Page 17: computer graphics-Lesson 41 Fractals

Fractal Line Where L is the length of the segment W is a weighting function governing the curve

roughness(& fractal dimension) The function GAUSS returns a Gaussian variable with 0

mean That means that

About half the values returned are positive and the other half are negative

Number greatly different than 0 are much less likely to appear than those near 0

Page 18: computer graphics-Lesson 41 Fractals

Thank You