Submission deadline: 19/11/17.
In this homework we will modify the raytracer by adding the following features
You have to implement the functions provided in the
raytrace.cpp file. Do not change the signature of the functions used to generate the solution available; you can use any other function you want to implement them though. To build the application we will use the Yocto/GL library, and in particular the following files:
The code can be compiled with cmake which, for OsX, is shown in the scripts
xcode.sh. CMake will generate project files for different build systems including Makefiles, Xcode and Visual Studio.
This repository contains also various tests that are executed from the command line as in
run.sh. The images generated are written to the
out/ directory. Your results should match the images in the
You have to complete the following functions each of which is described in the code:
As extra credit, you can implement the following functions.
ym::sample_traingles_points()code. Implement a method for sample generation from one of the following papers. Wrap this method in a single function so that we can re-use in our codebase. You can reuse the code from the implementation you find online, but it would work natively with yocto_math. Not sure which one is better but the first method seems cooler and more general and there is open source code for it.
To submit the homework, you will use a form indicated on the Google Group where we report first and last name, email, student id (numero di matricola) and you will upload a ZIP file containing the results. In the ZIP file you are to include only your code in and the images generated by your code. This means that your ZIP file will only include the
out/ directories. You have to name your file
<numero_di_matricola>.zip and exlude all other directories.