Re: Compute area between curves [message #62959 is a reply to message #62877] |
Tue, 14 October 2008 09:59   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
James Kuyper <jameskuyper@verizon.net> writes:
> 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.
Assuming the poster knows what he wants to do, he said,
: I am trying to calculate how much of an error there is between two
: rings. I have two images each with a ring pictured in these two
: images.
[ And then goes on to describe how the two traces are computed by
different methods. ] In my mind, the two traces are measures of
essentially the *same* phenomenon, and he's trying to measure the
areal difference between these two different representations of the
same curve. I assumed this was some attempt to estimate the
uncertainty of some modeling method.
In fact, if you look at the image links the original poster provides,
the curves *are* intersecting. There is primarily a translation
offset, which causes them to intersect near the apex. So again, I'm
left with the quandry that either, (a) POLY_AREA isn't providing
what's needed, or (b) the poster needs to understand what he *really*
wants to do.
>> 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.
Yes, assuming they don't intersect (which they do).
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: cbmarkwardt+usenet@gmail.com
------------------------------------------------------------ --------------
|
|
|