How can I find the points at which two circles intersect?

Given the radius and x,y coordinates of the center point of two circles how can I calculate their points of intersection if they have any?

Answer

This can be done without any trigonometry at all. Let the equations of the circles be
(xx1)2+(yy1)2=r21,
(xx2)2+(yy2)2=r22.
By subtracting (2) from (1) and then expanding, we in fact obtain a linear equation for x and y; after a little rearranging it becomes
2x(x1x2)2y(y1y2)=(r21r22)(x21x22)(y21y22).
(If the circles intersect, this is the equation of the line that passes through the intersection points.) This equation can be solved for one of x or y; let’s suppose y1y20 so that we can solve for y:
y=x1x2y1y2x+.
Substituting this expression for y into (1) or (2) gives a quadratic equation in only x. Then the x-coordinates of the intersection points are the solutions to this; the y-coordinates can be obtained by plugging the x-coordinates into (3).

Attribution
Source : Link , Question Author : Joe Elder , Answer Author : Don Hatch

Leave a Comment