News for hackers. Stuff that matters.
Re:The art of over-engineering your side projects by mkl on Friday September 01, 2017 @07:41PM (#15153176)
> substitute that into the squared distance function

How the heck did "" get in there?

> 5. solve the roots of the cubic numerically in the range 0 to 1: either Newton's or clipping or some other hybrid numerical method.

Is there a reason not to use the cubic formula in this situation?

Re:The art of over-engineering your side projects by delhanty on Friday September 01, 2017 @07:49PM (#15153218)
>How the heck did "" get in there?

Something like

   (E(t)-P).(E(t)-P)
where E is the ellipse and P is the point.

>Is there a reason not to use the cubic formula in this situation?

Numerical stability in edge cases, which will occur for code exercised as extensively as Parasolid's.

I guess you could a Bernstein version of the cubic formula, though I've not seen one derived in the wild. It would be nice to have as well as Bernstein quartic formula. The Bernstein quadratic is easy.