
Re: circle intersections...
Posted:
Aug 30, 2013 3:50 AM


> "Ken Pledger" wrote in message > news:ken.pledgerBBFD52.16002730082013@news.eternalseptember.org...
> In article <kvok88$gf8$1@speranza.aioe.org>, > "Chris M. Thomasson" <no@spam.invalid> wrote:
> > [crossposted to {alt.math, sci.math}] > > > > "Chris M. Thomasson" wrote in message > > news:kvoe76$155$2@speranza.aioe.org... > > > > I was wondering where I could find some programming > > methods of clever circle intersection algorithms that use > > a single square root operation....
> Your code is hard to read, but here's a standard trick to do what you > want. Consider the circles
> x^2 + y^2 + 2x  4y  4 = 0
> x^2 + y^2  6x + 2y + 6 = 0.
> Subtract one equation from the other to get
> 8x  6y  10 = 0.
[...]
I came up with the following equations from your example:
((3y+5) / 4)^2 + y^2 + 2((3y + 5) / 4)  4y  4 = 0
x^2 + ((4x  5) / 3)^2 + 2x  4((4x  5)/3)  4 = 0
Which does indeed mean that:
x = 1.4 y = 0.2
Which is the same answer you got here:
> The circles in my example actually touch, so the line is their common > tangent. The same solution method finds their point of contact (7/5, > 1/5).
Okay, now I am getting somewhere. Thanks again Ken!
:^)

