Path: utzoo!utgpu!watmath!watcgl!ksbooth From: ksbooth@watcgl.waterloo.edu (Kelly Booth) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Message-ID: <11926@watcgl.waterloo.edu> Date: 16 Oct 89 03:40:10 GMT References: <761@cwjcc.CWRU.Edu> <22240001@hpsmdca.HP.COM> Reply-To: ksbooth@watcgl.waterloo.edu (Kelly Booth) Organization: U. of Waterloo, Ontario Lines: 22 In article <22240001@hpsmdca.HP.COM> phil@hpsmdca.HP.COM (Philip Walden) 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. >> > If the ABS was not done, would the sign of A also be > an indication of "handedness" of the polygon? Is there > a proof for this? Yes. This was mentioned in the original posting. Newell's formula gives (a,b,c), which is a 3-D vector whose magnitude (absolute value) is the area of the polygon (times two). The direction of the vector is normal to the plane of the polygon, with the convention that the normal points in the direction (handedness) of a point that would view the vertices in a clockwise order of traversal as they are summed in the formula. Look in the appendix to the second edition of Newman and Sproull for more info.