Fall 2011 CS5310 Computer Graphics
IntroductionIn this assignment, you will generate a realistic image of a 3-dimensional scene composed of spheres floating between you and the view plane. You will use ray-tracing and a local illumination model to generate your image.
- Your program should be able to handle up to 5 spheres. It is not any harder to add more spheres but it will take more time to run. Each sphere is given by its center (x, y, z), its radius, and its color (R, G, B).
- The positions of the viewer and the single point source of light are each given by coordinates (x, y, z).
- The information for your scene should be read in from an input file.
- Use the methods presented in class to determine the RGB color of each pixel in your image. Store the result in a ppm format file.
Develop your program in five stages.
- Generate a flat image using only ambient light. This way you will know that your program is finding the spheres before you go on to work on shading and shadows.
- Add shading to your image using Lambert's Law for diffuse lighting.
- Add shadows cast on the spheres by following a ray from a visible point on a sphere to the light source.
- Add Phong highlights on the spheres.
- Make the viewplane visible (i,e, not black) and add shadows cast on the view plane by following a ray from each visible back-plane pixel to the light source.
See Building a Ray Tracer - Page One for sample images. Note that the small images on that page are links to larger images.
What to submit
A zipped folder containing
- your source code. Your code should be well organized and commented.
- a makefile, if necessary
- data files for up to three scenes
- a README file containing:
- your name, the date, and the assignment number
- a list of the files in the folder with comment for each explaining its purpose
- instructions on how to run your program
- a description of any bug that you have not been able to fix. A documented bug will not cost you as much as an undocumented one.
- Please do NOT email ppm files or executable code. I will generate them from your source code.
How to submit
Follow the turn in instructions.
By midnight Tuesday, October 4, 2011.
GradingThese grading guidelines will be used for all programming assignments:
Your project will be graded on:
- correctness (60%).
- style of your program (10% )
- inline comments (10%)
- README (10%)
- quality of the resulting image(s). (10%)
Some points may be subtracted (up to 10%) if you need substantial help from the professor to make your program run.
The penalty for a late homework is 5% per calendar day for up to one week late.
No homework will be accepted later than that.
College of Computer Science, Northeastern University
360 Huntington Avenue #202WVH
Boston, MA 02115
Phone: (617) 373-2198 / Fax: (617) 373-5121
The URL for this document is: http://www.ccs.neu.edu/home/fell/CS5310/Assignments/CS5310F2011prog1.html