Triangle.NET

Written by

in

Triangle.NET is an open-source C# library designed to generate 2D Delaunay triangulations, constrained Delaunay triangulations, and high-quality triangular meshes. Originally developed by Christian Woltering, it is a direct .NET port of Jonathan Richard Shewchuk’s famous, highly robust C-based Triangle engineering tool.

Developers heavily rely on it for structural analysis, game development, geography tools, and physics simulations. Key Features

Advanced Triangulation: Easily processes 2D point sets and complex Planar Straight Line Graphs (PSLG).

Quality Mesh Generation: Refines meshes automatically by conforming to custom minimum/maximum angle constraints and triangle area limits.

Mesh Smoothing & Refinement: Implements built-in algorithms (like Lawson’s flip and vertex smoothing) to eliminate skinny, low-quality triangles.

File Interoperability: Natively reads and writes standard Triangle format files, including .node, .poly, and .ele configurations.

Mesh Explorer: Includes a graphical tool to visualize meshes, display Voronoi diagrams, and export layouts directly to .png, .eps, or .svg formats. Common Use Cases

Unity Game Development: Custom terrain generation, procedural mesh slicing, and dynamic pathfinding navmeshes.

Finite Element Analysis (FEA): Breaking down complex 2D shapes into a triangular grid for heat, stress, or fluid dynamics simulation.

Geospatial Processing: Generating Triangulated Irregular Networks (TIN) from LiDAR point clouds to map digital elevation models. Project Status & Source Code

The original CodePlex repository is archived, but the active community relies on updated forks:

The wo80/Triangle.NET GitHub Repository contains modern, actively maintained updates compatible with current .NET versions.

The garykac/triangle.net GitHub Repository hosts a preserved snapshot containing the original documentation, wiki files, and migration guides. If you are planning to use this library, let me know:

What framework are you targeting? (e.g., modern .NET ⁄10 or a Unity environment)

What type of data are you trying to triangulate? (e.g., random point clouds or complex polygons with holes)

I can provide a tailored C# code example to help you get started! Snapshot of Christian Woltering’s Triangle.NET (with docs)

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *