GlomeTrace-0.1.1: Ray Tracing Library

Data.Glome.Csg

Synopsis

Documentation

difference :: SolidItem -> SolidItem -> SolidItemSource

Create a new object based on the subtraction of the second item from the first. This only works if the items have a well-defined inside and outside. Triangles and discs, for instance, have no volume, so subtracting them from anything won't do anything.

intersection :: [SolidItem] -> SolidItemSource

Create a new item from the boolean intersection of a list of solids. A point is inside the object iff it is inside every primitive. We can construct polyhedra from intersections of planes, but this isn't the most efficient way to do that.