10 Modeling shapes with signed distance functions and alikes
This chapter covers
- Understanding the merits and flaws of modeling shapes with signed distance functions (SDFs).
- Using typical operations on SDFs: offset, unite, intersect, subtract.
- Learning the basics of generative design with tri-periodic minimal surfaces.
- Understanding metaballs as a design technique.
Signed distance functions as an instrument of geometric modeling have only recently become important. They were known for ages but until now mostly in academic circles. Boundary representations and images that we’ll look into in the following chapters were the top techniques for modeling in CAD, medical imaging, and games. Now the tables are turning.
The driving force for SDFs prominence comes from 3D printing. With a printer, you can easily produce forms so complex that chiseling them with milling tools would have been unheard of just a few decades ago. And with signed distance functions, you can program these complex forms to follow the properties you desire. You can “program” the material to hold stress, dissipate heat, or even merge with a living tissue properly, all by programming a signed distance function behind the produced body (figure 10.1).
Figure 10. E. g. this femur model generated from an SDF is specifically made porous. Porosity is important for implants to properly grow into the living tissue.

But what is a signed distance function anyway? Let’s find out.