Calculating signed distance fields #Math #Modeling
From the Almost Looks Like Work blog, signed distance fields (SDFs) is a fancy name for something very simple. An SDF is just a function which takes a position as an input, and outputs the distance from that position to the nearest part of a shape.
The question is, how are the individual SDFs combined to make a new, global SDF representing the joined object (the boolean union)?
Thinking about it for a second, we should first calculate the SDF for each circle individually – and . We should then return whichever circle edge is the closest, i.e.
This is cool, and there is a great list of SDFs for different primitive shapes listed here, but how do we actually draw the result of an SDF?
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey