EE 7700-2 - Code Examples

Code used in class. The links below may point to out-of-date copies, use anonymous svn to retrieve the latest copies. Code is also available via anonymous svn from https://svn.ece.lsu.edu/svn/gp. Those not familiar with SVN should read these SVN instructions.

CPU-Only Code Examples

Code in which 3D graphics computed entirely on the CPU. The intent here is to understand 3D algorithms and their computational characteristics. Code Repository
Screenshot

Single Triangle

Demonstrates the most basic 3D techniques: how to project a triangle specified in object space onto a frame buffer. Draws one lonely (presumably) triangle.

Screenshot

Many Triangles

Demonstrates how to apply 3D techniques to a list of possibly unrelated primitives (triangles). The routine draws a grid of identical triangles pierced by a unique one.

Screenshot

Color & Z Buffering

Demonstrates color interpolation and Z buffering. The routine draws a grid of triangles pierced by a triangle. The angle of the grid can be interactively adjusted.

Screenshot

Lighting

Demonstrates simple lighting techniques. The routine draws a gold tube pierced by a triangle. There is a bright light in the tube that can dimmed, brightened, and moved around.

OpenGL Examples

Code using OpenGL for rendering. Code Repository
Screenshot

Textures

Texturing Examples. The code shows an undulating tube pierced by a purple quadrilateral. After turning on texturing the course syllabus will appear on the quadrilateral and tube. Filtering and texture mode can be changed using the UI.

Screenshot

Fragment Shader / Phong Shading

Simple fragment shader example. A fragment shader is used to implement Phong shading. Also see the shader code.


ECE Home Page Course Home Page
David M. Koppelman - koppel@ece.lsu.edu
Modified 18 Apr 2008 10:22 (1522 UTC)