Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

f * g is a symmetric difference (all zeros remain zeros, the new internal points are those that are inside exactly one of f and g: (-, +) -> -, (+, -) -> -, (+, +) -> +, (-, -) -> +).

f * g + x for some small constant x makes the symdiff smoother, depending on the sign of x it makes the components either meld together or "repel" each other. If the original components are disjoint (or if it's 3D solids and the internal surfaces are irrelevant) and x < 0, it functions as a smooth union.

f / g has the same inside/zero/outside behavior as f * g, but is of course very pathological for all values of g close to zero. I don't think it has any good uses.





f*g is good to mask one SDF by another. I use it all the time in my little voxel engine.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: