EE 4702-1 - 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/gpup. Those not familiar with SVN should read these SVN instructions.

Dynamic Simulation Examples

These programs perform simple dynamic simulations of bouncing balls. They are intended to show how dynamic simulation is done, students are not expected to understand the gaphical code at this point in the semester. Code Repository
Screenshot

Bouncing Ball (2011)

Shows a ball boncing on a plane. Dynamic state is just the ball position and velocity.

Screenshot

Springs (2011)

Shows multiple balls connected by ideal springs.

Screenshot

Balls (2011)

Shows management of multiple balls.

OpenGL

These programs show use of OpenGL for graphics. Code Repository
Screenshot

Single Triangle (2011)

A very simple OpenGL program. Just shows a purple traingle.

Screenshot

Sphere (2011)

Code shows tesselation of a sphere.

Screenshot

Lighting (2011)

Demonstrate different material properties (emissive, ambient, diffuse, specular) and lighting options.

Screenshot

Vertex Specification (2011)

Demonstrate use of vertex arrays and buffer objects, which are much faster ways of sending vertex data to OpenGL than using glVertex to send the data one vertex at a time. Also shows benefit of pre-computing coordinates.

Screenshot

Textures (2009)

Demonstration of texture application techniques and texture filtering techniques.

Screenshot

Vertex and Fragment Shaders (2012)

Demonstration of vertex and fragment shader for per-fragment lighting calculations. Also look at and the shader code.

Project Base

Code used as baseline for course projects. Code Repository
Screenshot

Bouncing Ball Simulation (Updated Spring 2010)

This code, for use as a project base and in-class demo, shows multiple techniques. These include: ball physics performed by GPU via CUDA, use of shadow volumes to stencil shadow locations, use of vertex and geometry shader to compute ball reflection locations, use of occlusion queries to limit the number of balls rendered. See also CUDA code, and Shader code.


ECE Home Page
David M. Koppelman - koppel@ece.lsu.edu
Modified 9 Oct 2012 16:45 (2145 UTC)