| CS6620 | Advanced Graphics 2 | University of Utah |
| Prof: Peter Shirley | Ray Tracing | Sem: Spring 2002 |
|
|
| Assignment 01 - Basic Ray Tracer 1 |
| I've built a basic ray tracer that creates rays at the origin whose direction fans out around the -Z axis for each pixel in the image. Each ray is then tested for intersection against every surface in the scene (currently, only spheres are supported). If a ray hits a surface, the color of the surface is used as the color of the pixel. |
scene file: one.txt |
|
scene file: rgb.txt |
|
scene file: colorcube.txt |
All of the images above can be regenerated by specifying the appropriate
scene file on the command line of the rayn program
rayn-01.zip (175 KB). The source code is included
in the zip file. Here is a description of the command line parameters for
rayn.
rayn [@response] [options]
options:
-output <output_file> output image filename (string).
-size <width,height> size of output image (int,int).
-background <red,green,blue> background color (int,int,int).
-scene <scene_file> file containing scene description (string).
@reponse:
Specifies a file from which options are to be read,
one option per line. Options which are specified on
the command line override those in the response file.
|
| Questions/comments to nate@pobox.com. |
|
|
|
January 2002 © Nate Robins |