Area of two identical overlapping ellipses

조회 수: 3 (최근 30일)
laoliu102
laoliu102 2017년 12월 19일
댓글: John D'Errico 2017년 12월 20일
Hi, I have two identical overlapping ellipses (one is moved by 0.2 in the y direction). How can I calculate the overlapping area?
I know how to analytically solve the overlapping area of two identical circles, but the analytical solution for two identical overlapping ellipses is very hard to find...Maybe Matlab can do it numerically or by comparing pixels?
My two ellipses are generated using the following code:
a = 1;
b = sqrt(2);
x0=0;
y0=0;
t=-pi:0.01:pi;
x=x0+a*cos(t);
y=y0+b*sin(t);
m1=fill(x,y,'b')
m1.FaceAlpha=0.2;
y01=y0+0.2;
y1=y01+b*sin(t);
hold on
m2=fill(x,y1,'r')
m2.FaceAlpha=0.2;

채택된 답변

John D'Errico
John D'Errico 2017년 12월 20일
편집: John D'Errico 2017년 12월 20일
Pretty simple actually as just a transformation of variables.
You claim to have the analytical solution for a pair of circles, with a simple y offset.
Solve the problem for a pair of circles with unit radius, where one circle is offset in y by a delta of 0.2/b. (.2/b is important here.) Get the area as A_c. (Thus the area of intersection for two circles of radius 1.)
Now, if you implicitly transform the variables such that
X_e = x_c*a
Y_e = Y_c*b
The area of the ellipse intersection will be a*b*A_c.
  댓글 수: 5
laoliu102
laoliu102 2017년 12월 20일
The ellipses are not rotated. The second ellipse only moves a distance in the y direction on the plane where the ellipse sits.
John D'Errico
John D'Errico 2017년 12월 20일
Exactly. Were one of the ellipses rotated, it gets a bit messy. But this case is a simple one.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by