Triangulation Port

April 20, 2023 ยท View on GitHub

Complex polygon triangulation, tessellation and split into convex polygons. A fast O(n*log(n)) algorithm based on "Triangulation of monotone polygons". The result can be represented as a Delaunay triangulation.

Delaunay triangulation

Triangulation with extra points

Tessellation

Centroid net

Features

๐Ÿ’ก Fast O(n*log(n)) algorithm based on "Triangulation of monotone polygons"

๐Ÿ’ก All code is written to suit "Data Oriented Design". No reference type like class, just structs.

๐Ÿ’ก Supports polygons with holes

๐Ÿ’ก Supports plain and Delaunay triangulation

๐Ÿ’ก Supports tesselation

๐Ÿ’ก Supports building centroid net

๐Ÿ’ก Same points is not restricted

๐Ÿ’ก Polygon must not have self intersections

๐Ÿ’ก Use integer geometry for calculations

๐Ÿ’ก More then 100 tests

Installation

To use iShape.Triangulation in your Unity project, follow these steps:

Demo

The TriangulationDebug project is a samll demo project with some showcases.