Re: Compute area between curves [message #62877 is a reply to message #62821] |
Tue, 14 October 2008 03:16   |
jameskuyper
Messages: 79 Registered: October 2007
|
Member |
|
|
Craig Markwardt wrote:
> James Kuyper <jameskuyper@verizon.net> writes:
>> A more general approach would would work regardless of the shapes of
>> the two curves. Just connect the two curves to create a single
>> combined curve that starts by listing all the points on one curve in
>> clockwise order, then continues by listing all of the points of the
>> other curve in counter-clockwise order. As a result, the combined
>> curve encloses the area that lies between the two curves. Then use
>> POLY_AREA to calculates the area enclosed by the combined curve.
> ...
>
> James, I had that thought as well, but I believe POLY_AREA will not
> work as expected. When a polygon's edges self-intersect, then the
> polygon is no longer "simple."
As I understand it, the curves involved are sections of two
non-intersecting ellipses, with the smaller enclosed entirely in the
larger one. Connecting the curves as I suggest would create a simple
closed curve, with no intersections.
> In that case, the POLY_AREA method
> will compute the *signed* total area. Polygonal segments where the
> path traverses clockwise will contribute in a positive sense, and
> counter-clockwise in the negative sense. The result will not be the
> 'total' area as we commonly expect, but some kind of non-intuitive
> 'net' area.
In a sense, a 'net' area is precisely what we want, and the fact that
this is the case seems quite intuitive to me. If the OP had two complete
ellipses, then as I understand it, what he wants is the area of the
larger ellipse minus the area of the smaller ellipse. If he were to
follow my suggestion with two full ellipses, that's precisely the
quantity that POLY_AREA should calculate.
|
|
|