You can try this at home
Drawing boolean objects - combine parametric and implicit functions
The boolean object has surfaces from all its constituent objects
Draw using polygonal meshes, but test before drawing using implicit func.
- for a hole drilled in a block - the surface of the hole is given by the cylinder used to drill it, the rest of the object’s surface is defined by the block
- draw points on the block if they are outside the cylinder
- draw points on the cylinder if they are inside the block
Implementing union:
- draw both objects, use hidden-surface algorithms to take care of visibility
Implementing intersection:
- draw points only if they are inside both objects
Implementing subtraction
- points on the positive object’s surface are visible outside the negative object
- points on the negative object’s surface are visible inside the positive object
Draw using parametric functions, trim using implicit functions
- And that’s where the tricky part comes in