Matt Pierce
06 March, 2002
Lab 3, Computer Graphics
Professor: Dr. Amruth Kumar

Assignment: Update Lab 2: Increase the number of polygons
in your model, allow the user to switch between flat and
smooth shading, and to switch between perspective and
orthographic projection modes.

Notes on this lab:  To do this lab, I wanted to increase
number of sheer polygons without having to spend hours
manually tweaking values.  At the same time, I wanted to
preserve the independence of Generic Polygons.  Generic
Polygons are specifically designed to operate independently
of each other; they are not stored in any special
associative way, and they have enough data to be rendered
even when completely separated from all other polygons
in the model.

This concept reminded me of a paper I read recently written
by Alex Vlachos of ATI Research, with assistance from Jorg
Peters, Chas Boyd, and Jason L. Mitchell.  The idea was
called "Curved PN Triangles" and it was specifically
designed to do realtime mesh interpolation and tesselation
using no more than the verteces and normals of a polygon.
Eventually ATI implimented this technology in its newest line
of 3D Accelerators, dubbing it "Truform."  It's very handy
as it can tesselate up from low density meshes, saving
valuable AGP bus bandwidth and allowing for flexability
accross multiple platforms, while keeping a simplistic
implimentation and interface.

Information on this concept can be found on Mr. Vlachos'
web page. http://alex.vlachos.com

Unfortunately (and brutally truthfully) I didn't understand
any of the math in Vlachos' research paper.  His allowed for
iterative interpolation through the use of multiple beizer
cubic and quadratic patches.  I'm not quite sure what that
means, but that's what the PDF document said.

Instead, I decided to use rotations and vector math to make
my calculations.  The idea is to find out how far off a
vertex-normal is from the normal of line between two verteces.
Then, we take a point on that line, and rotate it by the
difference.  We do this from both sides of an edge (sampling
about a third of the way in) and then average the two points
we get.  The idea is to figure out where the two normal
perpendicular planes would go, and then to average the two.

When we do this for each edge, we have 3 new interpolated
verteces and normals (the normals are just an average of the
two vertex normals they're between).  This means that we've
generated four fully independent Generic Polygons, which we
could run through the interpolation algorithm again if we
want it smoother.