home *** CD-ROM | disk | FTP | other *** search
- Most shape primitives, like spheres, boxes, and blobs, divide the world
- into two regions. One region is inside the surface and one is outside. The
- exceptions to this rule are triangles, disc and bezier patches; we'll talk
- about this later.
-
- Given any point in space, you can say it's either inside or outside any
- particular primitive object (well, it could be exactly on the surface, but
- numerical inaccuracies will put it to one side or the other).
-
- Even planes have an inside and an outside. By definition, the surface
- normal of the plane points towards the outside of the plane. (For a simple
- floor, for example, the space above the floor is 'outside' and the space be-
- low the floor is 'inside'. For simple floors this in unimportant, but for
- planes as parts of CSG's it becomes much more important). CSG uses the con-
- cepts of inside and outside to combine shapes together.
-
- Complex shapes may be created by combining other shapes using a technique
- called 'Constructive Solid Geometry' (or CSG for short). The CSG shapes are
- difference, intersection, and union. The following gives a simple 2D over-
- view of how these functions work.
-
- Take the following situation; point 1 is inside object A only. Point 2
- is inside B only. Point 3 is inside both A and B while point 0 is outside
- everything:
- * = Object A
- % = Object B
-
- * 0
- * * %
- * * % %
- * *% %
- * 1 %* %
- * % * 2 %
- * % 3 * %
- *******%******* %
- % %
- %%%%%%%%%%%%%%%%%
-
- NOTE: The diagrams shown here demonstrate the concepts in 2D and are in-
- tended only as an analogy to the 3D case. Also, the triangles and triangle
- based shapes cannot be used as solid objects in CSG since they have no clear
- inside and outside.
-