Assignment6 - Open GL
CS5600 - Introduction to Computer Graphics
Due Wednesday, 26 April 2006, 23:59 hours
Overview
This project introduces you to the capabilities of OpenGL. You will use OpenGL
to draw a lit cube.
Project Requirements
The following are requirements for the project.
- Shaded Cube: There should be a scene with a shaded
(Colored) cube. The user should be able to apply rotation, translation and
scale tranformations on the cube, as well as change its color. You may
explicitly define the vertices of the cube, or you may use
glutSolidCube().
- Lighting: The scene should be shaded by using an OpenGL
light. It doesn't matter what type of light, but it should be obvious that
there is one there.
- Move Viewpoint: The user should be able to move the
eye around the scene.
- User Interface: There should be a nice user interface to
change viewpoint, the color of the cube, and transformations on the cube.
- Documentation: Briefly explain what your program does and
how to operate it. In addition, describe all data structures, major functions,
and the program's flow of control. Also document any known bugs and any areas
of the assignment you had problems with.
- Extra Credit: Besides the above requirements, you are
welcome to use OpenGL to add to your project. Here are a couple ideas, you are
free to add anything you like.
- Make the cube the 'Color Cube'. This will require that you break the
cube into triangles and assign each vertex a color value, instead of just
rendering the cube using glut.
- Implement texture mapping. Put some kind of picture on the
cube.
- Simulate the scene you ray traced, including lighting. You can also
look at the ray tracing assignment for further ideas, or the OpenGL online
documentation.
Turn in all your code and documentation using submit into the
directory called assign6Linux for Linux assignments or
assign6Windows for windows assignments (i.e. submit cs5600
assign6OS file1 file2...). Your code should be written in
C/C++, however you may choose to develop on Windows or Linux. Be sure to hand
in your MSVC project or your Makefile and that there are no problems running
your code.
Resources
You will probably want to start with the Makefile and template file from the second
assignment.
Here a link to
the MSVC 2005 project.
A good reference for using OpenGL is the OpenGL Programming
Guide, especially chapters 2,3 and 5. For this assignment you really
shouldn't have to read too much of it. Just look through for examples.
The Reference
Manual is a good place to look for the description of functions.
Commands that you will find usefull for this assignment include:
- glRotatef
- glScalef
- glTranslatef
- glutSolidCube