During my Junior Fall, I took Brown’s “Computer Graphics” course (CS1230), which rapidly introduced us to core concepts in 2D and 3D graphics, including 3D modeling/viewing/rendering, image processing, and implementing shader programming on GPU’s using openGL. In addition to the final project (see Procedural Trees), our culminating assignment required us to implement a CPU raytracer in C++.
To begin, the first stage was to implement a scene parser, which traverses through an .xml scenegraph and assigns a cumulative transformation matrix to every scene object in the hierarchy. This converts text data into 3D components placed properly in the scene
Our next stage was to render the scene its non-recursive components using implicit ray intersections, namely the ambient and diffuse components of the phong lighting model. This gave us a rudimentary rendering of our scene, giving us greater freedom to adjust the camera and other parameters.
Finally, our full-fledged raytracer includes features such as recursive reflections, shadows, and texture mapping. I even chose to implement super-sampling, allowing for even clearer photo-real renders.
** I cannot publicly share the repo of the code for academic code purposes - Contact me for access! **