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:
- Open your Unity project.
- In the top menu, select "Window" > "Package Manager".
- Click on the "+" button in the top-left corner of the Package Manager window.
- Select "Add package from git URL...".
- Enter the following URL: https://github.com/iShapeUnity/Geometry.git
- Click the "Add" button.
- Wait for the package to be imported.
- After repeat all for https://github.com/iShapeUnity/Triangulation.git
Demo
The TriangulationDebug project is a samll demo project with some showcases.