As a month-long project for Brown’s computer graphics class, I made this raycaster using C++, OpenGL, and Qt. It supports shadow, texture mapping, reflection, refraction, and depth of field.
The raytracer operates on 4 elementary objects defined by implicit equations and solving their intersection with the ray.
To render complex shapes, I implemented space-partitioning data structures including Kd-Tree, BVH tree, and Quad tree. The ray tracer traverses these tree to look for intersections, and prune unnecessary traversals by the bounding volume of each node.
With recursive raytracing and multi-sampling, I also implemented shadows, depth of field, reflection, and refraction.