Calculate the intersection area of 3 circles
Show older comments
We know center coordinate of three circles & also their radius. Now I want to know the intersection area of these three circle I know how to calculate the intersection area of two circle ,I want to calculate just the overlap area of these three How can I do this?
6 Comments
Azzi Abdelmalek
on 9 Aug 2013
Edited: Azzi Abdelmalek
on 9 Aug 2013
Post your code for two circle, maybe it can be improved and adapted for three circles
vatankhah
on 9 Aug 2013
Roger Stafford
on 12 Aug 2013
There is good reason no-one has answered this question as yet, Vatankhah. The problem you pose requires a more complicated matlab code than the usual kind which appear here in 'Answers'.
I assume we are taking about circles in the x-y plane. The region of points in the intersection of three circular disks can either be empty or consist of a convex shape bounded, 1) by a single complete circle, 2) by two circular arcs, 3) by three circular arcs, or 4) by four circular arcs in which two of these are parts of the same circle.
The "empty" case can occur if any pair of the circular disks do not touch, but it can also occur when each pair of disks intersect but with no common intersection in these pairwise intersections.
The method involved in finding the area of the non-empty intersection case is the same in cases 2), 3), and 4) above. The intersection region is composed of two, three, or four circular segments together with an enclosed polygon which is either a straight line segment, a triangle, or a quadrilateral. A circular segment area can be computed as the area of a circular sector with the area of the triangle composed of the circle center and the two arc endpoints either subtracted or added depending on whether the arc angle is less than or greater than pi.
Because of the necessity for distinguishing between all these different cases above, the resulting matlab code, however, would be excessive in terms of solution in this forum in my opinion.
Image Analyst
on 13 Aug 2013
Edited: Image Analyst
on 13 Aug 2013
I didn't think an analytical solution would be easy, but I waited for Roger to respond in case I was wrong. My only suggestion would be if you can live with an approximate, quantized solution, where you convert your circles to digitized arrays (images) with poly2mask, then AND all then all together to find the intersection, and then use regionprops() (in the Image Processing Toolbox) to get the area. But this is a numerical solution (whose accuracy depends on the digitization frequency you select), not a theoretically exact, analytical solution. If you want that, and can't figure it out, let me know.
Cedric
on 13 Aug 2013
Just wanted to mention an additional way to approximate a result with minimal code: using Mapping toolbox, building polygons and intersecting them.
vatankhah
on 13 Jan 2014
Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!