1 / 17

Fractals and L-Systems

Fractals and L-Systems. Brian Cavalier 15-462 November 25, 1997. Overview. The notion of a fractal Self similarity and Iteration Fractal Dimension Fractal Uses L-Systems. What’s With Euclid Anyway? (Motivation). Aren’t sphere’s, cubes, and polygons good enough?

lester-luna
Télécharger la présentation

Fractals and L-Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fractals and L-Systems Brian Cavalier 15-462 November 25, 1997

  2. Overview • The notion of a fractal • Self similarity and Iteration • Fractal Dimension • Fractal Uses • L-Systems

  3. What’s With Euclid Anyway? (Motivation) • Aren’t sphere’s, cubes, and polygons good enough? • Well, it depends on your intent, but ... • Not many interesting real-world objects are really traditional geometric objects. • Coastlines, trees, lightning • These could be modeled with cylinders, polygons, etc, but ... • Their true level of complexity can only be crudely approximated with traditional geometric shapes

  4. First, a Question • How long is the coast line of Britain? • How would you measure it?

  5. A Solution? • Start by looking at it from a satellite • Pick equally spaced points and draw lines between them. Then measure the lines • Now you know the length, right? • Well, sort of ... • What if you move closer and decrease the distance between the points? • Suddenly what looked like a straight stretch of coast becomes bays and peninsulas

  6. The Notion of a Fractal • “... a geometrically complex object, the complexity of which arises through the repetition of form over some range of scales.” -- Ken Musgrave, Texturing and Modeling • Say what?

  7. Self-Similarity and Iteration • Simple • Shapes repeat themselves exactly at different scales • Koch curves and snowflakes • Statistical • Statistics of a random geometry are similar at different scales • Trees, rivers, mountains, lightning

  8. Physical Dimension • A point, line, plane, and cube all have physical dimension that we accept as being 0, 1, 2, and 3 respectively. • Mandelbrot’s view • Dimension is a scale-dependent term • Consider zooming in on a ball of thread

  9. Fractal Dimension • In the Euclidian plane • we usually speak of topological dimension, which is always an integer. • Fractal dimensions can have non-integer values. • What does a dimension of, say, 2.3 mean? • 2 is the underlying Euclidian dimension of the fractal • The fractional value “slides” from 0 to 0.9999... as the fractal goes from occupying its Euclidian dimension, e.g. plane, to densely filling some part of the next higher dimension.

  10. Simple Fractals Using Iteration • Use mathematical iteration and simple logic to produce amazing images • One kind, you have already seen in the Koch and Sierpinski fractals • Another kind is more numerical • Mandelbrot • Julia • fractional Brownian motion

  11. Mandelbrot Set - How? • Simple algorithm using points on the complex plane • Pick a point on the complex plane • The corresponding complex number has the form: x + i*y, where i = sqrt( - 1 ) • Iterate on the function Zn = Zn-12 + C • Where Z0 = 0, and Z1 = C2 + C • What does Z do? It either • Remains near the origin, or • Eventually goes toward infinity

  12. Mandelbrot Set - How? (2) • To produce pretty pictures, do this for every point C on the complex plane where -2.5 < x < 1.5, and -1.5 < y < 1.5 • See how many iterations it takes for Z to go to infinity • Uh, how do you compute that? • Just pick some max number of iterations to check • It turns out if the distance ever grows to a value > 2, the iteration will go to infinity. • Color the point C based on the number of iterations

  13. Julia Sets • Just a variant on Mandelbrot Sets • There is an entire Julia Set corresponding to each point in the complex plane. • An infinite number of Julia Sets • Most interesting sets tend to be those found by using points just outside the Mandlebrot set. • Similar Iteration formula, but vary Z not C • Zn = Zn-12 + C

  14. Fractional Brownian Motion double fBm( Vector point, double H, double lacunarity, double octaves ) { if ( firstTimeCalled ) { initialize exponent table for octaves } for( i=0 to octaves-1 ) { value = BasisFuction( point )*exponentForOctave( i ); point.x *= lacunarity; point.y *= lacunarity; point.z *= lacunarity; } if( octaves not and integer ) { value += fractionalPartOf( octaves ) * BasisFunction( point )*exponentForOctave( i ); return value; }

  15. Cool, But What are They Good For? • Not just neat pictures in 2D • Procedural Textures • Terrain Generation • Other Realism • Music?!?

  16. L-Systems • Remember the Koch Curve & Snowflake? • Think of it as a grammar:

  17. Just Add Water ... • L-Systems “grow” based on their production rules • Plants • Cells • Can control the iteration of production rules and actually animate the growth • Grammars of fine enough granularity could simulate growth at the cell level ... talk about eating CPU cycles ...

More Related