 |
|
Ray Tracing Projects |
|
Assignment 2:
Triangles, Lighting, Shadows and Viewing...Oh My! |
Return to Ray Tracing
Assignment Overview
|
|
It's surprising how after the basic renderer
framework is built up how easy it is to add interesting features
with littel effort. I remember in my OpenGL class it took me
weeks to implement shadows (and I never did get them to work
properly). Here, I've added support for triangles, lighting of Lambertian (total diffuse) surfaces, shadows, and viewing to the
basic ray tracer of assignment 1. Viewing is accomplished
through program command line arguments: eye point, look-at point,
up vector, and field of view. |
|

Added Triangles, Lighting, and Shadows to Image from Asgt 1
400x400 JPEG converted from 500x500 PPM output |
|
The following input file was used to generate
all images on this page: light -1.0 0.25 0.0 1 1
1
triangle -2.25 0.50 -6.00 0.00 -1.00 -4.00 0.00 2.00 -4.50 0.48
0.30 0.16
triangle 0.00 -2.00 -5.00 1.50 -1.00 -3.00 1.00 0.00 -10.00 0.78
0.63 0.35
sphere -0.5 -0.9 -2.0 0.8 0.53 0.68 0.48
sphere 6.0 10.0 -50.0 20.0 0.99 0.85 0.031
sphere -1.0 0.0 -5.0 1.0 0.06 0.21 0.23
sphere 0.0 0.0 -6.0 1.0 0.41 0.14 0.00
sphere 1.0 0.0 -7.0 1.0 0.15 0.30 0.37
sphere 2.0 0.0 -8.0 1.0 0.70 0.69 0.55
|
|

Translated to the Right
400x400 JPEG converted from 500x500 PPM output
Eye: (2, 0, 2); At: (0, 0, -5), FOV: 45
|
|

View from Above
400x400 JPEG converted from 500x500 PPM output
Eye: (2, 3, 2); At: (0, 0, -10), FOV: 45
|
|

View from Below
400x400 JPEG converted from 500x500 PPM output
Eye: (-5, -15, 10); At: (0, 0, -5), FOV: 45
|
|

Wide Angle Lens
400x400 JPEG converted from 500x500 PPM output
Eye: (0, 0, 0.5); At: (0, 0, -5), FOV: 90
|
 |
 |
 |
|
email
at jasonwaltman
dot com |
 |
|
(c) 2000-2007 jason waltman |
|
|
|