Blist: A Boolean List Formulation of CSG Trees
Set membership classification algorithms visit nodes of a CSG tree through a recursive divide-and-conquer process, which stores intermediate results in a stack, whose depth equals the height, H, of the tree. During this process, the candidate sets is usually subdivided into uniform cells, whose interior is disjoint from primitives' boundaries. Cells inside the CSG object are identified by combining the binary results of classifying them against the primitives. In parallel systems, which allocate a different process to each leaf of the tree, and in algorithms that classify large collections of regularly spaced candidate sets (points, pixels, voxels, rays, or cross-sections) against the primitives using forward differences, a separate stack is associated with each candidate or cell. Our new representation for CSG trees, called Blist, distributes the merging operation to the primitives and reduces the storage requirement for each cell to log(H+1) bits. Blist can represent any Boolean expression as a list of primitives, each containing a reference to the primitive's description (type, parameter, transformation), a sign, a stamp, and a name. During set membership classification, a label is attached to each cell and passed to the successive primitives in the Blist. When the name written on the label matches the primitive's name, the cell is classified against the primitive. If the result matches the primitive's sign, the name stored in the primitive's stamp is put on the label -- if not, a zero name is used. The elimination of the intermediate CSG nodes and of the recursive merging operations make the Blist architecture particularly well suited for parallel hardware configurations. We provide a simple algorithm for converting CSG expressions to Blists. It uses rotations on the positive form of the tree to reduce the number of bits needed for each label.