CMPT 361
ASSIGNMENT 3
DUE DATE: MONDAY, December 4th, 2000 - MIDNIGHT
Part A
A.1 MANUALLY (i.e. don’t program), compute the RGB intensity for each pixel on the surface of a cube. The following parameters are given:
Vertices of the cube surfaces are: (which gives a total of 9 pixels per face)
The following material and scene properties:
Compute the intensities for each pixel using the brute force method of evaluating each pixel individually. Use a spreadsheet to organize all of the pieces. Make sure you DOCUMENT your work so we understand how your computed the intensities.
A.2 Add a second light source <red> and recompute the intensities. The second light source has the following properties:
A.3 Recompute the intensities from part A.1 using Gouraud Shading to interpolate the shading across the polygons
Part B
B.1 Using OpenGL, Glut and Glui, write a simple application which can take in the properties of a scene (position of two light sources, intensity of light sources, and material properties, type of shading) and render objects using the appropriate illumination model.
Controls (sliders, spinners, text boxes etc.) can be used to provided the following inputs:
The OpenGL example program "lightlab.c" found at: http://www.sgi.com/software/opengl/examples/glut/examples/ can provide a good starting point for this part of the assignment.
The OpenGL Programming Guide will also be a valuable reference for this part of the assignment.
You can use any OpenGL, glut or glui function calls to implement this application.
Add some interesting objects to your scene J
Use this application to visually check your answers to part A.