Upload
shana-jordan
View
240
Download
0
Tags:
Embed Size (px)
Citation preview
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
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
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
UNIT I - 2D PRIMITIVES
Line, circle and ellipse drawing algorithms – DDA Algorithm (Digital Differential Analyzer)– Bresenham’s line, circle & ellipse algorithm
5
6
Two Dimensional geometric transformations
Translation Rotation
Scaling Shearing
UNIT II 3D CONCEPTS
Three-Dimensional object representations
Three-Dimensional geometric and modeling
transformations
Three-Dimensional
viewing
Hidden surface elimination
Color models Animation. 7
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.
Splines
9
A spline is a smooth curvedefined mathematically using a set of constraints
Splines have many uses:– 2D illustration– Fonts– 3D Modelling– Animation
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
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
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
ANIMATION
13
3-D model of a jack inside a cube, and the
jack alone below
Keyframe Animation
14
1
2Key frame k
1’
2’
Key frame k+1
33’
added point
Halfway frame
UNIT IV RENDERING
15
Shading Techniques
Gouraud
Flat
Phong
Shading
Morphing
16
• Morphing – derived from the word metamorphosis.
• Metamorphosis means to change shape, appearance or form.
Rendering Texture
17
Comparing the images with specular highlights, shadows, textures
Unit – V Fractals
Fractals
Self similarity between parts and overall features of the object
18
Koch CurveHilbert curvePeano curve
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
Ray Tracing
20
Reflection and Transparency
Ray Tracing Techniques
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
• Ellipse drawing algorithm• Splines• Color models• Shading• Random fractals
22
• 2D viewing• Visible surface identification • Animations• Adding texture to faces • Ray Tracing
23
24