Adam Campbell's Website
Ray tracing - primitives


The simplest of all the primitives, the plane. Here, we have two parallel planes located above and below the camera, with a pointlight located at the camera origin. Download the scene and camera files here SCENE and CAMERA
Here, three spheres of varying radii are drawn to the screen, with the pointlight located at the origin of the camera. Download the scene and camera files here SCENE and CAMERA
Axis aligned boxes are drawn using 6 planes. In order to get more interesting, rotated boxes an instance must be used. Download the scene and camera files here SCENE and CAMERA
Triangles are obviously essential to any ray tracer. Once triangles are implemented, scenes begin to become interesting because models can now be rendered. Download the scene and camera files here SCENE and CAMERA
Polygons are not necessary for ray tracers, as they can be created with triangles, but less geometry needs to be specified when polygons are implemented. Download the scene and camera files here SCENE and CAMERA
Once you have your plane primitive working, creating a disc primitive is simple. A disc needs a normal, center and radius. The intersection is just like that of a plane, with the extra constraint of making sure the point of intersection is within the radius of the disc. Discs can be used to close off the openings in cones. Download the scene and camera files here SCENE and CAMERA
Cones were the most difficult primitive to get working, but once they are implemented, things like lamp shades, soda cans, etc. are simple to model. Download the scene and camera files here SCENE and CAMERA
NURBS allow extremely complex geometry without specifying tons of points. This picture only required 15 control points. I broke this NURBS into 180000 triangles and then rendered them in a BVH. This surface is a simple white lambertian with 6 colored lights spread around the scene. Download the scene and camera files here SCENE and CAMERA