as3GeomAlgo is a small collection of geometry algorithms. It contains the implementation of several methods able to create a geometric representation of an image, e.g. fill an image with triangles. This library is useful to be used in a GPU powered workflow.
Among the implemented methods, the library has Marching Squares, Ramer-Douglas-Peucker, Ear Clipping and Bayazit PolyDecomp. The library is a port of the hxGeomAlgo, the Haxe version which is based on implementations in several different languages.
Sample
var originalBMD :BitmapData = Bitmap(new ASSET()).bitmapData; var clipRect:Rectangle = originalBMD.rect; var marchingSquares :MarchingSquares = new MarchingSquares(originalBMD, 1, clipRect); var perimeter :Vector = marchingSquares.march(); addChild(getTextField("MarchSqrs\n" + perimeter.length + " pts", x, y));