Home

Awesome

dart_earcut

Ear-clipping (earcutting) triangulation algorithm, ported (with minor API differences) from earcut4j/earcut4j and mapbox/earcut. Also includes the fix from mapbox/earcut#91.

Usage

The Algorithm

The library implements a modified ear slicing algorithm, optimized by z-order curve hashing and extended to handle holes, twisted polygons, degeneracies and self-intersections in a way that doesn't guarantee correctness of triangulation, but attempts to always produce acceptable results for practical data.

It's based on ideas from FIST: Fast Industrial-Strength Triangulation of Polygons by Martin Held andTriangulation by Ear Clipping by David Eberly.