Adam Majewski wrote:
>>>eq12: (x1-x2)^2 + (y1 -y2)^2 - (r1-r2)^2;
>>
>> I think you mean (r1+r2)^2 here and in the other two equations.
>
>I have used informations :
>
>"If the center of the second circle is outside the first,
>then the - sign corresponds to externally tangent circles
>and the + sign to internally tangent circles. "
>from :
>http://mathworld.wolfram.com/TangentCircles.html
>
>Do I have misunderstood it or is it a bug ?
It appears to be an error on the wolfram page. You'll note that the square of the distance between the centers of two externally tangent circles centered at (x1,y1) and (x2,y2) is this:
(x1-x2)^2 + (y1-y2)^2
The distance is also the sum of the radii, so we can also write the square of the distance as:
(r1+r2)^2
Since they're the same distance, we can subtract one from the other and we must get zero, hence:
(x1-x2)^2 + (y1-y2)^2 - (r1+r2)^2
Which is exactly your (corrected) eq12.
>eq13: (x1-x3)^2 + (y1 -y3)^2 - (rad1+rad3)^2;
>eq23: (x2-x3)^2 + (y2 -y3)^2 - (rad2+rad3)^2;
>
>eq23: expand(eq23);
>eq13: expand(eq13);
You may be doing it for some other reason, but Maxima doesn't require these two expand() statements to solve these equations.
Ed