# Finding the intersection points of two circles - where one circle has a diff x and y coord than the other

I now understand how to calculate the offset of the radical line from circle_a (a)

However:

Let two circles of radii  and  and centered at   and  intersect in a region shaped like an asymmetric lens. The equations of the two circles are

x^2 + y^2 = R^2
(x-d)^2 + y^2 = R^2


So this methods assumes that the y coordinates of both circles are the same?

How do I calculate the intersection points where both the x and y coordinates are not the same then?

Thanks.

-
translating so that the center of one circle is at the origin and rotating so that the $x$-coordinate of the center of the other is zero reduces the general case to this one. – yoyo Dec 19 '11 at 20:53
This exact question is discussed (with code) in Computational Geometry in C, p.331ff. – Joseph O'Rourke Dec 19 '11 at 22:02

Using that rotation the $d$ in your formula will be the distance of both centers and your formulas will look a lot better. To undo this you have to undo the translation and then the rotation. Either you use rotation matrices or you use a complete solution like for example this one.
to give an example, for instance $(x-1)^2+(y-1)^2=1, (x-2)^2+(y-2)^2=1$. change variables, $(x,y)\mapsto(x+1,y+1)$ to get a new set of equations $x^2+y^2=1, (x-1)^2+(y-1)^2=1$. the center of the first circle is now at the origin and the other is centered at $(1,1)$. now the angle from the positive $x$-axis to $(1,1)$ is $\pi/4$ (in general you would have to find some inverse tangent; i picked an easy one). so you want to rotate the whole plane by $-\pi/4$ ie $$(x,y)\mapsto \left( \begin{array}{cc} 1/\sqrt{2}&1/\sqrt{2}\\ -1/\sqrt{2}&1/\sqrt{2}\\ \end{array} \right) \left( \begin{array}{c} x\\ y\\ \end{array} \right) =\Bigg(\frac{(x+y)}{\sqrt{2}},\frac{(y-x)}{\sqrt{2}}\Bigg)$$ now you have the equations $x^2+y^2=1, (x-\sqrt{2})^2+y^2=1$.