필터 지우기
필터 지우기

Calculate specified area for multiple circle

조회 수: 3 (최근 30일)
Nazrin Afiq Abdul Rahman
Nazrin Afiq Abdul Rahman 2021년 11월 12일
댓글: DGM 2021년 11월 13일
Hello,
Can someone help me to calculate the area for the picture given?
The picture shown the generated approximated station (black dot) with its boundary (blue dot). The radius for each circle are the same while the location for each circle are not the same. I want to calculate the total area (area for all circle) as shown in picture. What im confusing is if i just calculate the area by using formula circle area times with total number of circle the area for my calculation is wrong. This is because of redundancy of area (overlapping between circle) that already calculated included in the calculation. I have try to calculate the overlapping area between two circle but there is too many multiple overlapping. I have seen some of suggestion like calculating overlapping area between two circle, intersection or etc but still i cant generate a full code to calculate the desired area. Can someone help me generate the code to calculate this area?

답변 (1개)

DGM
DGM 2021년 11월 13일
편집: DGM 2021년 11월 13일
For the simple case where all circles are identical and the distance between centers is equal to the radius:
R = 70.7; % in whatever units
tiling = [7 7];
% area of circle
Afull = pi*R^2;
% area of overlap btw two circles at distance R
Aoverlap = (2*pi*R^2)/3 - sqrt(3*R^4)/2;
% area of wedge-shaped pieces
Awedge = (Afull-2*Aoverlap)/2;
% area of region within station grid
Arect = prod((tiling-1)*R);
% 3/4 circles at corners
Acorners = 3*Afull;
% remaining area of periphery
Aedge1 = 2*sum(Awedge*max(tiling-2,0));
Aedge2 = sum(Aoverlap*max(tiling-3,0));
Atotal = Arect + Acorners + Aedge1 + Aedge2
Atotal = 3.1041e+05
This can also be approximated using image processing methods.
R = 70.7;
N = [7 7];
A = zeros(600,600);
y = round(100:R:100+(N(1)-1)*R);
x = round(100:R:100+(N(2)-1)*R);
A(y,x) = 1;
A = bwdist(A)<=R;
nnz(A)
ans = 310157
  댓글 수: 2
Nazrin Afiq Abdul Rahman
Nazrin Afiq Abdul Rahman 2021년 11월 13일
Hello,
The R is a radius or the distance between two centre of circle? and the centre of circle is tilling? There are multiple overlapping between more than 3 circle and the overlapping was not the same
DGM
DGM 2021년 11월 13일
In the given diagram, the radius of each circle is 70.7 units. The spacing between centers is equal to the radius. The example I gave assumes this equivalence, therefore R is both the circle radius and horizontal/vertical spacing. The 'tiling' parameter simply denotes how many circles there are in the pattern (vertical, horizontal).
"There are multiple overlapping between more than 3 circle and the overlapping was not the same"
I'm not sure what you mean by that. The regions covered by more than one circle aren't treated any differently than regions covered only by one circle. You'll have to clarify what you mean by "not the same". If the configuration is something different than the diagram, you'd have to specify what it is.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2008b

Community Treasure Hunt

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

Start Hunting!

Translated by