This program is an implementation of a photon mapping renderer for triangular, planar, and spherical models. The implementation is closely modeled on
Jensen, Realistic Image Synthesis Using Photon Mapping, AK Peters Ltd, ISBN 1568811470
Photon mapping is a rendering technique that uses emitted (as well as refracted and reflected) photons to calculate the illumination of a particular
location; it allows for such effects as caustics and soft shadows, which are simply not available to non-distributed ray tracing and are possible, but very
costly with distributed ray tracing.
A photon is a structure with a position, a splitting plane (used for splitting kd-trees), an incoming direction denoted by angles theta and
phi, and power.
This is a C++ implementation of the photon map. It will execute on CSA with the included Makefile.
The basic photon mapping algorithm consists of two steps:
Rendering, described very simply, is casting a ray from a view point into the scene (very similar to the ray tracing procedure), and, upon hitting a surface, computing
the radiance at that location by processing n nearest photons and interpolating their power with a BRDF.
Photon Casting
For every pixel (i, j) in the projection screen:
fr(x, w, pd ) = Il,diff = kdIl (N . L), where L = -pd
Acknowledgements: C++ code for the ray tracer employed in this assignment provided by Jing Zhong, and may not be used without permission. Modified slightly
for purposes of assignment.
Photon Map C++ code based almost entirely on that provided in the appendix of Realistic Image Synthesis Using Photon Mapping.