24
CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Embed Size (px)

Citation preview

Page 1: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

CS2401 COMPUTER GRAPHICS

Handle By, S.JENILA AP/IT

Page 2: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

AIMTo learn the concepts of computer graphics, object transformations, 3D concepts & graphics programming.

OBJECTIVE • To introduce the basic concepts of primitives and two-

dimensional concepts.• To study the three-dimensional concepts, object

representations.• To learn color models & graphics programming using

OPENGL.• To understand rendering & shading of objects.• To learn fractals, ray tracing & surface texture of objects.

2

Page 3: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

SYLLABUS

UNIT I 2D PRIMITIVES 9

Output primitives – Line, Circle and Ellipse drawing algorithms - Attributes of output primitives – Two dimensional Geometric transformation - Two dimensional viewing – Line, Polygon, Curve and Text clipping algorithms

UNIT II 3D CONCEPTS 9

Parallel and Perspective projections - Three dimensional object representation – Polygons, Curved lines, Splines, Quadric Surfaces,- Visualization of data sets - 3D transformations – Viewing -Visible surface identification.

UNIT III GRAPHICS PROGRAMMING 9

Color Models – RGB, YIQ, CMY, HSV – Animations – General Computer Animation, Raster, Keyframe - Graphics programming using OPENGL – Basic graphics primitives – Drawing three dimensional objects - Drawing three dimensional scenes

3

Page 4: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

UNIT IV RENDERING 9 Introduction to Shading models – Flat and Smooth shading –

Adding texture to faces – Adding shadows of objects – Building a camera in a program – Creating shaded objects – Rendering texture – Drawing Shadows.

UNIT V FRACTALS 9 Fractals and Self similarity – Peano curves – Creating image by

iterated functions – Mandelbrot sets – Julia Sets – Random Fractals – Overview of Ray Tracing – Intersecting rays with other primitives – Adding Surface texture – Reflections and Transparency – Boolean operations on Objects

TOTAL :45 PERIODS

SYLLABUS

4

Page 5: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

UNIT I - 2D PRIMITIVES

Line, circle and ellipse drawing algorithms – DDA Algorithm (Digital Differential Analyzer)– Bresenham’s line, circle & ellipse algorithm

5

Page 6: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

6

Two Dimensional geometric transformations

Translation Rotation

Scaling Shearing

Page 7: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

UNIT II 3D CONCEPTS

Three-Dimensional object representations

Three-Dimensional geometric and modeling

transformations

Three-Dimensional

viewing

Hidden surface elimination

Color models Animation. 7

Page 8: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

parallel & perspective projection

8

A perspective projection can be set up by specifying the position and size of the view plane and the position of the projection reference point.

For parallel projections, we specify a direction of projection (DOP) instead of a COP.

Page 9: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Splines

9

A spline is a smooth curvedefined mathematically using a set of constraints

Splines have many uses:– 2D illustration– Fonts– 3D Modelling– Animation

Page 10: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Three-Dimensional Display Methods

Depth Cueing • To easily identify the front

and back of display objects. • The intensity of objects according

to the distance of viewing position

Surface rendering • Set the surface intensity of objects

according to – Lighting conditions in the scene – Assigned surface characteristics

10

Page 11: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Visible Surface Detection (identification)

Depth-Buffer (Z-Buffer)– Each z-buffer location - Max z value– Each frame buffer location - background color

Scan Line Method• Intersect each polygon with a particular

scanline and solve hidden surface problem

for just that scan line

Octrees

• Visible-surface identification is accomplished

by searching octree nodes in a front-to-back

order

11

Page 12: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

UNIT III - GRAPHICS PROGRAMMING

Color Models• All colors are generated from the three primaries• various colors are obtained by changing the amount of each

primary

RGB model CMY model

12

Page 13: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

ANIMATION

13

3-D model of a jack inside a cube, and the

jack alone below

Page 14: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Keyframe Animation

14

1

2Key frame k

1’

2’

Key frame k+1

33’

added point

Halfway frame

Page 15: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

UNIT IV RENDERING

15

Shading Techniques

Gouraud

Flat

Phong

Shading

Page 16: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Morphing

16

• Morphing – derived from the word metamorphosis.

• Metamorphosis means to change shape, appearance or form.

Page 17: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Rendering Texture

17

Comparing the images with specular highlights, shadows, textures

Page 18: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Unit – V Fractals

Fractals

Self similarity between parts and overall features of the object

18

Koch CurveHilbert curvePeano curve

Page 19: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

19

Mandelbrot & JULIA set

Mandelbrot Set Julia Set

The Julia set can be computed by iteration similar to the Mandelbrot computation. The only difference is that the c value is fixed and the initial z value varies.

The Mandelbrot set is the set of all complex c such that iterating

Page 20: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

Ray Tracing

20

Reflection and Transparency

Ray Tracing Techniques

Page 21: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

TEXT BOOKS• Donald Hearn, Pauline Baker, Computer Graphics – C Version,

second edition, Pearson Education,2004.• F.S. Hill, Computer Graphics using OPENGL, Second edition,

Pearson Education,200UNIT III

 

REFERENCES• James D. Foley, Andries Van Dam, Steven K. Feiner, John F.

Hughes, Computer Graphics- Principles and practice, Second Edition in C, Pearson Education, 2007.

21

Page 22: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

• Ellipse drawing algorithm• Splines• Color models• Shading• Random fractals

22

Page 23: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

• 2D viewing• Visible surface identification • Animations• Adding texture to faces • Ray Tracing

23

Page 24: CS2401 COMPUTER GRAPHICS Handle By, S.JENILA AP/IT

24