Applications of Computer Graphics. Business applications Maps Industrial applications Consumer applications Entertainment Education.

Post on 04-Jan-2016

235 Views

Category:

Documents

4 Downloads

Preview:

Click to see full reader

Transcript

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

Generation of surfaces

Surfaces

Bilinear Interpolation

v

u

b00

b10

b11b01

u

v

Bilinear interpolation fits the simplest surface for the four corner points

Shape Representation

Surfaces

Bilinear Interpolation

Two Stage Process

v

v

bb

bb uu

ubbuvubvuX

vbbvb

vbbvb

11

)1(),(),(

)1(

)1(

1110

0100

0110

0100

1100

11100110

01000100

1

0

1

0

11 )()(),(i j

jiij vBuBbvuX

b11b01

b01

b01

Shape Representation

Surfaces

Coon’s Patch

Given Four Boundaries C1(u),C2(u),D1(v),D2(v)

)(),1(

)(),0(

)()1,(

)()0,(

2

1

2

1

vDvX

vDvX

uCuX

uCuX

v

u

C2

C1

D1D2

Shape Representation

Surfaces

Coon’s Patch

C1

C2

rC

Ruled surface between C1(u),C2(u)

D1

D2

rD

Ruled surface between D1(v),D2(v)

Shape Representation

9. Bezier surface

Bezier surface patch

Bezier surface patches

Rendering

Illumination and shading models

10. Shading

• Diffused lighting • Specular Phong model

n=15

10

large n: metalssmall n: paper

Specular Reflection

Background

IlluminationRendering

Polygon Shading

Flat Shading

• Computationally fast• Not smooth• Mach Band effect

ShadingRendering

Flat shading & Gourad shading

Flat polygon shading

Gouraud Shading

Interpolation

Ia Ib

I2

I3

I4Is

Scan line

Polygon Shading

I1 (x1, y1)

(x2, y2)

(x3, y3)

(x4, y4) Scan conversion!

ShadingRendering

Phong Shading

Polygon Shading

Na Nb

N2

N3

N4Ns

Scan line

N1 (x1, y1)

(x2, y2)

(x3, y3)

(x4, y4)

Ns Is

Illumination using Ns

ShadingRendering

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

CSG

AU

Fractals

12. Fractals

Generating a dragon fractal

Fractal dimension

Computer Animation

Computer Animation

Conventional Animation

Process

• Story boardSequence of drawings with descriptions

• Key framesA few important frames as drawings

• InbetweensDraw the rest of the frames

• PaintingRedraw 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 - Drawb) Image by Image: Compute – Store - Drawc) 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

y linear

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)

Source Destination

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.

Source Target

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 particlesystem

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

View Dependent Character Animation

View Dependent Character Animation

Camera Recovery

View Dependent Character Animation

Deformation

View Dependent Character Animation

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

top related