Home

Awesome

hxGeomAlgo

Small collection of computational geometry algorithms in Haxe.

<sup>swf demo | js demo</sup>

Marching Squares (Contour Tracing)

Based on:

Ramer-Douglas-Peucker (Polyline Simplification)

Based on:

Ear Clipping (Triangulation and Poly Decomposition w/ Hole Support)

Based on:

Bayazit (Poly Decomposition)

Based on:

Visibility Polygon and Homogeneous Coords (2D)

Based on:

Snoeyink-Keil (Minimum Convex Decomposition)

Based on:

Connected Components Labeling and Contour Tracing (w/ Hole Support)

Based on:

Visvalingam-Whyatt (Polyline Simplification)

Based on:

Tess2 (Tesselation to Triangles and Convex Polygons, Poly Boolean Ops)

Based on:

IsoContours (Contour Tracing)

Based on:

Hertel-Mehlhorn (Convex Polygons from Arbitrary Triangulation)

Based on:

Chaikin (Recursive Curve Smoothing)

Based on:

Wu-Yong-Zhang-Zhang (Multi-step Chaikin Curve Smoothing)

Based on:

Dependencies

The only dependency is hxPixels, and only for the algorithms needing access to pixels.

Usage

Code is extensively doc-commented, and I tried my best to make it easy/intuitive to use. You can also take a look at the demo for a quick overview on how to use the different classes.

Credits

hxGeomAlgo is based on the work of many developers and it wouldn't exist if it weren't for them. See the CREDITS file for details.

License

hxGeomAlgo is developed by Giuseppe Di Mauro (azrafe7) and released under the MIT license (except for Tess2.hx, which is licensed under SGI B 2.0). See the LICENSE file for details.