CS 551: Introduction to Computer Graphics

Assignment #4

Goal: Implement Phong lighting for directional and point light sources.

Assigned: Thursday, April 6, 2000

Due: Tuesday, April 18, 2000

Relevant reading/files/software:

Synopsis: Your program will load a polygonal object and use OpenGL to render it. You will disable OpenGL lighting and write code to perform your own lighting calculations, applying the Phong lighting model that we discussed in class to the objec t vertices. You must support at least 2 directional and 2 point light sources. You will need to design a form in fdesign that contains:

As usual, the single best assignment (measured by ease of use and "extra" features) will earn an 11 (one point extra credit).

Turning in the assignment: Before class starts on Tuesday, April 18, you should:

Specifics: We are providing the usual Makefile, a C file named gfx.c, which contains code to draw into an Xforms glCanvas, and a header file gfx.h, which contains prototypes for the functions in gfx.c. As usual, you will modify the functions in gfx.c, adding code to draw the scene and handle callbacks. You will also create a form in fdesign. Saving that form (as a .fd file) will also create .c and .h files that contain the Xf orms library code for creating the form, which you must include in your program via the Makefile. Some special things to notice about the code: