CGT 581 G Procedural Methods Fractals

Similar documents
CGT 511 Procedural Methods

Fractals Week 10, Lecture 19

Fractal Geometry. Prof. Thomas Bäck Fractal Geometry 1. Natural Computing Group

Fractal Geometry. LIACS Natural Computing Group Leiden University

Fractals and Multi-Layer Coloring Algorithms

Fractals. Moreno Marzolla Dip. di Informatica Scienza e Ingegneria (DISI) Università di Bologna.

7. Stochastic Fractals

Mathematics 350 Section 6.3 Introduction to Fractals

Fractals & Iterative Function Systems

Session 27: Fractals - Handout

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

Fractals: a way to represent natural objects

Hei nz-ottopeitgen. Hartmut Jürgens Dietmar Sau pe. Chaos and Fractals. New Frontiers of Science

Clouds, biological growth, and coastlines are

Fractal Coding. CS 6723 Image Processing Fall 2013

Fractals: Self-Similarity and Fractal Dimension Math 198, Spring 2013

Discovering. Algebra. An Investigative Approach. Condensed Lessons for Make-up Work

1 Overview. EPFL 14 th Apr, /6. Michaël Defferrard Pierre Fechting Vu Hiep Doan


CS 543: Computer Graphics Lecture 3 (Part I): Fractals. Emmanuel Agu

Computer Graphics (CS 543) Lecture 2c: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Constrained Diffusion Limited Aggregation in 3 Dimensions

Chapter 12: Fractal Geometry The Koch Snowflake and Self-Similarity

Chapel Hill Math Circle: Symmetry and Fractals

Scientific Calculation and Visualization

Fractals. Materials. Pencil Paper Grid made of triangles

Computer Graphics 4731 Lecture 5: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Textures III. Week 10, Wed Mar 24

Fractal Image Coding (IFS) Nimrod Peleg Update: Mar. 2008

CSE 167: Lecture #17: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Real-Time Procedural Effects. John Spitzer Director of European Developer Technology NVIDIA Corporation

Lecture 8: Modelling Urban Morphology:

2.) From the set {A, B, C, D, E, F, G, H}, produce all of the four character combinations. Be sure that they are in lexicographic order.

16 - Other Topics. The Stencil Buffer. Erosion. Fragment Discarding. Multi-Texturing + +

FRACTALS AND THE SIERPINSKI TRIANGLE

CS 563 Advanced Topics in Computer Graphics Chapter 31 Noise Based Textures. by Scott Ingram

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

CSE 167: Lecture #15: Procedural Modeling. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Scope and Sequence for the New Jersey Core Curriculum Content Standards

More Texture Mapping. Texture Mapping 1/46

Generation of 3D Fractal Images for Mandelbrot and Julia Sets

GTPS Curriculum Mathematics Grade 8

Fractals. Fractals. Beautiful designs of infinite structure and complexity Qualities of Fractals:

Fun with Fractals Saturday Morning Math Group

9. Three Dimensional Object Representations

Rendering Smoke & Clouds

Space Filling: A new algorithm for procedural creation of game assets

Interpolation and Basis Fns

Fractals, Fibonacci numbers in Nature 17 mai 2015

Fractals and the Chaos Game

Fractal Dimension and the Cantor Set

Outline. Solid models and fractals. Constructive solid geometry. Constructive solid geometry COM3404. Richard Everson

Grade 9 Math Terminology

CSE 167: Introduction to Computer Graphics Lecture #16: Procedural Modeling

<The von Koch Snowflake Investigation> properties of fractals is self-similarity. It means that we can magnify them many times and after every

Construction of 3D Mandelbrot Set and Julia Set

Lecture 3: Some Strange Properties of Fractal Curves

Advanced Rendering Techniques

Exploring Fractals through Geometry and Algebra. Kelly Deckelman Ben Eggleston Laura Mckenzie Patricia Parker-Davis Deanna Voss

Interpolation and Basis Fns

Solid models and fractals

MPM 1D Learning Goals and Success Criteria ver1 Sept. 1, Learning Goal I will be able to: Success Criteria I can:

Noise Course Overview Jim Whitehead. UC Santa Cruz School of Engineering courses.soe.ucsc.edu/courses/cmps265/spring14/01

1-5 Parent Functions and Transformations

Lecture 6: Fractals from Iterated Function Systems. He draweth also the mighty with his power: Job 24:22

AN ALGORITHM TO GENERATE MODELS OF SNOWFLAKES

DLA Simulations. Jasraj Singh Kohli Gregory Raustad Peter Del Rosso

Birkdale High School - Higher Scheme of Work

NUMB3RS Activity: I It Itera Iteration. Episode: Rampage

CS324e -Elements of Graphics and Visualization. Fractals and 3D Landscapes

A simple problem that has a solution that is far deeper than expected!

Exploring the Effect of Direction on Vector-Based Fractals

COASTLINES AND FRACTAL GEOMETRY: ESTIMATING LENGTH AND GENERATING ISLANDS. Miranda Bradshaw Dallas Pullen Math 365 Wright 5/8/12

White Paper. Perlin Fire. February 2007 WP _v01

Fun with Fractals and Functions. CHAMP at University of Houston March 2, 2015 Houston, Texas

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

Definitions. Modeling. Primitives. Creating a model of an object, usually out of a collection of simpler primitives

Literature Review. Bruce Alcock. A Procedural, Minimal Input, Natural Terrain Plug-in for Blender. Supervisors: Kevin Glass and Shaun Bangay

A space filling algorithm for generating procedural geometry and texture

The Geometry of Solids

Some geometries to describe nature

Mathematics Numbers: Percentages. Science and Mathematics Education Research Group

Simi imilar Shapes lar Shapes Nesting Squares Poly lyhedr hedra and E a and Euler ler s Form s Formula ula

Copyright 2009 Pearson Education, Inc. Chapter 9 Section 7 - Slide 1 AND

Overview. Hierarchy. Level of detail hierarchy Texture maps Procedural shading and texturing Texture synthesis and noise.

FRACTAL: A SET WHICH IS LARGER THAN THE UNIVERSE

2D Drawing Primitives

Fractals in Nature and Mathematics: From Simplicity to Complexity

Lecture Outlines Chapter 26

Random Numbers Random Walk

Does it Look Square? Hexagonal Bipyramids, Triangular Antiprismoids, and their Fractals

A NON-TRIGONOMETRIC, PSEUDO AREA PRESERVING, POLYLINE SMOOTHING ALGORITHM

Making Plant-Like Fractals on GSP by Mike M c Garry

CGT 581 G Geometric Modeling Curves

The Koch curve in three dimensions

Lecture 6: Fractals from Iterated Function Systems. He draweth also the mighty with his power: Job 24:22

GTPS Curriculum Grade 6 Math

In this lesson, students build fractals and track the growth of fractal measurements using tables and equations. Enduring Understanding

Number Sense and Operations Curriculum Framework Learning Standard

Applications. 44 Stretching and Shrinking

Transcription:

CGT 581 G Procedural Methods Fractals Bedrich Benes, Ph.D. Purdue University Department of Computer Graphics Technology Procedural Techniques Model is generated by a piece of code. Model is not represented as data! The generation can take some time and of course the data can be pre calculated Procedural Techniques Three huge (vague) classes: Fractals Particle systems Grammars Used when shape cannot be represented as a surface (fire, water, smoke, flock of birds, explosions, model of mountain, grass, clouds, plants, facades, cities, etc.) The Mandelbrot Set the big logo The Mandelbrot set Discovered in 1970 by Benoit Mandelbrot It is a non linear deterministic fractal It is graph of a solution of a dynamic system Benoit Mandelbrot Used for Simulation of Natural Phenomena

The Mandelbrot Set Take the equation where: and are complex numbers and Explore complex numbers from the complex plane The Mandelbrot Set there are two kinds of points: for, (stable points) for certain and greater (unstable points) Measure the speed of divergence of the i.e., measure when (predefined value) The Mandelbrot Set a) stable points displayed in black b) unstable points The Mandelbrot Set Zooming into the Mandelbrot set for every point c in the plane <-2-2i>, <2+2i> do set z=0+i0 set n=0 while (n<max) and ( z <2) do z=z 2 +c end of while if (n==max) Draw Point(Black) else Draw Point(Color(n)) end of for

The Mandelbrot Set Zooming into the Mandelbrot set The Mandelbrot Set Zooming into the Mandelbrot set The Mandelbrot Set Zooming into the Mandelbrot set The Mandelbrot Set Zooming into the Mandelbrot set

The Mandelbrot Set Dimensions Dimension how long is the coast of Corsica? A stick of 500m will give 700km (not very precise) A stick of 100m will give 1200km (?) http://www.youtube.com/watch?v=0jgaio87u3a What if we use length equal to? The length will be Dimensions How long is the coast of Corsica? applied sticks of length times the total length is stick of the length and we need pieces if we need Dimensions In the case of Corsica we need to use formula to get reasonable results What is this D? (Richardson)

Dimensions How long is the coast of Corsica? Having we get Dimensions For a line segment we need to set it the case of Corsica needs to be non integer with (i.e., getting the stick shorter) we get The D is so called Hausdorff dimension Sometimes called fractal dimension Fractals (usually) do not have dimensions Fractals Fractals fractal is a set that is self similar, it is a set that is copy of itself here is transformation scales down Scale must be average contraction Fractals Vaguely Fractal is a set that is geometrically complex and its structure is given by repetition of a certain shape at different scales. Fractal is a set that has Hausdorff s dimension greater than its dimension topological

Fractals Classification Linear Deterministic Fractals Classification Deterministic (or exact) fractals Non deterministic or random fractals Depends on the type of self similarity (exact, random) Non-linear Fractals Non-deterministic Linear rotation, scale, translation, shear Non linear the others Depends on the used transformations Dimensions Special cases If we use just ONE transformation with fixed and repetitions the fractal dimension is Linear Deterministic Fractals The Cantor s discontinuum (published in 1883) 1) Take a line segment 2) Sale it 1/3x 3) Make two copies at the ends 4) Do it recursively (Georg Cantor - 1845-1918)

Linear Deterministic Fractals What is the dimension of the Cantor s discontinuum? scale new pieces for this we can use formula this object is something between a point and a line Linear Deterministic Fractals The Koch s snowflake 1) Take a line segment 2) Erase the mid third (similar to Cantor) 3) Create equilateral triangle 4) Repeat this recursively Scale,, Properties: does not have derivative infinite length zero area the area inside is non zero and non infinity (Helge von Koch 1870 1924) Linear Deterministic Fractals Linear Deterministic Fractals The Sierpinsky gasket 1) Take a triangle 2) Erase mid triangle 3) Repeat this recursively (Wacław Franciszek Sierpiński 1882-1969) The Menger sponge 1) Take a cube 2) Erase mid cross of cubes 3) Repeat this recursively (Karl Menger 1902-1985) Scale not plane, not line Note the similarity with Pascal triangle Dust of points.

Linear Deterministic Fractals The Peano curve 1) Take a line segment 2) Substitute it by the lines from the image 3) Repeat recursively on each line segment space filling curve (Guiseppe Peano 1858-1932) Non Linear Deterministic Fractals Quaternions if we apply the formula in quaternion space (hypercomplex numbers 4D) Non Linear Deterministic Fractals Linear Non Deterministic Fractals Involve random numbers and linear transformations Motivation: What would you hear if you increase the speed of playing music? Noise? The speed change is scaling Daniel White In other words: How large is this stone? 10cm? 1m? 10m?

Linear Non Deterministic Fractals Linear Non Deterministic Fractals The way to model random features in nature is capturing the self similarity with stochastic processes The key for these models are noise functions Noise is (usually) self similar Brownian Motion Brownian motion (Bm) Particles of pollen in water They move because of random hits of molecules of water Brownian Motion 1D Bm simulation: Random hits have Gaussian random number distribution This is also special case of the random walk Bm app

Brownian Motion How to get Gaussian Random numbers? Brownian Motion determines how steep the curve is the rand() function generates suppose we have of such numbers the Gaussian random number is: N=1 N=2 N=3 N=4 N=5 N=10 Gauss app Brownian Motion White noise is a random function with a constant power density Discrete samples are uncorrelated with and Brownian Motion 1D Bm simulation (contd.): Let s have that moves a point in the direction it has Gaussian random numbers distribution Gaussian white noise is one of them

Brownian Motion the Bm (Brownian function) we accumulate the perturbations W(t) X(t) is The fractal dimension is D=1.5 Bm app Fractional Brownian Motion (fbm) fbm if we scale the Bm in the axis by coefficient we have to scale in the y axis by, where is so called then the fractal dimension of the curve is this curve is called Fractional Brownian Motion or fbm (this is NOT Fractal Brownian Motion) Fractional Brownian Motion (fbm) Fractional Brownian Motion (fbm) fbm fbm has i.e., it is Bm fbm has fbm has higher D means wilder H=0.5 autocorrelation is 0 H<0.5 autocorrelation is positive H>0.5 autocorrelation is negative

Linear Non Deterministic Fractals In order to generate nice fractals, we need fbm The above described function is good The Midpoint Displacement Algorithm the MDP is the key algorithm for fractals 1) Take a line segment 2) Find its midpoint (center) 3) Move it randomly in the direction 4) Apply this step to all lines recursively But it does not provide adaptive results The Midpoint Displacement Algorithm The random numbers distribution has its and. Scale down the by two in every iteration. Divide the Gaussian random numbers by two The Midpoint Displacement Algorithm If we divide in each step by is the Hurst exponent we will get fbm with dimension

The Midpoint Displacement Algorithm Properties easy to implement it is interpolation of two points, so it is also called Fractal interpolation just division by two and random numbers call quite realistic The Midpoint Displacement Algorithm Two dimensional fbm works with 2D arrays it is called fbm surface dimension is, where so the The Midpoint Displacement Algorithm 2D fbm on quadrilaterals (diamond square) The Midpoint Displacement Algorithm 2D fbm on quadrilaterals (diamond square) having four points P 0,P 1,P 2,P 3 1) Evaluate the midpoint 2) Evaluate points on the edges 3) Evaluate points in the middle 4) Ad 2) etc... MDP app

Random Faults Random Faults Another method for generating fbm 1. take an object 2. divide it into two parts 3. increase the elevation of one and decrease the other one (change color, etc.) 4. apply this step many times 5. in each decrease the intensity of changes 2x 6. the limit of this process is fbm Cuda random faults Random Faults Implementation Data: 2D array Algorithm: Do this many times: 1) Generate random line (get two random points) 2) For each point in the 2D array I. Check if it is on the left or right (dot product) II. Increase/decrease the value Random Faults Variations Use any 2D object (circle, square) Randomly alter the area inside/outside

Random Faults on a Sphere Random Faults on a Sphere 1) Take sphere and divide it randomly into two hemispheres 2) Assign to each hemisphere different color 3) Apply the step 1 recursively, but decrease the intensity in each step with Perlin Noise Ken Perlin 1985, 2002 Perlin, K. (1985). An image synthesizer. ACM Siggraph Computer Graphics, 19(3), 287 296. Perlin, K. (2002). Improving noise. ACM Trans. Graph. 21, 3 (July 2002), 681 682. Academy Award for Technical Achievement 1997 Perlin Noise Properties: Statistically invariant to rotation and translation Continuous Perlin Noise is 1D, 2D, 3D, nd, Limited frequency spectrum Repeatable (returns the same value for the parameters) double noise(double t) //1D case double noise(double x, double) //2D case double noise(double x, double, y, double z)//3d case

Perlin Noise Limited frequency spectrum means we can chose the maximum desirable detail Returns value from It is seeded by the input parameter Perlin Noise Algorithm Initialization Divide the space to equally distributed cells with integer coordinates Each cell has a predefined pseudorandom gradient Matt Zucker Matt Zucker Perlin Noise Algorithm Perlin Noise Call: By calling with non integer coordinates,, Find the corresponding cell,,,, Calculate the vector from,, to each vertex The influence of each vertex Matt Zucker is given by its distance Sum the contributions by using sigmoid weighting function 3 2 For large tables hash function is used Matt Zucker

Summing Noise Functions Summing Noise Functions Maintains the overall shape where Add details and higher frequencies is called persistence is called noise frequency Summing Noise Functions Summing Noise Functions octaves=1 octaves=2 octaves=3 octaves=7 Paul Bourke

Turbulence Start with a simple color ramp Turbulence marble Perturb it by Perlin noise defines the influence (amplitude) of each octave 3 6 10 octaves Turbulence wood Subtract the integer part of Perlin noise: Hypertexture Defines properties close to the object surface It is a procedural definition, just perturbs the space Can be displayed by raycasting

Hypertexture libnoise http://libnoise.sourceforge.net/index.html Ken Perlin Diffusion Limited Aggregation DLA Diffusion Limited Aggregation DLA 1) Particles (molecules) are floating in the water 2) When a particle approaches an condensation center it is aggregated 3) The process is repeated for many particles The important part is the way the particles travel i.e., random walk Corals, lightings, frozen ice on a window, etc.

Diffusion Limited Aggregation DLA Diffusion Limited Aggregation DLA Corals app