deadsy
Joined 18 years ago
Joined 18 years ago
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.
So - I wrote my own tool/library in Go and it's essentially replaced my OpenSCAD usage.
https://github.com/deadsy/sdfx
func InvoluteGear(
numberTeeth int, // number of gear teeth
gearModule float64, // pitch circle diameter / number of gear teeth
pressureAngle float64, // gear pressure angle (radians)
backlash float64, // backlash expressed as per-tooth distance at pitch circumference
clearance float64, // additional root clearance
ringWidth float64, // width of ring wall (from root circle)
facets int, // number of facets for involute flank
)But sure. Art. It's a piece of kinetic sculpture....
Is the conclusion true? Garbage collection gives big productivity gains. Other languages have GC. It's not nice to see your Python code die after a few days because you messed up the type passed to a function. Other languages fix that at compile time. Multicore is now. Other languages are built with better multicore awareness.
Is it? ie - construct a normal and take a dot product. That'll work the vast majority of the time. Near the line you'll start running into the FP precision limits. With 64 (...or even 32) bit floats that sort of distance is likely way smaller than anything that represents a practical distance, so just call it and say you are on the line. Of late I've been messing about with problems of this nature and I can't say it's been all that difficult. https://github.com/deadsy/sdfx
https://github.com/deadsy/sdfx
In general I like to write code to define objects, but there are some situations where a graphical editing UI would be nice. ie- Curve and polygon design.
You can sort of imagine a hybrid approach where you could crack open a mini editor to design a curve and then use it to generate code (table of numbers) which you could then extrude/sweep/loft or whatever.