You will be performing multiple projections from a given viewpoint, so this Challenge includes an initialization routine as well as a calculation routine, both of which are included for timing purposes in determining the winner. InitProjection may perform any calculations that may be useful for multiple CalcProjection calls that follow. CalcProjection should calculate the way thePolys would look from viewPoint, projected onto a projection plane normal to the viewPoint vector and passing through the origin. Hidden surface elimination must be performed so that obscured polygons or parts of polygons are not seen. Polygons must be rendered in the appropriate polyColor, subject to the limitations of the GWorld.
Polygons are the same color on both sides.
Parts of the projection plane not filled by projections of polygons should be black. In addition to projecting the polygon image as seen from viewPoint, you must also project the shadow of thePolys created by an illumination source at illumPoint, onto the projection plane and onto the image of other polygons, as seen from viewPoint. All polygons have a flat matte surface, creating no specular reflections of the illumination source. The illumPoint will be on the same side of the projection plane as the viewPoint. The offScreen GWorld will have a pixelDepth of 32.