News for hackers. Stuff that matters.
Re:CAD Sketcher, free and open-source project bringing CAD l... by traverseda on Sunday February 19, 2023 @05:30PM (#34862535)
Excited to see you here!

One approach would be to construct one solid SDF object out of a bunch of 2D SDF object segements: https://iquilezles.org/articles/distfunctions2d/

The "Parabola Segment - exact" and "Polygon - exact" examples in particular. Probably requires some combination of the two for your use case. Basically turn your lines into 2D SDF objects that define the outside of your object.

I think most of those objects actually could be chained together, like the actual quadratic bezier example has a real interior and exterior when you look at it more closely: https://www.shadertoy.com/view/MlKcDD

So yeah, the intersection of a bunch of line segment SDFs like that could do it. Not sure about the performance...

There are no comments on this comment yet.