Constructive Solid Geometry

Constructive Solid Geometry (CSG ) or Constructive Solid Geometry is a technique for modeling of bodies, which is used, inter alia, in the 3D computer graphics and CAD programs. Constructive Solid Geometry allows a designer to produce complex surfaces and body, by using Boolean operators for combining objects. From the CSG emerged body often seem very complex, but are in reality nothing more than cleverly linked objects.

Basic objects

The base objects from which emerge CSG body, called primitives (see Graphical primitive ). Typically, it involves the body, the surface of which can be described by a relatively simple mathematical formula, such as cubes, cylinders, prisms, pyramids, spheres or rings. The set of possible primitive is usually limited by the software used. Some software packages allow CSG on curved objects ( procedural or parametric surfaces), while others only on polygonal meshes ( triangle meshes ) work. The procedural or parametric approach allows a mathematically exact calculation and representation of the body, while meshes are always only a more or less inaccurate approximation to reality.

As already mentioned, a complex body is generated by the primitive associated with surgery. Usually it involves Boolean operations on sets: union ( Union ), difference ( Difference, ) and average ( Intersection ). The following figure shows the effect of the operators as examples of the combination of dice with ball:

Rise portions of the second object to be cut out from the first. Subtraction (cube - ball ).

Section: The part that both objects have in common.

Applications

CSG is very popular among designers, as it can form complex geometries with a number of relatively simple body. The designer can modify the geometry also retrospectively ( for most programs ) by the position (or transformation ) of the individual objects or the Boolean operator changes, the associated objects. The designer can thus be model interactively and intuitively, by trial and error, create.

CSG is also used by various programs "under the hood ", ie without the user know about the existence of the CSG operations. Thus, for example, use the game engines Unreal and Quake, the CSG method. Simulation programs that simulate the processes on machine tools that use typically also CSG.

CSG tree

Since a plurality of successively executed CSG operations in general are not commutative, they can be hierarchically organize and transfer into a CSG tree. Each leaf corresponds to a primitive, each node of a CSG operation (or the intermediate result of a CSG operation, which can again be transformed). The root of the tree is the final result.

Note: The regularized quantities of n-dimensional Euclidean space form with the links, ( complement of ) a Boolean algebra, for which the commutative law. The operator is not part of Boolean algebra.: Operator and use it as a substitute for the operator - However, the leave

The example object can therefore also calculate non-staple ( = cube, = sphere = cylinder):

201054
de