Newtons Method - Mr. Sanderson (3Blue1Brown) about

- SDF to a quadratic bezier function
- Root finding with Newtons method for any polynomial

- construct a coordinate system at any point
- get the tight bounding box
- do an arc length parameterization

- instead of distance-based approach, just tell me if I am inside or outside a curve.

- somebody getting his hands dirty regarding this 2007 paper:
- Improved Alpha-Tested Magnification for Vector Textures and Special Effects

Shadertoy demos:

- SDF to quadratic bezier some hidden link to whiteboard scribbles
- little bit cleaner code maybe? root finding for some cubic function again done via Cardanos method
- pause it and enjoy there is more explanation of what cubic function actually has to be tackled with Cardano’s method. In danish

- Root finding (again)
- Cardanos method to get roots for polynomials of 3rd order, aka cubic functions
- and the whole beauty of complex numbers, the universe and everything

Question

Can anybody point me to a good math article on how to derive the formula for the distance to a quadratic or even cubic bezier curve?

My danish is a bit rusty…

What I tried is to take the cubic bezier formula, subtract that from a spectator’s point, plug this into a formula of some greek guy in order to describe the length from the spectator’s point to any point on the curve (basically as 3blueonebrown was suggesting). And as he suggested we should now just take the derivative in order to find the t-values for which the distance is minimal. But I end up with a higher degree polynomial. So I guess just use Newtons method? But with which seeds to start this method?

I can see that the solution for the quadratic bezier distance in the danish article is taking a different approach than Mr. Sanderson…