6.837Introduction to Computer GraphicsOverview 2 Plan•Introduction•Overview of the semester•Administrivia•Iterated Function Systems (fractals)Overview 3 Team•Lecturers–FrédoDurand–Barb Cutler•Course secretary–BrytBradleyOverview 4 Why Computer Graphics?•Movies•Games•CAD-CAM•Simulation•Virtual reality•Visualization•Medical imagingOverview 5 What you will learn in 6.837•Fundamentals of computer graphics algorithms•Able to implement most applications just shown•Understand how graphics APIs and the graphics hardware workOverview 6 What you will NOT learn•Software packages–CAD-CAM–Photoshop and other painting tools•Artistic skills•Game design•Graphics API–Although you will be exposed to OpenGLOverview 7 Plan•Introduction•Overview of the semester•Administrivia•Iterated Function Systems (fractals)Overview 8 Overview of the semester•Ray Tracing–Quiz 1•Animation, modeling, IBMR–Choice of final project•Rendering pipeline–Quiz 2•Advanced topicsOverview 9 Ray Casting•For every pixel construct a ray from the eye –For every object in the scene•Find intersection with the ray •Keep if closestOverview 10 Ray Casting•For every pixel construct a ray from the eye –For every object in the scene•Find intersection with the ray •Keep if closestOverview 11 Ray Tracing•Shade (interaction of light and material)•Secondary rays (shadows, reflection, refractionOverview 12 Ray Tracing•Original Ray-traced image by Whitted•Image computed using the Dali ray tracer by HenrikWannJensen•Environment map by Paul Debevec Image removed due to copyright considerations. Image removed due to copyright considerations.Overview 13 Overview of the semester•Ray Tracing–Quiz 1•Animation, modeling, IBMR–Choice of final project•Rendering pipeline–Quiz 2•Advanced topicsAnimation: Keyframing Overview 14 Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Squash & Stretch in Luxo Jr.'s Hop Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44.Overview 15 Particle system (PDE)•Animation–Keyframingand interpolation–SimulationImages removed due to copyright considerations.Overview 16 Rigid body dynamics•Simulate all external forces and torques()tx()tv()1btp()3btp()2btp()2tf()3tf()1tfOverview 17 Modeling•Curved surfaces•Subdivision surfaces Images removed due to copyright considerations.Overview 18 Image-based Rendering•Use images as inputs and representation•E.g. Image-based modeling and photo editingBoh, Chen, Dorsey and Durand 2001Input image New viewpoint RelightingOverview 19 Overview of the semester•Ray Tracing–Quiz 1•Animation, modeling, IBMR–Choice of final project•Rendering pipeline–Quiz 2•Advanced topicsOverview 20 The Rendering PipelineRendering Pipeline•For each triangle–For each projected pixelProject scene to the pixelsRay Casting•For each pixel–For each objectSend pixels to the sceneOverview 21 The Rendering Pipeline•Transformations•Clipping•Rasterization•Visibility NEAR EYE FAR y z x o x z o -n z y x o Courtesy of Leonard McMillan, Computer Science at the University of North Carolina in Chapel Hill. Used with permissionOverview 22 Overview of the semester•Ray Tracing–Quiz 1•Animation, modeling, IBMR–Choice of final project•Rendering pipeline–Quiz 2•Advanced topicsOverview 23 Textures and shadingFor more info on the computer artwork of Jeremy Birnsee http://www.3drender.com/jbirn/productions.html Courtesy of Jeremy Birn. Used with permission.Overview 24 shadows Image removed due to copyright considerations. Image removed due to copyright considerations.Overview 25 Traditional Ray Tracing Image removed due to copyright considerations.Overview 26 Ray Tracing+soft shadows Image removed due to copyright considerations.Overview 27 Ray Tracing+caustics Image removed due to copyright considerations.Overview 28 Global Illumination Image removed due to copyright considerations.Overview 29 Antialiasing Courtesy of Leonard McMillan, Computer Science at the University of North Carolina in Chapel Hill. Used with permission.Overview 30 Questions?Overview 31 Plan•Introduction•Overview of the semester•Administrivia•Iterated Function Systems (fractals)Overview 32 Administrivia•Web: http://graphics.csail.mit.edu/classes/6.837/F03/•Lectures–Slides will be online•Office hours–Posted on the web•Review sessions–C++, linear algebraOverview 33 Prerequisites•Not enforced•18.06 Linear Algebra–Simple linear algebra, vectors, matrices, basis, solving systems of equations, inversion•6.046J Algorithms–Orders of growth, bounds, sorting, trees•C++–All assignments are in C++–Review/introductory session Monday Overview 34 Grading policy•Assignments: 40%–Must be completed individually–No late policy. Stamped by stellar.•2 Quizzes: 20%–1 hour in class•Final project: 40%–Groups of 3, single grade for the group–Initial proposal: 3-5 pages–Steady weekly progress–Final report & presentation–Overall technical meritOverview 35 Assignments•Turn in code AND executable•We will watch code style•Platform–Windows–Linux•Collaboration policy:–You can chat, but code on your own•No late policyOverview 36 Project•Groups of 3•Brainstorming–Middle of the semester•Proposal •Weekly meeting with TAs•Report & presentationOverview 37 Plan•Introduction•Overview of the semester•Administrivia•Iterated Function Systems (fractals)Overview 38 IFS: self-similar fractals•Described by a set of n transformations fi–Capture the self-similarity–Affine transformations–Contractions (reduce distances)•An attractor is a fixed pointImage from http://spanky.triumf.ca/www/fractal-info/ifs-type.htm∪)(AfAi= Image removed due to copyright considerations.Overview 39 Example: Sierpinskytriangle•3 transforms•Translation and scale by 0.5Overview 40 RenderingFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)•Probabilistic application of one transformationOverview 41 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 42 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 43 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 44 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 45 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 46 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 47 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 48 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 49 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 50 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 51 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 52 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 53 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 54 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 55 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 56 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 57 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 58 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 59 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 60 Example: SierpinskytriangleFor a number of random input points (x0, y0)For j=0 to big numberPick transformation i(xk+1, yk+1) = fi(xk, yk)Display (xk, yk)Overview 61 Other IFS•The DragonOverview 62 Application: fractal compression•Exploit the self-similarity in an image•E.g. http://fractales.inria.fr/index.php?page=img_compressionOverview 63 Assignment: IFS •Write a C++ IFS class•Get familiar with –vector and matrix library–Image library•Due Wednesday at 11:59pm•Check on the web pagehttp://graphics.lcs.mit.edu/classes/6.837/F03/Overview 64 Review/introduction session: C++•Monday 7:30-9 Overview 65 Questions?