HW2: Raytrace Multiple Ellipsoids

2010, Dr. Lawlor, CS 481/681, CS, UAF

For this assignment, build a simple OpenGL program that raytraces several ellipsoids.  Your program must:
Just hardcoding the object count, properties, and light sources into your program is fine for now.

Raytracing an Ellipsoid

As a quadric surface, the general equation for an ellipsoid is:
    a*x2 + b*y2 + c* z2 + k = 0

Another representation of an ellipsoid is as a sphere with a different scale factor applied on each axis.  However, keep in mind that the normal vector needs the transpose of the inverse of the point scale matrix.

You don't need to trim an ellipsoid; it's a closed surface already.

My raytraced ellipsoids look like this.  I did the (much harder!) 681 version with shadows.  I added some stripes along the X axis so I could see the shadowing better.
intersecting GPU-raytraced ellipsoids