# help with geometry. (intersection of 2 circles)

## Recommended Posts

16bit_port    180
[url="http://paulbourke.net/geometry/2circle/"]Circle-Circle intersection point article[/url] (it's VERY short)

I understood everything up until the very end :

x[sub]3[/sub] = x[sub]2[/sub] +- h ( y[sub]1[/sub] - y[sub]0[/sub] ) / d
y[sub]3[/sub] = y[sub]2[/sub] -+ h ( x[sub]1[/sub] - x[sub]0[/sub] ) / d

why the "y[sub]1[/sub] - y[sub]0[/sub]" and the negative h to get x[sub]3[/sub]?

##### Share on other sites
jyk    2094
(-(y1-y0), x1-x0)/d is a unit-length vector perpendicular to the line passing through the centers of the circle. P[sub]3[/sub] is the midpoint (sort of) of the overlap, and [i]h[/i] is half the length of the cord bisecting (sort of) the overlap. Together, these values can be used to compute the intersection points.

Does that help at all?

##### Share on other sites
16bit_port    180
[quote name='jyk' timestamp='1307319734' post='4819920']
(-(y1-y0), x1-x0)/d is a unit-length vector perpendicular to the line passing through the centers of the circle. P[sub]3[/sub] is the midpoint (sort of) of the overlap, and [i]h[/i] is half the length of the cord bisecting (sort of) the overlap. Together, these values can be used to compute the intersection points.

Does that help at all?
[/quote]

Actually. Yes it does. I forgot that swapping the coordinates and negating one of them of a vector creates another vector perpendicular to it.

##### Share on other sites
16bit_port    180
Also two more things, just out of curiosity if I took the circle formula :

(x - h[sub]1[/sub])[sup]2[/sup] + (y - c[sub]1[/sub])[sup]2[/sup] = r[sub]1[/sub][sup]2[/sup]
(x - h[sub]2[/sub])[sup]2[/sup] + (y - c2)[sup]2[/sup] = r[sub]2[/sub][sup]2[/sup]

and solve this system of equations by solving for x and then substituting it back into either of those and solve for y, would I get the same result? In other words, is that a valid way to find the intersection?

And [url="http://mathforum.org/library/drmath/view/64311.html"]doing this in 3D[/url], I don't understand how he got
r^2 = R1^2 - (a^2+b^2+c^2)*t0^2for the radius of the intersecting circle between two spheres.

Thanks.