Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 Mohan Sridharan Based on Slides.

Similar presentations


Presentation on theme: "Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 Mohan Sridharan Based on Slides."— Presentation transcript:

1 Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 Mohan Sridharan Based on Slides by Edward Angel and Dave Shreiner

2 Modeling Geometric: – Meshes. – Hierarchical. – Curves and Surfaces. Procedural: – Particle Systems. – Fractal. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 2

3 Sierpinski Gasket Rule based: Repeat n times. As n →∞ Area→0 Perimeter →∞ Not a normal geometric object. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 3

4 Coastline Problem What is the length of the coastline of England? Answer: There is no single answer. Depends on length of ruler (units). If we do experiment with maps at various scales we also notice self-similarity: each part looks a whole. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 4

5 Fractal Geometry Created by Mandelbrot: – Self similarity. – Dependence on scale. Leads to idea of fractional dimension. Graftals: graphical fractal objects. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 5

6 Koch Curve/Snowflake E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 6

7 Fractal Dimension Start with unit line, square, cube which we agree are 1, 2, 3 dimensional respectively. Consider scaling each one by a h = 1/n. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 7

8 How Many New Objects? Line: n. Square: n 2. Cube: n 3. The whole is the sum of its parts, i.e., fractal dimension (d) is given by: 8 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 = 1 d =

9 Examples Koch curve: – Subdivision (i.e., scale) by 3 each time. – Create 4 new objects. – d = ln 4 / ln 3 = 1.26186. Sierpinski gasket: – Subdivide (scale) side by 2. – Keep 3 of the 4 new triangles, i.e., create 3 new objects. – d = ln 3 / ln 2 = 1.58496. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 9

10 Volumetric Examples E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 10 d = ln 4/ ln 2 = 2 d = ln 20 / ln 3 = 2.72683

11 Midpoint subdivision E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 11 Randomize displacement using a Gaussian random number generator. Reduce displacement in each iteration by reducing variance of generator.

12 Fractal Brownian Motion E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 12 Variance ~ length -(2-d) Brownian motion d = 1.5

13 Fractal Mountains E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 13 Use fractals to generate mountains and natural terrain. Tetrahedron subdivision + midpoint displacement. Control variance of random number generator to control Roughness. Can apply to mesh surfaces too!

14 Mandelbrot Set Based on fractal geometry. Easy to generate but models infinite complexity in the shapes generated. Based on calculations in the complex plane. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 14

15 Mandelbrot Set Iterate on z k+1 =z k 2 +c with z 0 = 0 + j0. Two cases as k →∞: |z k |→∞ |z k | remains finite; If for a given c, |z k | remains finite, then c belongs to the Mandelbrot set. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 15

16 Mandelbrot Set E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 16

17 Mandelbrot Set E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 17

18 More Details Section 9.8: fractals and recursive methods. Section 9.9: procedural noise. E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 18


Download ppt "Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 1 Mohan Sridharan Based on Slides."

Similar presentations


Ads by Google