***************************************************************************
README file for:
        CS348B Assignment #2 - HeightFiels Intersection
        Author: Gaurav Garg
        Email: ggaurav@stanford.edu
***************************************************************************

The code compiles and runs normally as provided in the default
implementation. In heightfield.h there are 2 #define's "HW2" and
"PHONG_INTERPOLATE". To use the default implementation comment out
"#define HW2". Similarly, if you dont wish to use Phong Interpolation
comment out "#define PHONG_INTERPOLATE".

We basically exploit the regular 2D grid like structure of the heightfield
to make rendering faster using a 2D grid. Ray is first transformed to
ObjectSpace (of heightfield) from WorldSpace. We then do trivial rejects
for rays which dont intersect the overall grid bounding box. Plus ray
parameter, t is calculated for the point at which the ray enters the grid.

After that we set up parameters for stepping through the grid pixels. Most
of this code is same as the code for that provided in GridAccelerator
section of the lrt book. Each pixel in grid contains two primitives (two
triangles). The ray is checked for intersection against those. If there
is an intersection, we break out of the loop and fill in the differential
geometry structure, otherwise we step to the next pixel in the grid.

The Phong interpolation scheme is similar to that descibed under the ocean
scenes section in course webpage.
