subdivision_control
 
 
 

Syntax:

subdivision_control = ( ( <scalar> ,<triple> ), (<scalar> , <triple> ),

.

.

.

( <scalar> , <triple> ) ) ;

Option

None.

Range:

None.

Default:

See format in example:

(20, 3, 3, 3)

(40, 4, 4, 4)

(100, 6, 6, 5)

(500, 6, 6, 8)

(1000, 10, 10, 10)

(2000, 20, 20, 20)

(5000, 10, 10, 10)

Purpose:

This controls how spatial subdivision will function for the RayTracer.

Comments:

This is probably the most complicated control for the user to understand, but it allows the sophisticated user to experiment with different types of spatial subdi-vision for RayTracing his model.

The RayTracer subdivides world space into voxels. Each voxel is a parallelpiped ori-ented parallel to the modeling space axes. All of space is initially contained in one large voxel. When triangles are created to approximate the geometry of the scene, they are stored in the voxel. After all the geometry is defined, the number of triangles in the voxel is used to determine if the voxel should be subdivided or not. If the voxel should be subdivided, how should the subdivision be per-formed? These issues of when and how for subdivision are specified by the sub-division_control parameter.

The control is in the form of a list of entries. Each entry contains two parts — a <scalar> and a <triple>.

The <scalar> part controls when to subdivide, the <triple> part controls how. The list may have any number of entries. The first entry in the list defines a range from zero to the value of the <scalar>. If the number of triangles in the voxel is in this range, then the voxel is not subdivided. The second entry in the list also defines a range, this time from the end of the previ-ous range to the value of this entry’s <scalar>. If the number of triangles in the voxel is in this second range, then the voxel is subdivided by using the <triple> of the previous (first) entry.

The subdi-vision is performed by simply dividing the voxel into equal sized pieces, where the number of pieces in each of the x,y & z dimensions is given by the <triple>. Thus, the <scalar> defines the high end of a range, with the first range starting at zero and sub-sequent ranges starting where their predecessor left off. The <triple> defines the number of subdivisions to be made in each dimension when the number of triangles falls in the range follow-ing that defined by the <scalar>. The <triple> for the last en-try, therefore, is used when the number of triangles exceeds the last <scalar> given. Conversely, if the number of triangles is less than the first <scalar> given, then no subdivision is performed.

The process of subdivision is recursively applied to each voxel created by the subdi-vision of the initial voxel until no further such subdivision is possible.

Example:

subdivision_control = ( ( 8, (3,3,3) ),
( 30, (4,4,4) ),
( 100, (6,6,5) ),
( 500, (6,6,8) ),
( 1000, (10,10,10) ),
( 2000, (20,20,20) ),
( 5000, (10,10,10) ) ) ;