$24
Introduction
In this assignment you will write a simple ray tracer. The core requirement is to write a ray tracer that minimally ray traces a sphere from a xed point of view. To improve your grade you can add rendering features such as mirror re ections, shadows, anti-aliasing, etc. A list of possible improvements is provided below. Other enhancements are possible and will be considered, but it is best to consult the TA/instructor rst!!
Figure 1: A Cornell Box: An example of a high-quality ray-traced image. Image credit: Dr. Henrik Wann Jensen, UCSD. 1999.
Basic Functionality (70%)
The program compiles and renders.
one sphere
the oor of your scene (i.e. ray-plane intersection) with a given surface material (i.e. Phong shading model) illuminated by a single light source and from a xed point of view
Cast the object's shadows in the scene
In the demo session, demonstrate how to change rendering parameters (e.g. light position, color, ma-terial parameters). note: no user-interface is required, during the demo simply modify the sources and re-compile/run.
Advanced Functionality
Modeling Create a Cornell Box scene (i.e. ray-quad intersection) (no need to have an area light) (5%)
Add ability to trace a triangle mesh (i.e. ray-triangle intersection and *.obj le format) (15%)
Rendering
Add the ability to set an arbitrary point of view (10%) Develop a re ective material for the sphere (5%)
Develop a refractive material for the sphere (5%)
Ability to add a texture to your geometry (5%: 2% checkerboard +3% from image) Implement alternative lights types (e.g. area light) (10%)
Cast more rays to anti-alias the image (5%)
Help
Standard requirements (and some advanced) are covered in the \Ray Tracing in One Weekend" book:
https://www.amazon.ca/Ray-Tracing-Weekend-Minibooks-Book-ebook/dp/B01B5AODD8.
Advanced requirements are covered in the \Ray Tracing: The Next Week" book: https://www.amazon.ca/Ray-Tracing-Next-Week-Minibooks-ebook/dp/B01CO7PQ8C
Please also provide a report explaining the features implemented in your program in your own words with your submission. You will not be credited for features which you cannot explain. Please explain the \what" \why" and \how". There are speci c questions for you to answer in your report below. Please also provide screenshots that demonstrate the features you implemented. Explain the contents of each screenshot in your report.
Report Questions
In the written report submitted with your assignment, please answer the following questions. Relate your answers to the experimental results of your program. Explain the design of a ray tracer from the perspective of object-oriented programming, as well as the various data structures and algorithms you used.
Explain how a ray tracer implements the transport of light. Talk about how your rays bounce o objects. Explain how di usion of light is modeled by a Lambertian (di use) material. Explain how re ection and refraction of light are modeled by metal and dielectric materials.
2