My Photo
Brian Clipp Ph.D.
Senior Scientist
Applied Research Associates Inc.


Telephone: (919) 816-6692
Email: an image
Home Research Publications Calendar Contact Personal

COMP 236- Computer Graphics

Homework 1- Robot Arm

Code

Executable

To run the above code you will need to download glut and add the directory where you place the dll to your system path environment variable.

http://www.xmission.com/~nate/glut.html


Homework 2- Clipping
Homework 3- Triangle Scan Conversion and Z-buffer Hidden Surface Removal
Homework 4- Ray Tracing Glossy Reflections and Depth of Field

I made a few minor changes to the ray tracer in order to generate depth of field and glossy reflections and refractions.

Depth of Field-
    Changed the camera function render frame to call a new function getRayWithOriginDepthOfField.  This function changes the cast ray so that its start is randomly perturbed around the intersection of the direct ray and the image plane.  The direction is set to go from the perturbed image plane intersection to the direct ray, focal plane interseciton point.  The focal length and apeture are controllable by keyboard commands which can be found in the handler.h keyboard function.l

Glossy Reflections and Refractions-
    Added random perturbations of the reflected rays in Scene.RayTreeIntersect. 

In both cases, I used reapeated sampling of a uniformly distributed random variable with mean zero to approximate a Gaussian.  This was done in accordance with the central limit theory.  Note that the changes I made only take effect when doing distributed ray tracing.  I chose to do this to keep the speed of the single ray per pixel tracer high.

Results- Clearly Showing Depth of Field.  32x32 Sampling Per pixel.



Results- Showing Glossy Mirrored ball.  64x64 Sampling per Pixel


Altered Files Can be Downloaded Here


Project- Catchwater Game Development with Ken Brooks