Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!motcsd!hpda!hpcuhb!hp-ses!hpcc01!hpsmdca!phil From: phil@hpsmdca.HP.COM (Philip Walden) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Message-ID: <22240001@hpsmdca.HP.COM> Date: 11 Oct 89 17:02:51 GMT References: <761@cwjcc.CWRU.Edu> Organization: HP Surface Mount Development Center Lines: 20 >> >>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? -------------------------------------------------------------------------- Philip Walden Hewlett Packard Surface Mount Development Center 3500 Deer Creek Road Palo Alto, CA 94304 (415) 857-3899 --------------------------------------------------------------------------