A Simple Ray-Tracer

Many thanks to my partner Ningyu Zhu for finishing the BVH acceleration structure (which saves the day when rendering the Stanford Dragon) and successfully debugging the showing for Cornell Box!

1.
?generates a ray originated from the camera position, through the center of the
?pixel into the world
?searches over all all geometries in the scene and returns the closest hit
?shades the light color seen by the in-coming ray
Ambient + Lambertian-diffuse + Blinn–Phong formula
Add the contribution of light only when the ray connecting the hit and the light source does not have any intersection with the scene (Numerical inaccuracy may cause intersection to be below surface, causing surface to incorrectly shadow itself. To avoid self-shadowing, the secondary ray is shot off slightly above the hitting point.)
Do recursive ray tracing
1.1 RayThruPixel
1.2 Ray-Scene Intersection

2. Classes
? ? ?

3. Results
The rendering results and timings are shown in the following images.
3.1 Scene 4 Table with Spheres
3.1.1 Ambient


3.1.2 Diffuse


3.1.3 Emission


3.1.4 Specular


3.2 Scene 5 Thousand Spheres


3.3 Scene 6 Cornell Box


3.4 Scene 7 Stanford Dragon



Specific explanation and implementation details may be covered in future blogs :D
(since currently I'm still struggling with the finals o(╥﹏╥)o
