You have 2 circles that intersect in 2 points. You know the coordinates of their centers and you also know their radius. My question is: What are the coordinates of these 2 intersection points?
4 Answers
First assume that the first circle is centered at the origin and the second on the $X$ axis at $(d, 0)$, where $d$ is the distance between the centers.
We solve the system
$$\begin{cases}x^2+y^2=r_1^2\\x^2-2dx+d^2+y^2=r_2^2,\end{cases}$$ which gives the common abscissa by subtraction,
$$x=\frac{d^2+r_1^2-r_2^2}{2d}.$$
and the symmetric ordinates,
$$y=\pm\sqrt{r_1^2-x^2}.$$
For the general case, we can solve as above, then rotate and translate the plane to bring $(0,0)$ and $(d,0)$ on $c_1$ and $c_2$. This is achieved by the affine transform
$$\frac1d\left(\begin{matrix}x_{12}&-y_{12}\\y_{12}&x_{12}\end{matrix}\right)\left(\begin{matrix}x\\y\end{matrix}\right)+\left(\begin{matrix}x_1\\y_1\end{matrix}\right).$$
Let the equations of circles be $$(x-a_1)^2 + (y-b_1)^2 = r_1^2$$ and $$(x-a_2)^2 + (y-b_2)^2 = r_2^2.$$
Then, the coordinates of the intersection points are the solution of equation:
$$(x-a_1)^2 + (y-b_1)^2 - r_1^2 = (x-a_2)^2 + (y-b_2)^2 - r_2^2.$$
- 7,296
- 1
- 16
- 30
-
1And how do I calculate the solution of this equation? – Theo Cristea Jun 16 '16 at 11:00
Let the equation of the two circles $C_1$ and $C_2$ be $f(x, y) = 0$ and $g(x, y) = 0$ respectively.
Combining the two, we get $f(x, y) - g(x, y) = 0...... (*)$.
After simplification, (*) becomes $h(x, y) = 0$. Note that $h(x, y) = 0$ is only linear in $x$ and $y$. In fact, it represents the common chord (a straight line $L$) passing through $C_1$ and $C_2$.
The co-ordinates of the points of intersection $C_1$ and $C_2$ is then obtained by solving the quadratic equation obtained from combining $L$ and $C_1$ (or $L$ and $C_2$).
- 17,141
-
If you could more explicitly write out the definitions of $C_1$, $C_2$, and $L$, your answer would be perfect in my opinion. – NoseKnowsAll Jun 16 '16 at 15:53
-
@NoseKnowsAll $f(x, y) = 0$ for $C_1$ could be (1) in general form $x^2 + y^2 + Dx + Ey + F = 0$ with $D$, $E$, and $F$ being known quantities; or (2) in center-radius form, $(x – h)^2 + (y – k)^2 – r^2 = 0$ with center $(h, k)$ and radius = $r$ known. $ C_2$ is quite similar. – Mick Jun 16 '16 at 16:02
Subtracting the equations of the two circles, the square terms cancel out and we get the equation of the line through the two intersections,
$$(x-x_1)^2-(x-x_2)^2+(y-y_1)^2-(y-y_2)^2\\ =(2x-x_1-x_2)(x_2-x_1)+(2y-y_1-y_2)(y_2-y_1)=r_1^2-r_2^2$$ or
$$x_{12}x+y_{12}y=\frac{r_1^2-r_2^2}2+x_{12}\bar x+y_{12}\bar y.$$
You intersect this line with the line that joins the centers
$$y_{12}x-x_{12}y=y_{12}x_1-x_{12}y_1$$
by solving the $2\times2$ system for $x,y$.
Then the circle intersections are on the perpendicular to the first line, at some distance of the point just found, $(x+\mu y_{12},y-\mu x_{12})$. We express that this point lies on a circle,
$$(x-x_1+\mu y_{12})^2+(y-y_1-\mu x_{12})^2=r_1^2.$$
When developing this expression, we can be sure that the linear temrs will cancel out, by symmetry. Then we get $\mu$ from
$$(x_{12}^2+y_{12}^2)\mu^2=r_1^2-(x-x_1)^2-(y-y_1)^2.$$