Find the distance to a quadratic bezier curve in 2D. Click on the screen to get the closest point in parameter space shown with a white dot. The pink fill is showing the SDF. The code was derived by Inigo Quilez. https://www.shadertoy.com/view/MlKcDD I implemented it in Scratch and optimised it for that.