Re: help circle-circle intersection area



In article <ef30267.-1@xxxxxxxxxxxxxxxx>, "Canne Olivier"
<olivier.canne@xxxxxxxxxxx> wrote:

Does somebody know how can i compute de area of a circle circle
intersection?
The radius of one circle must variate. I did a programmation but that
gives me complex numbers...

Thanks

oli
---------------------
Let the center and radius of one circle be (x1,y1) and r1, and let
(x2,y2) and r2 be the center and radius for the other circle. Then do:

d = sqrt((x2-x1)^2+(y2-y1)^2); % Distance between centers
s = (r1+r2+d)/2; % Half the sum of the sides of the triangle
ta = sqrt(s*(s-r1)*(s-r2)*(s-d)); % Triangle's area
a1 = acos((d^2+r1^2-r2^2)/(2*d*r1)); % Angle at first center
a2 = acos((d^2+r2^2-r1^2)/(2*d*r2)); % Angle at second center
area = r1^2*a1+r2^2*a2-2*ta; % Area of intersection

The triangle referred to here is that defined by the two centers and one
of the points of circle intersection. Half the intersection area will be
the sum of the two circular arc sector areas in the triangle minus the
triangle's area.

As long as you ensure that the distance between the centers is less than
the sum of the two radii and greater than the absolute value of their
difference, the quantity, 'area', should remain a real number. Otherwise,
there is no intersection.

PS - I see Jos has found a website for you. However, since I've already
got this written up, I'll send it anyway and you can compare the two.

(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford
.



Relevant Pages

  • Re: Inscribing hexagon in circle
    ... Set your compass to a convenient radius and draw a circle. ... another intersecting arc. ... intersection with its neighbors using a straight line. ...
    (rec.woodworking)
  • Formulating Steepest Descent
    ... F= sum of all Gij's residing inside the circle with ... radius r; centered at. ...
    (sci.math.symbolic)
  • Re: Inscribing hexagon in circle
    ... Use a compass to measure from the intersection of the radius and ... Scribe a circle from that point. ...
    (rec.woodworking)
  • Re: Inscribing hexagon in circle
    ... Use a compass to measure from the intersection of the radius and ... Scribe a circle from that point. ...
    (rec.woodworking)
  • Re: Another Euclidean geometry problem
    ... If center c = rs (intersection rs), there can be four such points. ... Bisect the angle between cord and c. ... Also it is not stated that the center of circle is intersect point ... Let R the radius of _c_ and increase the radius of the searched circle ...
    (sci.math)