<<

Fractal

Ron Goldman Department of Computer Science Rice University Dimension and Subdivision

• • • • • • € • € • € • • • € •€ • € • € € € € € • • • • • • • • • € € € € € • € • € € € € € € • € • • €

• • • • • • • € • • € €

€ € € € € € € € € # parts = 2 # parts = 4 = 22 # parts = 8 = 23

Dimension =1 Dimension = 2 Dimension = 3 € € €

€ € € Dimension and

Dimension and Subdivision

• D = Log2 (E) -- E = the number of equal scaled down parts.

€ Dimension and Subdivision -- Revisited Log(E) • D = Log (E) = N Log(N) -- E = the number of equal scaled down parts -- N = number of line segments along each edge € Dimension Formula Log(E) • D = − Log(S) -- E = the number of equal scaled down parts -- S =1/ N = scaling along each edge €

€ Examples

Line E = N S = 1/ N Log(E) Log(N) D = − = − = 1 Log(S) Log(1/ N)

Square E = N 2 S = 1/ N Log(E) Log(N 2 ) D = − = − = 2 Log(S) Log(1/ N)

Cube E = N 3 S = 1/ N Log(E) Log(N 3 ) D = − = − = 3 Log(S) Log(1/ N) Self Similar

Self Similar A curve (surface, solid) is self-similar if it can be subdivided into a collection of subsets that are scaled versions of the original curve (surface, solid).

Form Follows Function is used to Express Self-Similarity

Fractal Dimension Log(E) D = − Log(S) • D = dimension • E = number of equal (self-similar) parts • S = scale factor Fractal Dimension and Recursive Turtle Programs

Fractal Dimension Log(E) • D = − Log(S) -- E = number of equal self-similar parts -- S = scaling along each direction

Fractal Dimension and Recursive Turtle Programs • E =# Recursive Calls • S = Scale Factor Log(# Recursive Calls) € • D = − Log(Scale Factor) €

€ Strange Curves

Fractals

• Curves with Dimension > 1

• Curves Continuous Everywhere, but Differentiable Nowhere

• Closed Curves with Infinite Length and Enclosing Finite

• Curves that Fill Sierpinski Gasket

• Each corner triangle is scaled by 1/2 -- scale factor. • Number of triangles goes up by a factor of 3 -- recursive calls. Sierpinski Gasket

Recursive Turtle Program Sierpinski(Level) If Level = 0, Draw a Triangle Else Repeat 3 Times RESIZE 1/2 Sierpinski(Level–1) RESIZE 2 MOVE 1 TURN 2π /3

Fractal Dimens€ ion E = 3 S =1/2 Log(E) Log(3) Log(3) D = − = − = ⇒1< D < 2 Log(S) Log(1/ 2) Log(2)

Koch Curve Koch Snowflake Koch Snowflake

Koch(Level) If Level = 0, FORWARD 1 Else RESIZE 1/3 Koch(Level-1) TURN 60 Koch(Level-1) TURN −120 Koch(Level-1) TURN 60 Koch(Level-1) RESIZE 3 {Restore initial size}

Snowflake(Level) Repeat 3 [Koch(Level) , TURN –120] Koch Snowflake (continued)

Observations • Side of each bump is scaled by 1/3 -- scale factor. • Number of bumps goes up by a factor of 4 -- recursive calls.

Fractal Dimension E = 4 S = 1/ 3 Log(E) Log(4) Log(4) D = − = − = ⇒1 < D < 2 Log(S) Log(1/ 3) Log(3)

Perimeter

Pn +1 = 4 / 3Pn ⇒ Pn → ∞

Area 2 2 3 An+1 = A0 + 3A0 (1/ 9 + 4 / 9 + 4 / 9 +L) 1/ 9 An → A0 + 3A0 = (8 /5)A0 1− 4 / 9 Koch Snowflake (continued)

Painters Paradox • Extrude Koch Snowflake into 3– -- Infinite Surface Area → Perimeter -- Finite Volume → Area • Fill the Volume with Paint

Smoothness • Continuous Everywhere -- No Tears • Differentiable Nowhere -- Bumps Everywhere C–Curve

C-Bump C-Curve C–Curve

C(Level) If Level = 0, FORWARD 1 Else TURN 45 2 RESIZE 2 C(Level −1) TURN −90 € C(Level −1) € TURN 45 {Restore initial direction} RESIZE 2 {Restore initial size} €

€ C–Curve (continued)

Observations • Side of each bump is scaled by 2 / 2 -- scale factor. • Number of bumps goes up by a factor of 2 -- recursive calls.

Fractal Dimension E = 2 S = 2 / 2 Log(E) Log(2) −Log(2) D = − = − = ⇒ D = 2 Log(S) Log( 2 /2) 1/ 2Log(2) − Log(2)

Perimeter

• Pn +1 = 2Pn ⇒ Pn → ∞

Smoothness • Continuous Everywhere -- No Tears • Differentiable Nowhere -- Bumps Everywhere