Hacker News new | ask | show | jobs
by deadsy 2102 days ago
SDF = signed distance function. A function mapping a 2d/3d coordinate onto a scalar. The scalar is the shortest distance from that point to the surface of the object. (+ve outside, -ve inside)

CSG = constructive solid geometry: Take primitive 3d shapes and do unions, differences, intersections on them to build more complex shapes.

Fairly obviously the union of 2 sdf functions is going to be the minimum of those values. That pretty simple.

Intersections and differences are not much more complex....

See: https://iquilezles.org/www/articles/distfunctions/distfuncti...

for some quick examples.