overlapping area between two circles

hello i have 25 circles each with center coordinates and all of the same radius how to calculate the overlapping area between any two or more circles

4 件のコメント

Jan
Jan 2016 年 3 月 12 日
What did you try so far? Diod you search in the net already? You fand many solutions directly.
m. muner
m. muner 2016 年 3 月 12 日
well yeah as a matter of fact i found solutions and mathematically they are well understood just don't know how to do it in matlab :-(
Image Analyst
Image Analyst 2016 年 3 月 12 日
Perhaps this will help you learn how to program in a formula/equation: http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
Ahmet Cecen
Ahmet Cecen 2016 年 3 月 12 日
I feel like this is better solved in MAPLE or Mathematica if you are looking for an exact answer in continuous space.

サインインしてコメントする。

 採用された回答

Star Strider
Star Strider 2016 年 3 月 12 日

0 投票

I was filling in the area of the overlap of two circles in How we can generate a union area of overlapping 2 circles, 3 circles, multiple n circles, not calculating the area. However you could adapt that idea to calculate the area of the overlap between any two of them using trapz.

2 件のコメント

m. muner
m. muner 2016 年 3 月 13 日
編集済み: m. muner 2016 年 3 月 13 日
thank you very much I'll try it
Star Strider
Star Strider 2016 年 3 月 13 日
My pleasure!

サインインしてコメントする。

その他の回答 (2 件)

Roger Stafford
Roger Stafford 2016 年 3 月 14 日

1 投票

Let the distance between the centers of two circles be d and their two radii be r1 and r2. Then the area, A, of the overlap region of the two circles can be calculated as follows using Matlab's 'atan2' function:
t = sqrt((d+r1+r2)*(d+r1-r2)*(d-r1+r2)*(-d+r1+r2));
A = r1^2*atan2(t,d^2+r1^2-r2^2)+r2^2*atan2(t,d^2-r1^2+r2^2)-t/2;
Note that if 't' is imaginary, then either the circles don't intersect at all in which case the overlap area is zero, or one circle lies entirely within the other in which case the overlap area is just that of this inner circle.
Ahmet Cecen
Ahmet Cecen 2016 年 3 月 12 日

0 投票

If the formula is correct, here is a function that will calculate the area:
a = @(d,r,R) (1/d).*sqrt(4*(d.^2)*(R.^2) - ((d.^2)-(r.^2)+(R.^2)).^2)
Now all you do to get the area is:
d = distance between two centers
area = a(d,radius1,radius2)

1 件のコメント

m. muner
m. muner 2016 年 3 月 13 日
thank you very much you have two radius i guess since there is R and r if they are the same its ok for the function

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

タグ

質問済み:

2016 年 3 月 12 日

回答済み:

2016 年 3 月 14 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by