Exercise 1
Due on Monday, February 8, 2015 before class
Problem Statement
Now, you have learned polygon rendering and local illumination models.
This simple exercise asks you to demonstrate problems
that may occur in polygon rendering and local illumination models.
More specifically, write one or more programs with a simple and intuitive GUI
that can clearly demonstrate the following:
- The problem of Gouraud shading when light sources do not shed
any light to the vertices of a polygon. Try to use a spotlight.
- The problem of rendering T-junction type polygons.
- The result of rendering regularly fluctuated polygons.
- The impact of various rendering coefficients: ambient, diffuse and
specular reflections, attenuation factor and the involved
coefficients, the impact of triangulation on lighting, and
depth cueing.
- See the slides used in class for more details.
In general, one program with a good GUI control can do all of the above.
However, if you feel necessary, you may use multiple programs.
My Expectation
My expectation is simple: the more impact and effects you can show, the higher
score you will get. Therefore, use your creativity and imagination.
For example, if you wish to demonstrate the impact of ambient, diffuse and
specular coefficients, a scene with three spheres with diffuse 0.3, 0.6 and 0.9
is definitely worse than a scene with multiple spheres such that all coefficients
can be adjusted in some way. The latter is better because, with adjustments,
one can easily see and know the impact. You can take this as a hint and
use it to design your program.
Make sure I can run your program/demo,
because my computer for testing is very clean that
does not have any compiler, library, etc installed.
Moreover, do not ask me to install anything.
Therefore, generating a static executable is the best way.
Grading
The preferred system is Windows. Each of you will receive a CD for you to submit
your work. You should store the following information on the CD:
- A README file, in text
format with no more than 80 characters per line, in the root directory
that contains the following information:
- You name
- The design merit and use of your program(s)
- The functionality and features of your program(s)
- A GUIDE file, in PDF format,
in the root directory that contains a detailed user guide,
including the meaning of each button and menu item, operation,
and the contents of screen. You may consider the use of some screenshots.
You must discuss the results generated from your program(s).
- A bin directory that stores
the executable file(s) and data files.
- A source directory that
contains all source code files and makefiles for me to regenerate your
executable files.
- A images directory
that contains all screenshots used in your
GUIDE file.
Before the submission date/time, you may perform as many demonstrations, before
and/or after the class or in my office hour, as you want with your laptop computers.
It is better for you to bring a laptop computer with you.
Or, you may store your program to a USB port readable flash drive.
Note that faculty machines may not have the same installed software.
(Yes, I had this incompatibility problem before.)
I will make suggestions for you to improve your work.
Extra Works That Will Not Be Collected
Here are some extra works for you to do in order to understand the materials.
However, you should not submit your answers.
- Suppose we are about to render a triangle of nine pixels located at
screen coordinates (x-1,y), (x,y-1), (x,y), (x,y+1), (x+1,y-2), (x+1,y-2),
(x+1,y), (x+1,y+1) and (x+1,y+2). We know (x-1,y), (x+1,y-1) and (x+1,y+2)
have color red (1,0,0), green (0,1,0) and blue (0,0,1), respectively.
What colors the remaining pixels would receive under the Gouraud shading
method?
- If pixels (x-1,y), (x+1,y-2) and (x+1,y+2) also have normal vectors (0,0,1),
(1,0,0) and (0,1,0), what are the results with Phong shading?