Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!watmath!watcgl!ksbooth From: ksbooth@watcgl.waterloo.edu (Kelly Booth) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Keywords: Polygon, algorithm Message-ID: <11780@watcgl.waterloo.edu> Date: 5 Oct 89 18:56:55 GMT References: <484@ctycal.UUCP> <619@cditi.UUCP> <6059@tekgvs.LABS.TEK.COM> Reply-To: ksbooth@watcgl.waterloo.edu (Kelly Booth) Organization: U. of Waterloo, Ontario Lines: 11 In article <6059@tekgvs.LABS.TEK.COM> jackg@tekirl.LABS.TEK.COM (Jack Gjovaag) writes: > >A = abs(sum (i=1 to n) (x(i+1)-x(i))*(y(i+1)+y(i))/2) > This is Newell's formula (with the abs and the /2 added). The general form works in 3-D and computes three terms which are the components of a vector whose magnitude (abs again) is the area. The formula does have meaning if the edges cross in the sense that it subtracts out areas.