SGRenderer

SGRenderer is a simple perspective projection renderer I developed in a computer graphics class (CSI 3510 with Jerry Shultz at MSCD). It is written in Java. I used these class notes.

A 3D perspective projection of a star and a cube

It can draw colored points, lines, and filled triangles. An SGModel class provides a few simple models such as the star and color cube seen here.

This excerpt from the class notes explains the name:

All the classes in the on-going project will have an SG prefix, which stands for Simple Graphics, but is really just to relieve us of the burden of thinking of names for things that don't match any standard Sun Java classes.

I should note that a functionally similar program was developed in class I developed this one on my own, and except for the SG prefixes, the two programs are quite different.

There are Quake-style controls for moving around the world. Because my implementation of the scan-line algorithm for filling triangles is so slow, there is a wireframe mode that just draws the outlines of triangles.

It is able to render to a PostScript file, which was cool when it just did points and lines, but is not so hot at drawing filled triangles because of a lack of depth buffering. (If you're interested in serious 3D-to-PostScript conversion, see GL2PS.)

Download SGRenderer. The main method is in the class SGInterface. SGRenderer is in the public domain.


Up