The simplest solid objects used for the representation are called primitives. Typically they are the objects of simple shape: cuboids, cylinders, prisms, pyramids, spheres, cones. The set of allowable primitives may be restricted; e.g., curved shapes may be forbidden.
It is said that an object is constructed from primitives by means of allowable operations, which are typically Boolean operations on sets: union, intersection and difference.
This technique operates somewhat differently from polygonal modelling, in which objects are approximated using a series of polygons. Its main application area is CAD.
Table of contents |
2 Applications of CSG |
In modelling packages, basic geometric objects such as the cube or 'box', sphere or ellipse, torus, and a number of other shapes that can be described using a mathematical formula, are commonly known as primitives. These objects can typically be described by a procedure which accepts some number of parameters; for example, a sphere may be described by the coordinates of its center point, along with a radius value.
A boolean union of two primitives is analogous to 'merging' them together, and treating them as a single object. This graphic depicts a boolean union:
The red cube and the blue sphere are combined using the CSG union operator to create a single object, with the appearance of both primitives merged together.
A boolean difference of two primitives is like 'subtracting' one or more objects from another object. This graphic shows a boolean difference in action:
Here, we see that a portion of the blue sphere has been sliced away from the red cube.
A boolean intersection of two primitives is the creation of a new object that takes the shape of the area where two or more primitives overlap. The next graphic shows this happening:
Here we can see that the volume where the blue sphere and red cube overlap has been turned into a new shape.
Constructive solid geometry has a number of practical uses. It is used in cases where simple geometric objects are desired, or where mathematical accuracy is important. The "Unreal" game engine uses this system.
CSG Operations
Boolean Union
Boolean Difference
Boolean Intersection
Applications of CSG