Fundamentals of Computer Graphics

Homework 02

Published: 6/11/17.
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 e 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 The images generated are written to the out/ directory. Your results should match the images in the check/ directory.


You have to complete the following functions each of which is described in the code:

Extra Credit

As extra credit, you can implement the following functions.


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 src/ and out/ directories. You have to name your file <numero_di_matricola>.zip and exlude all other directories.