Main Page | See live article | Alphabetical index

Constructive solid geometry

Constructive solid geometry (CSG) is a branch of solid modelling that deals with representations of a solid object as a combination of simpler solid objects. It is a procedural modelling technique used in 3D computer graphics.

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.

CSG Operations

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.

Boolean Union

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.

Boolean Difference

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.

Boolean Intersection

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.