Building a Ray Tracer - Page Two

© 1996 Harriet Fell for CSG140 (formerly COM3370) Computer Graphics

For simplicity, all scenes are described in screen coordinates. The view plane coincides with the screen plane and the view window goes from (0, 0, 0) in the upper left to (433, 453, 0) in the lower right. The objects (all spheres in these first pictures) are placed between the screen and the viewer. The direction from the screen toward the viewer is the positive z-axis.


[ Last Page | Reflection | Bumps | 2nd Order Reflection | Specluar Reflection]
[ Polygons | Checker Board | Next Page ]

Picture of five spheres, two seen reflected in a third.

First Order Reflection
The magenta and yellow spheres are seen reflected in the gray sphere. No specular reflection has been added and the gray reflecting shpere appears to have a matte finish rather than a shiny finish.

View Point = (225, 225, 3000)
Light Source = (2500, -2000, 1500)
Spheres:
Center(100, 100, 50) Radius = 50 RGB = (0.5, 0.0, 0.5)
Center(150, 200, 250) Radius = 50 RGB = (0.5, 0.5, 0.0)
Center(350, 220, 500) Radius = 50 RGB = (0.0, 0.5, 0.5)
Center(250, 300, 750) Radius = 50 RGB = (0.25, 0.25, 0.5)
Center(275, 150, 100) Radius = 100 RGB = (0.5, 0.5, 0.5) reflective


Picture of five spheres, two, one with bump map, seen reflected in a third.

Bump Map, Reflected
This is the same scene as above but a bump map has been added to the magenta sphere.

Picture of five spheres, two, one with bump map, seen reflected in a third. The same scene again with two spheres showing bump maps.


[ Last Page | Reflection | Bumps | 2nd Order Reflection | Specluar Reflection]
[ Polygons | Checker Board | Next Page ]

Picture of five spheres, two reflective, showing second order reflection.

Second Order Reflection
The yellow and gray spheres are both reflective. The reflected ray is followed off the gray sphere to the yellow sphere the off again. We now see other spheres mirrored in the reflected image of the yellow sphere on the gray sphere. The ray-tracing code is recursive. It is eay to raise the order of recursion to causes reflections in refelctions in reflections, . . .


Picture of five spheres with showing reflection and specular reflection

Specular Reflection
Specular reflection has been added using Phong's Illumination model with ks = 0.5 and n = 15. The reflective spheres appear shiny. Varying ks and n will give a different feel to the shine.


[ Last Page | Reflection | Bumps | 2nd Order Reflection | Specluar Reflection]
[ Polygons | Checker Board | Next Page ]

Picture of five spheres and a reflective triangle.

Polygon
A copper-colored, reflective triangle has been added to the scene. It's coordinates are:

(200, 0, 0) (433, 300, 0) (433, 0, 300)


Picture of five spheres in black space with ambient and diffuse light

Checker Board
A texture map has been used to make a checker board pattern on the rectangle that has been added to the picture. The coordinates of the rectangle are:

(40, 100, 15) (250, 100, 15) (250, 400, 35) (40, 400, 35)

Picture of two spheres coppered mirror and checkered triangle.

Simpler Scene
Just two spheres,
a checkered triangle,
and a copper mirror.

Picture of one reflective sphere on a long checker board.

One Reflective Sphere on a Checker Board
If you're going to do ray-tracing,
you have to do this once,
so here it is.

Picture of three spheres and three planes

Three Spheres and Three Planes

Stripes and checks on two of the planes and the bumps on one sphere are reflected in the other two spheres.


[ Last Page | Reflection | Bumps | 2nd Order Reflection | Specluar Reflection]
[ Polygons | Checker Board | Next Page ]

Harriet J. Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #202WVH,
Boston, MA 02115
Internet: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121

Last Updated: December 20, 2005, 10:51 a.m.
The URL for this document is: http://www.ccs.neu.edu/home/fell/COM3370/RayTrace2.html