![]() |
|
||||||||||||
| Home | Research | Publications | Calendar | Contact | Personal |
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
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.
Altered Files Can be Downloaded Here