Answers to the most frequently asked queations on project 1


1. I am getting a symmetric images of the posted pictures and I did everything right!



And yours are correct! The pictures posted are oriented in a wrong way (sorry for the confusion). We won't take orientation into account when we grade

2. How fast should my program be to get the maximum score for efficiency?



Here are running times we are looking for the test input (of course, they are machine dependent: the data below was collected on a 850MHz PIII workstation, with the image saved to a local disk). Also, we will be rather generous here, so if your program requires twice as much time, you are going to be fine. If it takes 4-5 times more, you may want to take one more look at what you are doing.
input1: 10 seconds
input2: 20 seconds
input3: 20 seconds
input4: 10 seconds
input5: 100 seconds
input6: 10 seconds
input7: 20 seconds
input8: 11 minutes
input9: 10 seconds

Tips what to do if your program runs significantly longer:
1. In your shadow routine, make sure you report 'in shadow' as soon as you find the first primitive intersected by the ray towards the light with t<1. One is enough, after all. Also, *before* testing the shadow ray for intersections, check whether the intersection point faces the light (otherwise, intersections are not needed and you can quickly report 'in shadow').
2. Compute the reflected intensity only at the closest intersection point. In other words, for each pixel find the closest intersection (smallest t) and then do the lighting calculations at that closest intersection point.
3. A somewhat more minor thing to do is to make sure you don't perform unnecessary calculations on the ray-primitive level. For example, if you are computing the closest intersection, you have your minimum t and, for the next triangle, you get a greater t as the intersection of that triangle's plane and your ray. Then, you don't have to check whether the intersection point is inside or outside the triangle - no matter what happens, there is a closer intersection!

3. How to view ppm files?



Popular viewers are xv, gimp or xnview.

4. What do I do when I am done?



Make a tar file containing your code with a suitable Makefile and send to cs4451a@cc. To help us with grading, please make sure that the files extract to the current directory (.).

5. What do m and n (i.e. the first two numbers in the input file) mean?



m is the horizontal resolution and n - the vertical resolution.