Xref: utzoo comp.sys.sgi:8079 comp.graphics:15759 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ukma!usenet.ins.cwru.edu!agate!ucbvax!bloom-beacon!mintaka!daemon From: andru@electron.lcs.mit.edu (Andrew Myers) Newsgroups: comp.sys.sgi,comp.graphics Subject: Re: Area of a Polygon Keywords: area,polygon,arbitrary,overlay Message-ID: <1991Feb4.184618.10335@mintaka.lcs.mit.edu> Date: 4 Feb 91 18:46:18 GMT References: Sender: daemon@mintaka.lcs.mit.edu (Lucifer Maleficius) Followup-To: comp.graphics Distribution: usa Organization: MIT Laboratory for Computer Science Lines: 21 In article psomu@pilot.njin.net (Prabhakar Somu) writes: >Hi, > > I am trying to find the area of an arbitrarily shaped polygon >drawn on the overlay plane on a 4D 70GT(running Irix 3.2). [...] There's no need to use graphics to find the area of a polygon. Given Xi, Yi, the area is sum from i=1,n with j=i+1 except j=1 when i=n: (1/2) (Xj Yi - Xi Yj) Of course, the 1/2 can be factored out. This will give negative values for clockwise polygons, if I've got the signs right, so take the absolute value if appropriate. Andrew