Specification

Renderer

to come later

Parser

to come later

Radiosity Solver & Geometry Library


Winged Edge Data Structure

A polygonal mesh data structure is necessary to represent connected polygons.

The winged edge data structure allows easy iteration over faces, edges, and vertices. In practice, half-edge is usually used because of its simpler implementation.

Note: Vertex and edge ordering is always counter-clockwise.

Mesh

Face

Edge

Vertex


Renderer

The renderer is responsible for actually displaying the radiosity solution and is based on OpenGL using the Mesa library.

The renderer can operate in two modes: flat shaded mode or Gouraud shaded mode. Gouraud shading interpolates vertex colours, and thus requires these colours to be pre-calculated.

The scene is manouvered through via a camera object. The camera is manipulated through its own interface.

Renderer


Geometry Library

The geometry library contains all objects necessary for high-level 2-D and 3-D operations.

3-D

Point3D

Vector3D

Matrix & Vector operations

Ray3D

2-D


Tri-quad tree

A tri-quad tree is used to recursively subdivide each face of the polygonal mesh into elements. Anchoring is done (and removed) automatically.

Each tri-quad tree is rooted in a face.

Note: Vertex and edge ordering is always counter-clockwise.

Vertex

Element

TQTree


Radiosity Solver

The radiosity solver does all the actual calculations through a single exposed method.

The input is the scene containing all polygonal surfaces. The output is the same scene, possibly subdivided, with radiosity values calculated for each face.

Radiosity


Camera

The renderer needs a camera object to view the resulting scene. Cameras have a standard interface borrowed from the motion picture industry. See the CS488 course notes (online).

Note that the camera should ALWAYS stay level with respect to the z axis, unless you want your audience nauseous.

Also note that you shouldn't change the field of view to zoom. Dolly in and out instead.

Camera


Scene

The scene is an object that encapsulates all model geometry.

Definitions:

Mesh
a solid object described by a collection of maximally connected faces
Face
a single facet of a polygonal solid (mesh)
faces are restricted to be quadrilaterals
Element
produced by subdivision of faces
each face is an element, but each element is not a face
elements are restricted to be quadrilaterals or triangles
Vertex
a corner of a face
Light
a face that emits radiosity
lights are not subdivided and thus consist of a single face
Receiver element
an element that is not part of a light

Scene


Iterators

An iterator is an object which allows you to enumerate a set. For example, the following is an iterator over integers from 1 to N:

for(int i = 1; i <= N; i++) {
     //
     // do stuff
     //
}

It makes sense to iterate over things other than numbers. It also makes sense to have a standard interface to iteration. The following is commonly used (see GNU C++ library, Microsoft Foundation Classes):

for(Iterator it = object.first(); it != NULL; object.next(it)) {
     doSomethingWith(object.get(it));
}

Iterator functions an object supporting iteration must implement are:

Optional iterator functionality is:

Using iterators neatly encapsulates iteration behaviour and avoids the need to access pointers directly. The Iterator type is usually a void pointer, but the user doesn't need to know that.

[Home]


Last updated March 8, 1998.
Maintained by Ming-Yee Iu
.