Building a Ray Tracer - Page Three
© 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
| Two Lights
| Refraction
| No Refraction
| More Transparency
| Quadrics: Columns
]
Two Light Sources
In this simple scene with two light sources, notice the darker shadows where light arrives directly from the light sources.
View Point (205, 205, 3000)
Light Source (400, 100, 1000)
Light Source(0, 300, 1000)
Spheres:
Center( 75, 135, 300) Radius = 75 RGB = (0.0, 0.5, 0.5) with bump map
Center(220, 280, 350) Radius = 100 RGB = (0.3, 04, 0.5)
Center(320, 165, 100) Radius = 75 RGB = (0.5, 0.2, 0.5)
[ Last Page
| Two Lights
| Refraction
| No Refraction
| More Transparency
| Quadrics: Columns
]
Refraction
One Glass Ball
A checkered plane is seen through a single glass ball. This image was projected onto one quarter of our usual viewing area: 0 to 220 by 0 to 220.
index of refraction = 1.5
refraction coeficient = 0.6 reflection coeficient = 0.1
View Point (110,110,1000)
Light Source(400,100,500)
Center(110, 110, 100) Radius = 75
Checkered Rectangle
(-1000, -1000, 0) (1433, -1000, 0) (1433, 1433, 0) (-1000, 1433, 0)
Five Glass Balls
The five glass balls are at varying distances from the checkered rectangle. Notice that more distant objects are inverted while closer ones are merely distorted.
index of refraction = 1.5
Spheres:
Center(110, 110, 100) Radius = 75
Center(295, 110, 125) Radius = 75
Center(110, 295, 125) Radius = 75
Center(295, 295, 125) Radius = 75
Center(205, 205, 300) Radius = 75
[ Last Page
| Two Lights
| Refraction
| No Refraction
| More Transparency
| Quadrics: Columns
]
Transparency without Refraction
The transparent sphere in this image has no refraction (index of refraction = 1).
It looks like a bubble rather than a solid ball.
The bubble is slightly reflective and it is the reflections that define its presence.
View Point (225, 225, 3000)
Light Source (433, -100, 500)
Spheres:
Center( 75, 135, 300) Radius = 100 RGB = (0.0, 0.5, 0.5) with bump map
Center(220, 280, 300) Radius = 100 RGB = (0.0, 0.0, 0.0) bubble
Center(320, 175, 100) Radius = 100 RGB = (0.5, 0.1, 0.8) reflective
with bump mapped plane, checkered plane, and mirror plane
More Images with Transparency
Same Scene with Refraction
This is almost the same scene as the "bubble" picture above but the transparent sphere now has index of refraction = 1.5.
Closer to Viewer
The transparent ball has been moved closer to the viewer but the scene is otherwise the same as above.
Milky Glass
The transparent ball now has a milky color.
The scene is otherwise as in "Two Lights" above.
[ Last Page
| Two Lights
| Refraction
| No Refraction
| More Transparency
| Quadrics: Columns
]
Quadrics
Spheres and Columns
This picture of spheres and columns was inspired by the (larger and nicer) cover picture on the August 1994 issue of ACM SIGGRAPH "Computer Graphics."
Crossed Columns
Two columns intersect at right angles.
Finding the volume of this intersection is a standard calculus problem.
[ Last Page
| Two Lights
| Refraction
| No Refraction
| More Transparency
| Quadrics: Columns
]
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, 1):52 a.m.
The URL for this document is:
http://www.ccs.neu.edu/home/fell/COM3370/RayTrace3.html