Raytracer

Unless otherwise noted, the scenes were rendered in a few seconds or less.

Sphere reflection

Shows reflection with a max depth of 5.


Input file: sphere-reflect.test

Sphere reflection with self-shadowing

This is not how an actual raytracer should behave. However, by changing the threshold at which self-shadowing is allowed, we were able to create a nice effect.


Input file: sphere-reflect-self-shadowing.test

Sphere with scaling, translating, and rotation

The raytracer allows arbitrary scaling, rotating, and translating.


Input file: sphere-scale-translate-rotate.test

Square with angle shading and no aliasing

Demonstration of shading.


Input file: square-angle-shading-no-alias.test

Square with angle shading

Demonstration of anti-aliasing. Note the subtle differences on the edges of the square. This becomes more apparent once the image is zoomed in. Anti-aliased images took about 10 seconds.


Input file: square-angle-shading.test

Square with orthogonal projection

Demonstration of an orthographic projection.


Input file: square-angle-ortho.test

Teapot with Phong interpolation

Demonstration of Phong interpolation. Takes about 5 minutes to run. Disclaimer: The .obj file for this scene was found on the Internet.


Input file: teapot-phong.test

Input file: teapot.obj

Teapot with flat shading

Demonstration of Flat shading. Takes about 5 minutes to run. Disclaimer: The .obj file for this scene was found on the Internet.


Input file: teapot-flat.test

Input file: teapot.obj

Cube shown at an angle

A basic cube shown at an angle. Note that, for each triangle drawn, the raytracer allows material properties to be specified.


Input file: cube.test