Friday, February 13, 2009

Assignment #3

Assignment #3 - basic ray tracer. Features:
  • Diffuse lighting
  • Ambient lighting
  • Specular highlights
  • Shadows
  • Reflections
  • Simple anitialiasing
  • High dynamic range color
  • Geometric objects: spheres, planes, triangles
  • Perspective is maintained regardless of requested window size - pixels remain "square"
How to build and run:
Platform: Mac OS X 10.5.6, XCode 3.0 / gcc 4.0.1

tar jxf jbowles-assign3.tar.bz2
cd jbowles-assign3
make
./raytracer --width=512 --height=512 --reflections \
--shadows --samples=3

Usage: ./raytracer [options]

options:
--width Window width
--height Window height
--reflections turn on reflections
--maxdepth maximum number of reflections
(default 3)
--shadows turn on shadows
--samples square root of the number of
samples per pixel.
--perf turn on performance measurement
rendering

To exit, pressing Apple-Q, escape, or just q.

Output generated on a MacBook Pro 17" 2.4GHz dual core. Size of each image is 512x512.

./raytracer --width=512 --height=512
1.114634 seconds to render
Number of rays: 262144



./raytracer --width=512 --height=512 --shadows
1.161857 seconds to render
Number of rays: 446464



./raytracer --width=512 --height=512 --shadows --reflections
1.270463 seconds to render
Number of rays: 693328



./raytracer --width=512 --height=512 --shadows \
--reflections --samples=5
32.375095 seconds to render
Number of rays: 17334027

No comments:

Post a Comment