CS352/CmpE253
Computer Graphics - Spring 2004-05

Class Meeting Times:
Monday, Wednesday 8:30-10:10 in SC-3

Intructor: Dr Sohaib A. Khan
sohaib at lums dot edu dot pk
http://www.lums.edu.pk/~sohaib


TAs:

Ammar Baray
ammar at lums dot edu dot pk

Rizwan Ahmed Chaudhry
rizwanch at lums dot edu dot pk
 

Instructor Office hrs: (Rm 405 Library Bldg)
14 45 - 16 15
Tuesday & Thursday


TA Office hrs:
11 00 - 13 00
Monday & Wednesday (LAB 3)

11 00 - 13 00
Tuesday & Thursday   (LAB 3)


Textbook:
[Shirley] Fundamentals of Computer Graphics, Peter Shirley, A. K. Peters, 2002
[OpenGL Primer] Edward Angel, OpenGL: A Primer, Longman

Recommended References:

[Baker] Donald Hearn, M Pauline Baker, Computer Graphics C Version, 2nd Ed, Prentice Hall 1997, 3rd Ed, Prentice Hall, 2004
[FvDFH] Computer Graphics, Principles and Practice, Foley, vanDam, Feiner, Hughes (several different editions)

[OpenGL] OpenGL Programming Guide, OpenGL Architecture Review Board, 3rd Edition, Addison Wesley, 2001 [html][PDF (local copy)]

Prerequisite:
Expertise in C++, some Linear Algebra
Math221, CS213

Course Outline [PDF]


Please Note: The links for Lecture notes and Class Handouts (including assignments) are local links and these pages will not be accessible from outside LUMS.


Date Lecture Reading Announcements
March 7, 2005 Lecture 1: Introduction, course outline, object rendering, goal of computer graphics, image based rendering, application areas

[Shirley] Ch 1

The following websites were mentioned in class
What is CG? (Cornell)
Internet Ray-Tracing Competition ,
Final Fantasy [review][CG-World article ]
http://www.debevec.org/, campanile movie page
Non-photorealistic rendering
Maths in Computer Games
Synthetic Lighting

 
March 9, 2005

Lecture 2: Examples of outputs of graphics systems, discussion of program 1

Review of Maths: Vectors, addition, scalar multiplication, dot product, cross product, interpretation, linear independence, orthonormal basis

[Shirley] Chapter 2

You may look at this website (Maths in Computer Games) for examples of where this maths may be used. It is a good idea to brush up these concepts from your previous courses.

Program 1 assigned [DETAILS HERE]. Due 16 March at 8:15 am

Irfanview is available here

March 14, 2005 Lecture 3: Polar coordinates, cylindrical coordinates, spherical coordinates, parameteric equation of a line, linear interpolation, equation of plane, circle, ellipse, spiral, cylinder, sphere, Barycentric Coordinates(intro)
 
[Shirley] Chapter 2  
March 16, 2005 Lecture 4: Barycentric Coordinates, Determining whether a point lies inside a triangle, Determining the Barycentric coordinates of a point [Shirley] Chapter 2  
March 21, 2005 Lecture 5: Computing Barycentric coordinates of a point, 3D triangles and Barycentric coordinates, Raster Algorithms, Rasterizing a line (intro) [Shirley] Chapter 2

[Shirley] Chapter 3 (Raster Algos)

Click here to run the Barycentric Coordiantes Applet

Program 2 assigned
[DETAILS HERE]
Due 28 March at    8:00 pm
Additional Files:
color_triangle
triangle_flat
March 23, 2005 No class today! Pakistan Day Holiday!    
March 28, 2005 Lecture 6: Rasterizing a line: simple algorithm and problems, Line drawing algorithms, Digital Differential Analyzer (DDA) Algorithm, Incremental Algorithms, Mid-point algorithm for a line,
 
[Shirley] Chapter 3

Line Drawing Applets

 
March 30, 2005 Lecture 7: 8-way symmetry of a circle, Mid-point algorithm for a circle/ellipse, Concave and Convex polygons, Scan-line polygon fill algorithm, floodfill and boundary fill algorithms, anti-aliasing
 
[Shirley] Chapter 3

Circle Drawing Applets
Area Filling Applets

 

Program 3 assigned
[DETAILS HERE]
Due 11 April at
8:00 pm
April 4, 2005 Lecture 8: 2D Transformations, translation, scaling, rotation, shear, reflection, derivation of rotation matrix, orthonormality of rotation matrix, concatenation of transformations, importance of order, affine transformation, rotation about an arbitrary point, inverse transformations
 
[Shirley] Chapter 4

Applet to show that order of transformations is important [link]
 
April 6, 2005 Lecture 9: Decomposition of transformations, Singular Value Decomposition, Eigenvectors of a transformation matrix, 3D Transformations, 3D Rotation about principal axes, 3D rotation about arbitrary axis.
 
[Shirley] Chapter 4, 5

3D transformations applet

 
April 11, 2005 Lecture 10: 3D Rotation about an arbitrary axis: Method of computing individual matrices; Short cut method, using the orthonormality property. [Shirley] Chapter 4, 5  
April 13, 2005 Lecture 11: Camera Parameters, Orthographic Projection, Perspective Projection [Shirley] Chapter 6

Clarification handout, regarding eigenvalues of symmetric matrices. (You can also refer to this link)

 
April 18, 2005 MID TERM   Last Year's Mid

Practice Problems

April 20, 2005 Lecture 13: Viewing pipeline, Modeling Transformation, Viewing Transformation, Perspective and Orthographic Transformations, Normalization Transformation, Device Transformation [Shirley] Chapter 6 Homework 4 assigned.
[download here]
Due Tuesday April 28, 8:00 p.m.

Apr 25, 2005

Apr 27, 2005

Lecture 14 & 15: Explained the viewing pipeline again. Getting started with OpenGL (see lecture slides)

Lecture slides and example programs

"The Red Book" OpenGL Programming Guide, [html][PDF (local copy)]

OpenGL Reference Manual (very useful for looking up command syntax and description

GLUT Reference Manuals: There are two versions posted in the reference folder. You can see which one you like better.

What is OpenGL? Where to get it? http://www.opengl.org/users/about/index.html

OpenGL overview, tutorials: http://www.opengl.org/developers/ and http://nehe.gamedev.net/

GLUT Tutorials: http://www.lighthouse3d.com/opengl/glut/

 

Project assigned
Project Handout

 

May 2, 2005 Lecture 16: Clipping
Need for clipping in the graphics pipeline, 2D vs 3D clipping, Point Clipping, Line Clipping (Cohen-Sutherland, Midpoint subdivision), Polygon Clipping (Sutherland-Hodgeman)
Ch 13 of [Baker] (we have skipped Liang-Barsky Algo)
Slides are available on \\badar

 

 

May 4, 2005 Lecture 17: Weiler-Atherton Clipping, Lighting, Point Light Source, Ambient, Diffuse (Lambertian) and Specular Shading Models, Phong Shading, Half-way Vector Method, OpenGL lighting model, Attenuation, Spot Lights, Emission

Nice Applet on lighting (shown in class)

[Shirley] Ch 8

Solar system lighting example and mouse example shown in class have been posted in the OpenGL folder on \\badar

Project Design Document Due Friday

 

May 9, 2005 Lecture 18: Hidden Surface Removal techniques. Image Space and Object Space methods. Back-face Detection, Depth-Sorting (Painter's Algo), Binary Space Partitioning (BSP-Trees), Depth(Z)-Buffer Method

Shirley] Ch 7,
[Baker] Ch 13

BSP Tree Applet: http://symbolcraft.com/graphics/bsp/index.html