Assignment 1: Ray Tracing

CMSC 635, Spring 2002

Assignment

Using any one or more of the techniques discussed in class, make Roman Kuchkuda's ray tracer go faster. You can find a copy of the ray tracer code in gl.umbc.edu:~olano/public/635/raytrace. For testing purposes, use the standard procedural databases, generated by the programs in gl.umbc.edu:~olano/public/635/spd3.13. I have modified the spd programs to be able to output our pds format if you specify '-r 20' (for the curious, I copied the rayshade output code and modified it, since the original version of the rayshade ray tracer was based on Roman Kuchkuda's).

For example:

~olano/public/635/spd1.13/balls -s 4 -r 20 > balls4.pds

will create a pds file for the 4th level of the sphereflake.

~olano/public/635/spd1.13/teapot -s 5 -r 20 > teapot5.pds

will create a pds file for the 5th level of subdivision of the teapot.

~olano/public/635/spd1.13/tetra -s 6 -r 20 > tetra6.pds

will create a pds file for the 6th level of the tetrahedral sponge in our file format.

Ten points of your grade will be determined competitively based on the ranking of your ray tracer's average speedup for balls, tetra and teapot relative to your classmates.

Timings

On shared unix systems, I recommend using 'time nice tracer2 < input.pds' and reporting the sum of user and system times, rather than the wall-clock time reported by the program. Use the same method of timing for your unaccelerated and accelerated ray tracing. For reference, here are some unaccelerated timings taken by the user+system method on linux2.gl:


primitives / time

-s 3

-s 4

-s 5

-s 6

balls

822 / 01m38s

7,383 / 38m11s

66,432 / -

597,873 / -

teapot

570 / 02m24s

1,024 / 04m31s

1,610 / 07m59s

2,328 / 15m54s

tetra

64 / 00m06s

256 / 00m24s

1,024 / 01m37s

4,096 / 12m19s

What to turn in

Turn in all program files for your ray tracer using the gl.umbc submit system by 24:00 Thursday February 13th:

submit cs635 Assn1 <files>

You should also turn in an informal one to two page write-up by 3:30 PM Friday, February 14th. While the write-up may be informal, I may count off for spelling and grammar. Please proofread before you turn it in. The write up shoud describe what you did, how you did it, how well you think it worked, and what further work you might do. Include what hardware you used (it is not necessary to use the gl.umbc systems, though you must submit there) and timings for both accelerated and unaccelerated 'balls -s 4', 'teapot -s 5' and 'tetra -s 6'. Use the same method of timing for your unaccelerated and accelerated ray tracing.