Re: Calculating the area of intersection of ellipse and a rectangle
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 17 Mar 2006 15:28:19 -0500
Ivengo wrote:
Calculating the area of intersection of an ellipse and a rectangle
Dear colleagues,
may I ask you if anybody knows about an efficient method or may be
hopefully a formula which allows to calculate the area of the
intersection between an ellipse and a rectangle.
Lets say the ellipse has following characteristics: center
coordinates (Xc, Yc), major axis A, minor axis B. And the rectangle
starts from (0, 0) and one side equals to XR and another side to
YR.
How to calculate the area of the intersection in MatLab
efficiently?
One of the method I tried is to consider all points inside of the
rectangle and check if they belong to the ellipse or not, and based
on that calculate the area.
Any help would be greatly appreciated.
Were I to do it, I'd
1. Convert each object into a polygon, approximating
the ellipse by as many edges as I felt necessary.
2. Find the intersection polygon, by searching for
edge intersections.
3. Use polyarea on the intersection polygon.
Alternatively,
1. Triangulate each object, again, only approximately
for the ellipse.
2. Find the intersection as a triangulation.
3. Compute the area of each triangle.
4. Sum.
HTH,
John D'Errico
.
- References:
- Prev by Date: Calculating the area of intersection of ellipse and a rectangle
- Next by Date: creating a low and high pass filter in matlab
- Previous by thread: Calculating the area of intersection of ellipse and a rectangle
- Next by thread: creating a low and high pass filter in matlab
- Index(es):
Relevant Pages
|