Applications of Computer Graphics
Business applications Maps Industrial applications Consumer applications Entertainment Education
Weather maps: Temperature, heat flow, rainfall
architecture
CAD
Mechanical engineering
Electric circuit design
simulators
Chemical plants
Consumer products
Medical applications
Molecular Biology
movies
Video games
Computer art
Hierarchical modeling
2. Transformations
3. Clipping
4. Creating Curved surfaces
3D Graphics 5. 3D Transformations
6. Parallel projections
7. Perspective views
Hidden Surface elimination
8. Hidden Surface elimination
Z – buffer algorithm
Painter’s algorithm Depth sorting
Steps in painter’s algorithm
Generation of surfaces
Surfaces Bilinear Interpolation v u b 00 b 10 b 11 b 01 u v Bilinear interpolation fits the simplest surface for the four corner points Shape Representation
Surfaces Bilinear Interpolation Two Stage Process b 11 b 01 Shape Representation
Surfaces Coon’s Patch Given Four Boundaries C 1 (u),C 2 (u),D 1 (v),D 2 (v) v u C2C2 C1C1 D1D1 D2D2 Shape Representation
Surfaces Coon’s Patch C1C1 C2C2 rCrC Ruled surface between C 1 (u),C 2 (u) D1D1 D2D2 rDrD Ruled surface between D 1 (v),D 2 (v) Shape Representation
9. Bezier surface
Bezier surface patch
Bezier surface patches
Bspline surface patch
Rendering Illumination and shading models
10. Shading
Diffused lightingSpecular Phong model
Diffuse lighting model
Phong specular model
Powers of cos Ə
n= large n: metals small n: paper Specular Reflection Background Illumination Rendering
Transparent & translucent objects
Transparent objects
Polygon Shading Flat Shading Computationally fast Not smooth Mach Band effect Shading Rendering
Flat shading & Gourad shading
Flat polygon shading
Gouraud Shading Interpolation IaIa IbIb I2I2 I3I3 I4I4 IsIs Scan line Polygon Shading I1I1 (x 1, y 1 ) (x 2, y 2 ) (x 3, y 3 ) (x 4, y 4 ) Scan conversion! Shading Rendering
Phong Shading Polygon Shading NaNa NbNb N2N2 N3N3 N4N4 NsNs Scan line N1N1 (x 1, y 1 ) (x 2, y 2 ) (x 3, y 3 ) (x 4, y 4 ) N s I s Illumination using N s Shading Rendering
Generation of solids
11. Generation of solids
Surfaces Sweep Surfaces Translation sweep of a circle generates a cylinder Translation sweep of a circle accompanied by scaling generates cone Shape Representation
Sweep solids
9b. Constructive solid geometry
CSG
AUAU
Fractals
12. Fractals
Generating a dragon fractal
Fractal dimension
Computer Animation
Conventional Animation Process Story board Sequence of drawings with descriptions Key frames A few important frames as drawings Inbetweens Draw the rest of the frames Painting Redraw onto acetate Cels, color them
Computer Animation Conventional Animation Stretch and Squash Exaggeration with believability
Computer Animation Real Time vs. Image by Image a) Real Time: Compute - Draw b) Image by Image: Compute – Store - Draw c) Display rate: 30 fps or 25 fps Animation characteristics Spatial (position, orientation, form ) Temporal (velocity, acceleration ) Visual (color, texture )
Computer Animation Key Framing Selected (key) frames are specified Interpolation of intermediate frames Simple and popular approach May give incorrect (inconsistent) results
Computer Animation Key Framing Interpolation Spline
Computer Animation Characteristic parameters for motion are specified and interpolated. Less data is required e.g for motion of an arm, the parameter could be rotation angle. Parametric
Computer Animation Laws of motion: physical or procedural animation t ylinear actual Algorithmic Simulation
Computer Animation Example
Computer Animation Transformation of object shapes from one form to another Each form may be considered as a key frame Establish common topology for the two key frames Interpolate the intermediate frames t added point Intermediate form Morphing
Computer Animation Transformation of one image (source) to another image (target) Normalization of both images Feature correspondence Warping of the two images (spatial deformation) Color blending Image Morphing
Computer Animation Without feature correspondence (cross dissolving) SourceDestination Image Morphing
Computer Animation Image Morphing Correspondence
Computer Animation Image Morphing Correspondence
Computer Animation Triangle Method Feature points are marked on source and target. These feature are given the correspondence. Triangulate the points. Interpolate triangulation for intermediate frames. Warp the images, and blend colors. SourceTarget Image Morphing
Computer Animation Particle Systems An object is represented as cloud of particles Particles are not static; particle system evolves Non deterministic Particles are simple (computationally efficient) but can model complex amorphous objects and behaviors Dust, Water fall, Rain, Fire, Cloud, Stars, Grass, Fur, etc
Computer Animation Particle Systems Generate new particles with initial attributes Particles have lifespan: Kill-off dead particles Modify particle attributes: color, position Render particles In a typical particle system
Computer Animation Particle Systems Particle Termination For each new frame, particle’s life time is decremented by one When life time = zero, the particle is removed
Computer Animation Particle Systems Particle Animation Particle dynamics From force find acceleration velocity position Other attributes (color, opacity, etc.) may also change with time
Computer Animation Particle Systems Examples
Computer Animation Particle Systems More Examples Smoke and Fire
Computer Animation Particle Systems A grass clump is a particle system A particle is a blade of grass Draw parabolic streak over entire life time
Obvious approach for any camera moving shot The camera-character relationship is very fundamental to animation View dependent animation – animation that automatically changes in response to changes in view point View Dependent Character Animation
Camera Recovery View Dependent Character Animation
Deformation View Dependent Character Animation
Cloth Modeling
Suggested Readings Computer graphics by Hearn and Baker, Pearson Publications Computer graphics by Foley, Van Dam, and others, Pearson Publications Computer graphics by Hanmandlu, BPB publications Procedural elements of Computer Graphics by Rogers, McGraw Hill