CS 455 Computer Graphics - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

CS 455 Computer Graphics

Description:

CS 455 Computer Graphics – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 56
Provided by: cs6
Category:
Tags: computer | graphics | if1

less

Transcript and Presenter's Notes

Title: CS 455 Computer Graphics


1
CS 455 Computer Graphics
  • Fractals in Graphics

2
Texturing with Images
  • Texture maps with images are good because images
    are (sometimes) easy to create.
  • In some cases, just taking a picture is easier
    than writing a program to generate the picture.
  • But
  • Images are hard to get for things that arent
    real.
  • Images consume space.
  • Images have finite precision.

3
Procedural Methods.
  • Write a program to generate the texture.
  • Save space.
  • In some cases, can zoom in forever and retain
    precision
  • But
  • Hard to write the right procedure.
  • However, ideas based on fractals go a long way.
  • Especially for objects in nature.

4
Euclidean vs. Fractal
  • Standard objects are represented in Euclidean
    geometry
  • Described by equations
  • This gives smooth, regular objects
  • Spheres
  • Polygons
  • B-spline surfaces
  • How do we model natural objects?
  • Clouds
  • Mountains
  • Plants
  • These kinds of objects are better represented
    with fractal geometry

5
What is a Fractal?
  • Benoit Mandelbrot, 1982,
  • clouds are not spheres, mountains are not
    cones, coastlines are not circles, and bark is
    not smooth, nor does lightning travel in a
    straight line.
  • Objects are represented as procedures rather than
    equations
  • Repeating the fractal procedure produces more and
    more detail

6
Properties of Fractals
  • Self-similarity between object parts and the
    overall object features
  • Fractional dimension
  • No specific size or scaling
  • Infinite detail looks good at every resolution
  • Generated by a function, so no data to store.
  • Some of them look like things you find in nature.

7
Fractal Mountain
The closer you get, the more detail you see
8
Fractal Generation
  • A fractal object is generated by repeatedly
    applying a specified transformation
  • Can apply the transformation to a point set, set
    of primitives (lines, curves, colors ,etc.), or
    anything else
  • Theoretically, the procedure is applied an
    infinite number of times
  • Practically, we iterate a finite number of times,
    then call it good.

9
Fractal Dimension (Hausdorff variant)
Split into ¼ the size and multiply by
4 Build original by splitting into 4 parts
and multiplying by 4
Split into ¼ the size And multiply by 16
42 Build original by splitting into 4 parts
and multiplying by 42
Build original by splitting into 4 parts and
multiplying by 43
10
Fractal Dimension
  • We can talk about the fractalness of an object
    using the fractal dimension
  • A measurement of how rough the object is
  • The fractal dimension is computed using the scale
    factor we reduce by, and the number of times we
    replicate the scaled down object.

11
Fractal Dimension (Hausdorff variant)
Split into ¼ the size and multiply by
4 Build original by splitting into 4 parts
and multiplying by 4
Split into ¼ the size And multiply by 16
42 Build original by splitting into 4 parts
and multiplying by 42
Build original by splitting into 4 parts and
multiplying by 43
12
Sierpinski Triangle
  • Take a triangle.
  • Reduce by ½
  • Make 3 copies and arrange them into a triangle
  • Repeat forever.

13
Sierpinski Triangle
14
A Few Examples
Penrose tiling 1.974 Cauliflower 2.33
Menger sponge 2.726
http//en.wikipedia.org/wiki/List_of_fractals_by_H
ausdorff_dimension
15
c. 13 branches each 1/3 smaller, D
log(13)/log(3) 2.33
16
Fractals in Nature
http//www.treklens.com/gallery/Oceania/New_Zealan
d/photo22113.htm
http//www.funpike.com/images/plant-bushes/2fracta
l_nature_1.jpg
17
Fractal Classification
  • Self-similar fractals
  • Parts are scaled-down versions of the initial
    object
  • Deterministic self-similar
  • Non-random
  • Statistically self-similar
  • Some randomness introduced
  • Self-affine
  • Different scaling parameters in each coordinate
    direction
  • Invariant Fractal Sets
  • Formed with nonlinear transformations
  • Sets in the complex plane (usually)

18
1. Self-Similar Fractals
  • Parts are scaled-down versions of the entire
    object
  • Start with the initial shape
  • Construct sub-parts by duplicating the initial
    shape and scaling it
  • Can apply different scaling factors for different
    parts
  • Example
  • The von Koch snowflake
  • Can also introduce random variations to the
    sub-parts
  • These fractals are statistically self-similar
  • Typically used to model trees, shrubs, and other
    plants

19
Von Koch Snowflake
  • Start with initiator
  • And generator
  • At each iteration, replace each piece of the
    initiator with the generator

20
Von Koch Snowflake
  • Iteration 0

21
Von Koch Snowflake
  • Iteration 1

22
Von Koch Snowflake
  • Iteration 2

23
Von Koch Snowflake
  • Iteration 3

24
Other Self-Similar Fractals
25
Statistically Self-Similar Fractals
  • Self-similar fractals in which random variations
    aremade to the sub-parts
  • Typically used to model trees, shrubs, and other
    plants

Marco Bubkewww.xfrogdownloads.com
Bernd Lintermann www.xfrogdownloads.com
26
Self-Affine Fractals
  • The scale factor differs for each direction

Self Similar
Self Affine
27
Self Affine Fractals
Self Similar
Self Affine
28
Invariant Fractal Sets
  • Formed with non-linear transformations
  • Includes the self-squaring fractals and the
    self-inversefractals

29
Mandelbrot Set
  • Iterate over a complex function
  • Color the point in space based on how quickly the
    function diverges at that point
  • Points that do not diverge are in the set
  • The set is typically colored black, points that
    diverge at different speeds are colored
    accordingly

30
The Mandelbrot Set
31
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
32
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
33
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
34
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
35
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
36
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
37
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
38
Zooming into the set
www.chem.vu.nl/feenstra/mandel_gallery.html
39
Zooming into the Mandelbrot Set
Mandelbrot Zoom
Interactive Mandelbrot Zoom
40
Computing the Mandelbrot Set
For each pixel on the screen do x x0 // x
co-ordinate of pixel y y0 // y co-ordinate of
pixel x2 xx y2 yy iteration 0
maxiteration 1000 while ( x2 y2 lt (22)
AND iteration lt maxiteration ) y 2xy
y0 x x2 - y2 x0 x2 xx y2 yy
iteration iteration 1 if ( iteration
maxiteration ) color black else color
iteration
41
Midpoint Displacement Technique
  • Start with an initial object
  • Find the midpoint of the edges of the object
  • Randomly perturb those midpoints
  • Repeat recursively
  • 2D for coastlines
  • 3D for mountains

42
Midpoint Displacement
43
Midpoint Displacement
44
Midpoint Displacement
45
Fractal Mountains
  • Start with the basic shape of the mountain
  • Subdivide edges of the shape
  • Randomly perturb the new vertices
  • Repeat recursively

46
Fractal Terrain Results
47
More Fractal Terrain
48
www.cg.tuwien.ac.at
49
www.nextrevision.com
50
djconnel.com/Vue/
51
Fractal Terrain
  • Problems?
  • Just doesnt look quite right
  • Coloration
  • Landscape ruggedness
  • What else?
  • Modifications to the basic technique
  • Randomize all points, not just midpoints
  • Vary roughness based on height
  • User guided terrain generation

52
Other Uses of Fractals
  • Sierpinski Triangle

53
Other Uses of Fractals
  • Fractal Brociflower

54
Other Uses of Fractals
  • Fractal Planets

http//baddoggames.com/planet/gallery.htm
55
Other Uses of Fractals
  • Fractal Chandelier
Write a Comment
User Comments (0)
About PowerShow.com