3-D Rendering and Visualization


This package provides tools to visualize and render scenes in three dimensions.

A representation of a camera, which manages transformations from world space into view space, clips lines to a view frustum (defined by a view angle, aspect ratio, and the near and far clipping planes), projects into normalized device coordinates, then finally maps into screen space. This class does not do any rendering.
A light, which is a point source, non-directional light. Light level is based on the angle between the normal vector and the vector to the light source. No specular at this point.
A two-dimensional line segment.
A panel that implements a double-buffered offscreen image.
A render pipeline that can take a Scene, a Camera, and a BufferedImage and generate a rendered view of the scene in the image.
A scene, which behaves much like a SparseArray, but for which four lists are maintained in parallel. A list of "world coordinate" vertices and "world coordinate" faces represents the live scene content, and parallel lists of vertices and faces are maintained.
A triangular face in view coordinates. This class extends Tuple3, where the superclass fields represent the normal vector to the face.
An iterator over the view faces in a scene.
A vertex in view coordinates.
An iterator over the view vertices in a scene.
A triangular face that makes up a scene. This class extends Tuple3, where the superclass fields represent the normal vector to the face.
A vertex in world coordinates that a scene is composed of.

As the author of the source code available by following the links above, I hereby place this source code in the public domain. You can use, modify, and distribute the source code and executable programs based on the source code. However, note the following:
This source code is provided "as is" and without any express or implied warranties whatsoever. The user must assume the entire risk of using the source code.