Re: Compute area between curves [message #62882 is a reply to message #62821] |
Mon, 13 October 2008 21:42   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
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." 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.
I still think the original questioner doesn't really know what he
needs yet.
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: cbmarkwardt+usenet@gmail.com
------------------------------------------------------------ --------------
|
|
|