Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!microsoft!davidle From: davidle@microsoft.UUCP (David Levine) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Message-ID: <8115@microsoft.UUCP> Date: 19 Oct 89 21:56:47 GMT References: <484@ctycal.UUCP> <2060@levels.sait.edu.au> Reply-To: davidle@microsoft.UUCP (David Levine) Organization: Microsoft Corp., Redmond WA Lines: 17 The "Newell" algorithm is based on Green's theorem which you can find in many mathematics books. It basically turns an integral over an area into an integral over a contour. I don't have the book in my office but I can provide the algorithm to you. For the case of a polygon in the X-Y plane, it does indeed reduce to Newell's algorithm. You can use Greens theorem to calculate the area of a figure with curved edges but the resulting formula is, of course, more complex. I have used Greens theorm to derive Newell's algorithm and also to derive formulas for center of mass and moment/product of inertia. The method works for arbitrary polygons (convex/concave). In the area case, the "equation" being integrated over the area of the polygon is just the constant "1". David Levine