Created by Jeffrey Dong and Roger Chen.
Click on the pictures for a larger image.
./raytracer images/image-01.txt images/image-01.png
./raytracer images/image-02.txt images/image-02.png
This was achieved using the Sphere primitive and a xfs (scaling) transformation.
./raytracer images/image-03.txt images/image-03.png
This was achieved using the Sphere primitive, an xfs (scaling) transformation, and a xfr (rotation) transformation, and a xft (translation) transformation.
./raytracer images/image-04.txt images/image-04.png
The normals are inferred from the cross product AB x AC
./raytracer images/image-05.txt images/image-05.png
Vertex normals are provided in the .obj files. The phong shader interpolates normals at each intersection point. The shading itself is performed with a combination of ambient, diffuse, and specular terms.
./raytracer images/image-06.txt images/image-06.png
./raytracer images/image-07.txt images/image-07.png
Our max reflection recursion depth was set to 4.
./raytracer images/image-08.txt images/image-08.png
We applied a rotation, a scale, an inverse rotation. Then, we applied a translation, a rotation, and an inverse translation.
./raytracer images/image-09.txt images/image-09.png
There are two point lights (left and right). The bottom sphere is closer to the camera, which is why it appears bigger and is shaded slightly differently.
./raytracer images/image-10.txt images/image-10.png
There is one directional light coming from the bottom (pink) and one directional light coming from the upper left (yellow).
./raytracer images/image-11.txt images/image-11.png
There are three point lights:
./raytracer images/image-12.txt images/image-12.png
There are two mirrors, one in front and one behind the camera. There are 8 spheres in front of the camera, which are reflected back and forth by the mirrors, to a maximum reflection depth of 4.