CS4451A: Assignment 5

Ray Tracing

Due: December 4th.



Turn in

Due date

Additional Instructions

Your task will be to implement the function "public Color ShootRay(int x, int y)" in the file RayTraceWindow.java. The window has the world coordinate version of the scene graph that can be used inside ShootRay. A suggested way to implement the ray tracer is to implement the function "public abstract Hit intersectRay (Vertex origin, Vertex dir, SpaceObject root)" on each of the scene objects, and put whatever information you need in the returned "Hit" object that this function returns (for example, the color, object hit, and t-value of the intersection along the ray might all be useful).

The window size is passed to the RayTraceWindow when it is created. You should keep it small while debugging (ray tracing is slow), but increase it when you are generating images you are happy with.

Finally, the provided program is adapted from one of the sample solutions to assignment 2. Feel free to change it as you want, although you should not need to.