457 students,
turn in your assignment here
357 students,
turn in your assignment here
As usual, a Makefile/project file, documented source and a README file must be included.
Note: 20% of your grade will be depend on the design, readability and documentation of your program.
In gllEnable(GL_LIGHTING), you should call glDisable(GL_LIGHTING), so only your colors are used. Implement at least eight lights: GL_LIGHT0 to GL_LIGHT7.
In addition implement gllSetMatrix() to load the matrices at the top of your two stacks into corresponding gl Matrix stacks.
glluLookAtOblique does not assume that the camera-Z is from the center of view to eye.
Camera Z is directly specified by (Nx, Ny, Nz): You have to find the projection matrix
that still generates normalized X, Y and Z coordinates after projection as follows
Center need not be on the view plane, of course. The intersection of center with the view-plane
won't have a 0 coordinate any more.
{ f }
| ------- 0 0 0 |
| aspect |
| |
| 0 f 0 0 |
| |
| zFar+zNear 2*zFar*zNear |
| 0 0 ---------- ------------ |
| zNear-zFar zNear-zFar |
| |
{ 0 0 -1 0 }
where f = cot(yFOV/2).
Also if you do not yet know how to make libraries from your object
files: here is the unix incantation -- ar -ru libgll.a file1.o file2.o ...
(ar is in /usr/ccs/bin/, if your path does not include it). Once you have the library you can compile your main program using -lgll option. Make sure that the library's dir is in your load path: Use -L<path>.
-- The URL of this page is: http://www.cs.jhu.edu/~subodh/457/asn2.html --