Input File for Ray Tracing

The ray tracing program will require an input data file that contains the model for the scene to be rendered. This will consist of certain global parameters, such as the world window and output physical device size, camera position (and possibly orientation), light sources and their properties, and a list of objects. their associated modeling transformations, and their surface properties.

A possible model of a file structure would be the following sample (Note this file does not have modeling transformations):

Format


Physical Device Size
200 200 : output size in pixels
Window
-10.0 10.0 -10.0 10.0 : -X X -Y Y
Camera
0.0 0.0 -10.0
Ambient Light Intensity
0.2 0.2 0.2
Light Sources
0.0 30.0 0.0 1.0 1.0 1.0 : X, Y, Z position, Ip, R, G, B
Sphere
15.0 15.0 20.0 8.0 : Xc, Yc, Zc, R
1.0 0.0 0.0 : Kd R, G, B
1.0 1.0 1.0 : Ks R, G, B
50 : Phong N
Plane
0.0 0.0 -1.0 40.0
0.0 1.0 1.0
0.2 0.2 0.2
1


Go back to Previous Screen
HyperGraph Table of Contents.
HyperGraph Home page.

Last changed April 01, 1998, G. Scott Owen, owen@siggraph.org