6.7. Object Representation.   

There are several ways of representing objects to be used in the ray tracing technique, three of which are described below. These methods are described well in [REQU 80], [WIJK 84], [HILL 82] and [BOYS 82].

6.7.1. Primitive Instancing.   

In this method, similar types of objects are grouped into a family called a generic primitive, and the individual objects are known as primitive instances. For example, all forms of ellipsoid, located anywhere in space, may be described in terms of a sphere, centred at the origin, with a radius of 1. All that is required to be known is the object centre (translation), object radii (scaling), and object orientation (rotation). Other primitives include a cube, plane, cylinder and cone. This method has the distinct advantage of making intersection calculations easy by the solution of simple simultaneous equations. However, the addition of textures and patterns to the surfaces of such objects can be somewhat complicated.

6.7.2. Sweeping.   

In this method, a shape defined in two dimensions is swept through space to create a 3-dimensional object. There are two forms of sweeping : translational and rotational. For instance, a translational sweep of a 2-dimensional filled circle will produce a solid cylinder; whereas a rotational sweep of the same circle about its diameter will produce a solid sphere.

The most obvious advantage of sweeping is that a very wide variety of both solid and hollow objects may be created. Another advantage is that it is relatively simple to map textures and patterns onto the 2-dimensional object before it is swept into 3-dimensional space.

However, the calculation of the intersections and surface normals to such objects can be very complex, and, as time is one of the major problems associated with the ray tracing technique, this can be a very serious disadvantage.

6.7.3. Constructive Solid Geometry.   

Constructive Solid Geometry (CSG) may be added to either of the previous schemes to combine objects together using the three logical operators (intersection, union and difference) to create complex objects. Such objects are represented by a CSG-tree, a binary ordered tree having set operators as its non-terminal nodes, and object primitives or sweeps as the terminal leaves of the tree. To help speed up intersection calculations, each tree usually has a bounding volume associated with it to allow for quick rejection of rays not entering the bounding volume.