Release Time: October 17, 11:59 PM
Submission Deadline: November 7, 11:59 PM
You can download the complete code and test images as a zip file from the following link:
This zip file contains all the source code required to implement the image ray tracing algorithm, along with example images for testing.
Follow these steps to compile the code:
cd /path_to/Assignment2
mkdir build
cd build
cmake ..
make
Once the code is compiled, you will have an executable named Assignment2
in the build directory .
To run the image ray tracing program, use the following command:
cd Bin
./Assignment2 --in "path to test.point.ray" –-out "path to output image file"
Below is a brief description. Don't try to start by understanding all the files. Only try to understand the functions you neede would be enough. We provide you a bunch of files, but some of them are for reference. You should be mainly be working with changing the following files. Feel free to add helper functions as you see needed.
camera.todo.cpp
: Can you fill in the getRay function in this file?directionalLight.todo.cpp
: Can you take what’s filled inside pointLight.todo.cpp as an example, fill in the blanks in this file?spotLight.todo.cpp
: Can you take what’s filled inside pointLight.todo.cpp as an example, fill in the blanks in this file?torus.todo.cpp
: Can you take what’s filled inside sphere.todo.cpp as an example, fill in the blanks in this file?cone.todo.cpp
: Can you take what’s filled inside sphere.todo.cpp as an example, fill in the blanks in this file?triangle.todo.cpp
: Can you finish the intersect function in this file?When you complete the assignment, your submission should be a zip file containing the following:
If you need more information about the image ray tracing algorithm, please refer to the lecture slides.
*You are not allowed to distribute your solution to this homework either online or to other students without permission.