CS 376 Introduction to Computer Graphics 04 / 30 / 2007 Last Lecture :( Instructor: Michael Eckmann.

Slides:



Advertisements
Similar presentations
CS 376 Introduction to Computer Graphics 02 / 02 / 2007 Instructor: Michael Eckmann.
Advertisements

CS 376 Introduction to Computer Graphics 01 / 29 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 02 / 29 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 04 / 28 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 12 / 09 / 2009 Instructor: Michael Eckmann.
Chapter 9: Recursive Methods and Fractals E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CS 325 Introduction to Computer Graphics 04 / 09 / 2010 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 10 / 2008 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 12 / 2008 Instructor: Michael Eckmann.
Course Website: Computer Graphics 11: 3D Object Representations – Octrees & Fractals.
CS 206 Introduction to Computer Science II 12 / 03 / 2008 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 09 / 2008 Instructor: Michael Eckmann.
CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 01 / 28 / 2009 Instructor: Michael Eckmann.
CS 4731: Computer Graphics Lecture 5: Fractals Emmanuel Agu.
Fractals Complex Adaptive Systems Professor Melanie Moses March
CS 206 Introduction to Computer Science II 10 / 16 / 2009 Instructor: Michael Eckmann.
Holt Geometry 12-Ext Using Patterns to Generate Fractals 12-Ext Using Patterns to Generate Fractals Holt Geometry Lesson Presentation Lesson Presentation.
CS4395: Computer Graphics 1 Fractals Mohan Sridharan Based on slides created by Edward Angel.
CS 206 Introduction to Computer Science II 12 / 08 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 10 / 15 / 2007 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 27 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 25 / 2009 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 10 / 16 / 2006 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 04 / 07 / 2010 Instructor: Michael Eckmann.
Approaches To Infinity. Fractals Self Similarity – They appear the same at every scale, no matter how much enlarged.
"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."(Mandelbrot,
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
11/19/02 (c) 2002, University of Wisconsin, CS 559 Last Time Many, many modeling techniques –Polygon meshes –Parametric instancing –Hierarchical modeling.
CS 376 Introduction to Computer Graphics 04 / 23 / 2007 Instructor: Michael Eckmann.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
4/15/04© University of Wisconsin, CS559 Spring 2004 Last Time More modeling: –Hierarchical modeling –Instancing and Parametric Instancing –Constructive.
Graphics Graphics Korea University cgvr.korea.ac.kr Model Construction 고려대학교 컴퓨터 그래픽스 연구실.
CS 376 Introduction to Computer Graphics 02 / 12 / 2007 Instructor: Michael Eckmann.
Model Construction 김 성 남. Contents What is Modeling? Model Construction - Interactive modeling tools - Scanning tools - Computer vision -
CS 325 Introduction to Computer Graphics 02 / 01 / 2010 Instructor: Michael Eckmann.
Numerical Computation
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
L-Systems and Procedural Plants CSE 3541 Matt Boggus.
CS 325 Introduction to Computer Graphics 04 / 26 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 20 / 2007 Instructor: Michael Eckmann.
Fractals smooth surfaces and regular shapes - Euclidean-geometry methods -object shapes were described with equations natural objects - have irregular.
CS 376b Introduction to Computer Vision 03 / 21 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 23 / 2009 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 23 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 03 / 22 / 2010 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 04 / 22 / 2009 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 04 / 25 / 2007 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 09 / 18 / 2009 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 03 / 2010 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 01 / 30 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 02 / 02 / 2009 Instructor: Michael Eckmann.
CS 325 Computer Graphics 04 / 30 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 21 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 04 / 07 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 14 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
1 What did we learn before?. 2 line and segment generation.
Model Construction cgvr.korea.ac.kr.
Iterative Mathematics
© University of Wisconsin, CS559 Spring 2004
Presentation transcript:

CS 376 Introduction to Computer Graphics 04 / 30 / 2007 Last Lecture :( Instructor: Michael Eckmann

Michael Eckmann - Skidmore College - CS Spring 2007 Today’s Topics Questions? Radiosity discussion by Alex Danilevsky Then you'll fill out evaluation forms for the course Then I'll come back in the room and cover: –Surfaces (bicubic polynomial surfaces) –Speedups for polynomial evaluation –quick comment on Shape Grammars probably no time for Fractal geometry

Michael Eckmann - Skidmore College - CS Spring 2007 Recall that we defined parametric cubic curves as Q(t) = T M G. For surfaces we define a parametric cubic surface with two parameters, hence Q(s,t) for some particular value of s, say s 1, Q(s 1,t) is a parametric curve. Also, for some particular value of t, say t 1, Q(s,t 1 ) is a parametric curve. [ G 1 (t) ] Q(s,t) = S M G(t) = S M [ G 2 (t) ] [ G 3 (t) ] [ G 4 (t) ] where each G i (t) is a parametric cubic. So, each G i (t) = T M G i The overall G(t) geometry matrix contains 16 geometry items (whereas for cubic curves, G contained 4 geometry items.) Curve Surfaces

Michael Eckmann - Skidmore College - CS Spring 2007 Horner's rule for evaluating polynomials –consider the x-coordinate parametric cubic: x(t) = a x t 3 + b x t 2 + c x t + d x evaluated as is, operations used: –6 multiplies and 3 adds if you use Horner's rule, x(t) can be rewritten as: x(t) = [(a x t + b x )t + c x ]t + d x –3 multiplies and 3 adds –for all 3 coordinates, then you have 9 multiplies and 9 adds –we can do better Forward-difference calculations –generate successive values recursively by incrementing the previous value – x k+1 = x k + Δx k –Δx k is the forward difference Speedups for polynomial evaluation

Michael Eckmann - Skidmore College - CS Spring 2007 Forward-difference calculations –generate successive values recursively by incrementing the previous value x k+1 = x k + Δx k –Δx k is the forward difference –for parametric cubics if we divide our range of t into a set number of fixed intervals of size δ then x k = x(t k ) and x k+1 = x(t k+1 ) where t k+1 = t k + δ k=0,1,... x k = a x t k 3 + b x t k 2 + c x t k + d x x k+1 = a x t k b x t k c x t k+1 + d x = a x (t k +δ) 3 + b x (t k +δ) 2 + c x (t k +δ) + d x Δx k = x k+1 - x k = 3a x δt k 2 + (3a x δ 2 + 2b x δ)t k + (a x δ 3 + b x δ 2 + c x δ) Notice that Δx k is a quadratic polynomial in t Speedups for polynomial evaluation

Michael Eckmann - Skidmore College - CS Spring 2007 we can do the same kind of thing but this is the second forward-difference Δx k = Δx k-1 + Δ 2 x k-1 –Δ 2 x k-1 is the second forward difference... Δ 2 x k-1 = 6a x δt k-1 + 6a x δ 3 + 2b x δ 2 Notice that Δ 2 x k-1 is a linear polynomial in t we can do the same kind of thing but this is the third forward-difference Δ 2 x k-1 = Δ 2 x k-2 + Δ 3 x k-2 –Δ 3 x k-2 is the third forward difference... Δ 3 x k-2 = 6a x δ 3 which is a constant in t Speedups for polynomial evaluation

Michael Eckmann - Skidmore College - CS Spring 2007 x(t) = a x t 3 + b x t 2 + c x t + d x Δx k = 3a x δt k 2 + (3a x δ 2 + 2b x δ)t k + (a x δ 3 + b x δ 2 + c x δ) Δ 2 x k-1 = 6a x δt k-1 + 6a x δ 3 + 2b x δ 2 Δ 3 x k-2 = 6a x δ 3 We need initial values for x and the first and second forward differences when k = 0, t = 0 and we get the following x 0 = d x Δx 0 = a x δ 3 + b x δ 2 + c x δ Δ 2 x 0 = 6a x δ 3 + 2b x δ 2 and compute the first few x's and then to compute successive values of x it only takes 3 adds at each step: x k+1 = x k + Δx k Δx k = Δx k-1 + Δ 2 x k-1 Δ 2 x k-1 = Δ 2 x k-2 + Δ 3 x k-2 Speedups for polynomial evaluation

Michael Eckmann - Skidmore College - CS Spring 2007 To see the forward differences algorithm, see the handout with the two algorithms (the first is brute force --- not even using Horner's rule). The brute force uses 11 multiplies and 10 additions. Horner's rule algorithm requires 9 multiplies and 10 additions. The forward differences algorithm only takes 9 additions (and 0 multiplies) to calculate the next point coordinates (after some initialization that takes some multiplies and adds.) Speedups for polynomial evaluation

Michael Eckmann - Skidmore College - CS Spring 2007 See section 8-24 in our text. It's short. I suggest you read it and attend Tim Gildea's presentation of his thesis "LSystem Viewer: Interactive Visualization Software for Parametric DOL-Systems" which is at 8pm, TONIGHT, Monday April 30 th in Harder room 202. Two other students will present their work before Tim. 6:30 p.m. Kellen Affleck 7:15 p.m. Max Levine 8:00 p.m. Tim Gildea Shape Grammars

Michael Eckmann - Skidmore College - CS Spring 2007 Up until now, we have only discussed objects (Euclidean shapes) being described by equations. These methods are good for man-made objects that are smooth and have regular shapes. Natural objects like mountains, clouds, terrain, trees, etc. have surface shapes that aren't well described by equations. Instead these are better described by “procedures”. Fractal methods are a way to make a procedural description of a surface/object. Fractal objects have 2 important characteristics –infinite detail at every point –self-similarity between the parts to the overall features (see next slide) Fractal objects are specified by a procedure that does an operation repeatedly. Fractal Geometry

Michael Eckmann - Skidmore College - CS Spring 2007 Zooming in enough on an equation defined surface (Euclidean shape) will reveal the limit to the level of detail in the shape. Zooming in on a Fractal object will reveal the “limitless” detail in the shape. (I'll try to draw figure 8-67 in text pg 480.) Fractals are defined infinitely, but of course in graphics we will perform a finite number of steps and hence our objects will have finite dimensions. Fractal Geometry

Michael Eckmann - Skidmore College - CS Spring 2007 Self-similarity –entire object contains scaled down versions of itself as its subparts –each subpart is created by multiplying a scale factor by the whole object –each subpart can use the same scale factor or different ones –random variations can be employed -> statistically self-similar used for trees, leaves, etc. Fractal Geometry

Michael Eckmann - Skidmore College - CS Spring 2007 Fractal Dimension D –a description of the amount of variation in the structure of a fractal object. a line is 1 dimensional, a square is 2 dimensional if we subdivide a line into N equal parts, each part is the original scaled down by a factor of N = N 1/1 = N 1/d if we subdivide a square into N equal parts, each part is the original scaled down by a factor of sqrt(N) = N 1/2 = N 1/d if we subdivide the Koch snowflake into 4 equal parts, each part is the original scaled down by a factor of 3, hence 3 = 4 1/d = 4 1/ The dimension of the Koch snowflake fractal = d = log(4)/log(3) which is approx See the slide showing the Koch snowflake Fractal Geometry

Michael Eckmann - Skidmore College - CS Spring 2007 For deterministic, self-similar fractals we have Fractal initiator –start shape Fractal generator –the pattern that subparts of the initiator are replaced by The generation of the fractal is deterministic because we always replace a subpart of the initiator with the generator and we do this at each step exactly the same way every time. Example on the board (figure 8-70). Fractal Geometry

Michael Eckmann - Skidmore College - CS Spring 2007 For statistically, self-similar fractals we could have –a Fractal initiator and –randomly choose a generator from a set of generators to be the pattern to replace a subpart of the initiator at each step This is non-deterministic (won't get the same exact shape every time) due to the random choice of generator. Instead of random generators, –random scalings could be done or –something else that is random to make the fractal non-deterministic. see figure 8-80 for an example. Fractal Geometry