[Math] Intersection of a parametric curve and a circle

circlesparametric

Given a curve defined by a parametric equation $x(t)$ and $y(t)$, how might one calculate the point of intersection with a circle?

The derivatives $x'(t)$ and $y'(t)$ are also available if they prove useful.

(This appears to be a general application of Intersection of cubic bezier curve and circle. Unfortunately, the answerer has left some ambiguity in his process, and as a new user, I do not have the privilege to ask for clarification.

Specifically, I don't know what $x_{c}$ and $y_{c}$ refer to. Is it the center point of the circle or the constraint of the circle's parametric equation?

Additionally, is the solution generalizable such that it can work for any parametric equation?)

Best Answer

Suppose your parametric curve is $\mathbf{C}(t) = (x(t), y(t))$ and your circle has its center at $\mathbf{Q} = (a,b)$ and radius $r$.

Then, the equation of the circle is $\|\mathbf{X} - \mathbf{Q}\| = r$. So, at intersection points $$ \|\mathbf{C}(t) - \mathbf{Q}\| = r $$ Working with coordinates, instead, the equation of the circle is $(x-a)^2 + (y-b)^2 = r^2$, so, at intersection points, we have $$ (x(t)-a)^2 + (y(t)-b)^2 = r^2 $$ Saying it another way, you need to find the zeros of the function $$ f(t) = (x(t)-a)^2 + (y(t)-b)^2 - r^2 $$ You'll need to use numerical methods to do this, typically. If you use a Newton-Raphson style of root finder, then the derivatives you mentioned will be handy.

In the special case where $\mathbf{C}(t)$ is a polynomial of degree 3 (a Bezier curve, for example), then $f(t)$ will be a polynomial equation of degree 6, so you'll still have to use numerical methods to find solutions.

The other answer you cited is basically correct. As you guessed, $(x_C,y_C)$ denotes the center of the circle. But the right-hand side of the equation he gives should be $r^2$, not $0$.

Related Question