This page on GitHub This page on GitHub

Curve-circle intersections

Sun, 22 Nov 2020
submit to reddit submit to hacker news tweet your read

While the primer covered line/line, line/curve, and curve/curve intersections, there was one other obvious intersection conspicuously missing: circle/curve intersections. You'd think those were just an extension on the maths used for the other three, but unfortunately, this is not the case. Rather than using calculus, the only real way to determine where a polynomial curve intersects it is to sample the curve at a resolution high enough to find you intervals on the curve where there likely is an intersection, then refining that interval until you find actual intersections.

It is, in fact, rather similar to projecting a point onto a bezier curve where the point is the circle's center, and where the projection distance actually needs to match the circle radius, so: let's see how to do that!

Pomax