In the past assignment you wrote code for a ray casting system capable of rendering the scenes described in the driver files. In this assignment you will be adding to your existing ray tracing software a capability to perform reflection i.e., recursive ray tracing. This will include the ability to control the depth of recursion though your driver files. Moreover, your code should also be able to "smooth" the cow.
The driver file used here is identical in format to that used in the
previous assignment with two exceptions. There is a new field
specifying the recursion depth, e.g.,
recursionLevel 3
.
As in the SageMath notebooks, a recursion level of zero means there
will be no recursive ray tracing performed and your code will revert
to ray-casting as in the previous assignment. The second change is
one additional argument just before the name of an obj file. The two
options are
sharp
and
smooth
. Examples of both are included in the driver files for this
assignment.
In this assignment your code will be responsible for correctly rendering four scenes, three of which are described in the driver files given to you in the drivers_models.zip file provided below and the other will be of your choice while adhering to the guidelines described below.
An important part of the assignment is for you to demonstrate a hands-on understanding of how to create a scene. In turn, a big part of what makes your new scenes interesting will be in the interaction of objects through reflections and shadows. To accomplish this assignment there are two principle tasks:
In this assignment your code will be responsible for correctly rendering four scenes, three of which are described in the driver files given to you in the .zip below and the other one will of your choice while adhering to the guidelines described below.
Your program will take two command line arguments. The first argument is a driver file. The second argument is name of the image your program will write back to disk in the same folder where your executable is located. A C++ example is:
$./raytracer driver00.txt driver00.ppm
Submit a tar file via the CANVAS assignment page that includes:
If you are using C++, your executable should be named 'raytracer'. If your are using java, the main executable class should be named 'Raytracer'. Notice the change in case for the first letter between C++ and Java. It is must for this assignment to take exactly two arguments as described above.
There is no “late period”. It is essential to start earlier and finish earlier. The program is due when it is due. All work you submit must be your own. You may not copy code from colleagues or the web or anywhere else. Cheating will not be tolerated, and will be handled in accordance with university and department policy.
-Updated driver02.txt in drivers_models.zip
-scene_ppms.zip is available now
-Updated driver00.ppm and driver00.txt in scene_ppms.zip and drivers_models.zip, download the latest versions
Here are the unkown test cases test_cases.zip