$24
In this assignment you will write a raytracer to generate nice images. Lumina is a basic raytracer provided to you. Compile it and run to see the output. Currently it doesn’t do much except rendering a sphere in flat color. Go through the code and understand how it works. Following questions ask you extend the raytracer to perform basic shading.
Extend the Shape class to implement a Triangle that can be rendered in the raytracer. [4 marks]
Implement Phong shading for the shapes. [4 marks]
Implement shadows in the raytracer. [4 marks]
Implement reflective and dielectric materials (i.e., make your ray-tracer recursive). [8 marks]
Deliverables
C/C++ code (make sure to upload full Cmake Project).
2~3 page PDF Report written with Latex/MS Word. Use the acmlarge option (single column) (see sample-acmlarge.tex if writing with Latex).
Total marks for this assignment: 20 marks
Bonus (bonus marks to a maximum of 8 will be awarded for the following features. This part is completely optional)
Implement at least one more shape primitive in the raytracer (e.g., Cylinder, torus, or a quadric). [3 marks]
The generated image looks very jaggy. Implement jittered supersampling to improve the quality of your rendering. [2 marks]
Implement Schlick’s approximation to Fresnel’s reflection and Beer’s law in your code. [3 marks]
Note: Your code should be written by you and be easy to read. You are NOT permitted to use any code that is not written by you. (Any code provided by the TA can be used with proper credits within your program)
Page 1 of 1