In the previous article, I introduced MetaStruct and gave a basic overview of how it works. In this article, I’ll talk about boolean operations, and why they are so essential in implicit geometry.
What are boolean operations?
In geometry, boolean operations are the essential building blocks of composite shapes and forms. While it is simple to describe a cube or a sphere with a distance function, it would be beyond most people to describe the distance function of a functional engineering component or video game character.
This is why we need ways to combine primitive distance fields into more complex ones. For this, we come to boolean operations. There are 3 fundamental operations that we use:
- Union
- Difference
- Intersection

In the above image, we can see an example of each operation when applied to a sphere.
A union means joining the shapes together. This can be thought of as a solid addition. Mathematically, this is as simple as applying a MIN operation to the two fields, Result = MIN(Shape 1, Shape 2).
A difference means cutting into one shape using another. This can be thought of as a solid subtraction. Much like a regular subtraction, we get a different result depending on which of our shapes is the first operand. In the example above, the sphere is the first operand, and we remove the cube from it. Mathematically, this is a MAX operation, but we compare the first operand to the negative of the second, Result = MAX(Shape 1, -Shape 2).
The intersection returns the area in space only where both shapes exist. This is implemented as a MAX operation between the two fields, Result = MAX(Shape 1, Shape 2).
The real power
In the previous paragraph, we discussed how the fundamental geometric operations between implicit shapes are nothing more than MIN and MAX operations. This means that they are very robust, far more robust when compared to the same operations performed on meshes or CAD shapes.
This is the real power of implicit geometry. It is impossible to break. Using this type of kernel, we can combine any kind of geometry, regardless of the complexity. If you can dream up the distance function or shape, these boolean functions will work. This is what has enabled the next generation of design tools, specifically in additive manufacturing.
Summary
In this article, we discussed what boolean operations are, how they are implemented in an implicit geometry kernel, and why this is a really big deal.
All of these operations are implemented in MetaStruct, and the mathematical operations are exposed. Take a look at the repo, and play around to try and create your own shapes!

Leave a comment