Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!uakari.primate.wisc.edu!ginosko!uunet!microsoft!kensy From: kensy@microsoft.UUCP (Ken Sykes) Newsgroups: comp.graphics Subject: Re: Need an algorithm to calculate area of polygons Keywords: Polygon, algorithm Message-ID: <7967@microsoft.UUCP> Date: 6 Oct 89 00:23:25 GMT References: <484@ctycal.UUCP> Reply-To: kensy@microsoft.UUCP (Ken Sykes) Organization: Microsoft Corp., Redmond WA Lines: 15 One technique that has been mentioned in the past is to "FloodFill" the area, but instead of drawing the interior points, count them. This will handle all of the irregular areas as well. The two drawbacks to this approach is it *can* be slow and you need to find the interior of the area to use as the seed point for FloodFill. Of course, the areas will have to be closed as well. If you need a faster solution you could ScanConvert the polygons, again counting points instead of plotting them. This could also work for other areas such as arcs, but the ScanConverter would have to be smart enough to deal with non-polygonal areas. ----------------------- Ken Sykes SDE at large.