필터 지우기
필터 지우기

Overlapping circles - area

조회 수: 38 (최근 30일)
Joppy
Joppy 2018년 3월 30일
답변: Walter Roberson 2018년 3월 30일
Are there any user made functions for calculating the total area of circles which may or may not be overlapping? It seems like a pretty common question on here.. hoping to save some time.

채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 30일
https://www.mathworks.com/help/map/ref/circcirc.html can find the points of intersections of two circles as a call. Or you can use Roger's code from https://www.mathworks.com/matlabcentral/answers/196755-fsolve-to-find-circle-intersections#answer_174460 to find the points of intersection.
To find the total area, first figure out if one of the circles is completely inside the other; if it is then the total area is the area of the larger circle. Otherwise, calculate the area of the two circles and add those together. Then find the points of intersection. If there is no intersection, then you are done. Otherwise convert the two points into polar coordinates relative to the center of one of the circles, and find the difference in angles, and use the "area = 1/2 * r^2 * theta" formula to calculate the area of the sector. That is the area counted twice, so subtract it off from the total.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by