[NEXT] [UP] [PREVIOUS] . [CONTENTS] [INDEX] . [Quick Ref]
Next: Potential CSG Problems Up: Constructive Solid Geometry Previous: Constructive Solid Geometry

CSG in Rayshade

CSG in rayshade will generally operate properly when applied to conjunction of boxes, spheres, tori, and blobs. These primitives are by nature consistent, as they all enclose a portion of space (no hole from the ``inside'' to the ``outside''), have surface normals which point outward (they are not ``inside-out''), and do not have any extraneous surfaces.

CSG objects may also be constructed from aggregate objects. These aggregates contain whatever is listed inside, and may therefore be inconsistent. For example, an object which contains a single triangle will not produce correct results in CSG models, because the triangle does not enclose space. However, a collection of four triangles which form a pyramid does enclose space, and if the triangle normals are oriented correctly, the CSG operators should work correctly on the pyramid.

CSG objects are specified by surrounding the objects upon which to operate, as well as any associated surface-binding commands, by the operator verb on one side and the end keyword on the other:

union <Object> <Object> [<Object> ...] end
Specify a new object defined as the union of the given objects.

difference <Object> <Object> [<Object> ...] end
Specify a new object defined as the difference of the given objects.

intersect <Object> <Object> [<Object> ...] end
Specify a new object defined as the intersection of the given objects.

Note that the current implementation does not support more that two objects in a CSG list (but it is planned for a future version).


[NEXT] [UP] [PREVIOUS] . [CONTENTS] [INDEX] . [Quick Ref]
Next: Potential CSG Problems Up: Constructive Solid Geometry Previous: Constructive Solid Geometry


Jelle van Zeijl (jvzeijl@iso.estec.esa.nl)
Wed Jun 15 16:19:08 MET DST 1994