Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!cditi!josh From: josh@cditi.UUCP (Josh Muskovitz) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Summary: it should be easy Keywords: Polygon, algorithm Message-ID: <619@cditi.UUCP> Date: 4 Oct 89 16:46:09 GMT References: <484@ctycal.UUCP> Organization: CDI Technologies Inc., Grand Rapids, MI Lines: 25 In article <484@ctycal.UUCP>, ingoldsb@ctycal.COM (Terry Ingoldsby) writes: # I need an algorithm that will calculate (quickly) # the area of an arbitrary polygon. It would be *nice* if it could # handle objects that include arcs, instead of lines for the edges of # the `polygon'. I have to be able to handle complicated cases like # # *--------------------------* # | *________________| # | | # | *_______* # | / # *_____* / # / / It's hard to draw diagonal lines! # */------* # # -- # Terry Ingoldsby ctycal!ingoldsb@calgary.UUCP You should be able to pick an arbitrary point in the plane, and build a list of triangles from every pair of adjacent endpoints. The trick is determining whether to add or subtract the area of the tirangle from the ongoing subtotal. Does anyone have an easy way to determine this? josh @ uunet!cditi