--- id: triangle version: "20250106" license: LGPL-3.0 license_treatment: copyleft maintenance: dormant --- # triangle — Python binding to the triangle library License: copyleft · Maintenance: dormant · Downloads: 511.1K/mo ## What it is and what it does Triangle is a Python binding to Jonathan Richard Shewchuk's widely-used C library for two-dimensional mesh generation and Delaunay triangulation. It wraps the C API using Cython to provide direct access to quality mesh refinement, constrained triangulation, and Delaunay computation from Python. The package accepts point sets and polygonal regions as input and produces triangulated meshes suitable for finite-element analysis, computational geometry, and spatial subdivision tasks. The package depends only on numpy and is available as precompiled wheels across macOS, Linux, and Windows, making installation straightforward. However, the project is dormant—the last release was in January 2025 and there has been no active maintenance beyond repository preservation, so users should expect limited responsiveness to issues or feature requests. Use it for: - Generate quality meshes for finite-element simulations by refining point sets and constraining boundaries. - Compute Delaunay triangulations of scattered point data for spatial analysis and interpolation. - Triangulate polygonal regions with holes for computational geometry and mesh-based algorithms. - Subdivide planar domains into triangles for numerical methods and geometric processing. - Create constrained Delaunay triangulations that respect user-specified edge and region constraints. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Triangle wraps Jonathan Richard Shewchuk's C library to generate two-dimensional quality meshes and compute Delaunay triangulations from point sets or polygonal regions. Yes, if you need reliable 2D Delaunay triangulation or quality mesh generation: triangle is a mature, well-tested binding to a standard library with no known vulnerabilities and straightforward installation. However, be aware the project is dormant—maintenance is minimal, so plan accordingly if you need active support or encounter bugs. The LGPL-3.0 copyleft license requires careful review if you intend to distribute derivative work. ## Install pip install triangle uv add triangle poetry add triangle ## Installing triangle Before you install: Medium install friction: precompiled wheels available across macOS, Linux, and Windows for multiple Python versions, but the package is dormant with no recent maintenance activity beyond the repository remaining open. License in practice: Licensed under LGPL-3.0 (copyleft): any derivative work or modification must be released under the same license, and linking in a proprietary application may require careful licensing review. Quickstart: import numpy as np import triangle points = np.array([[0, 0], [1, 0], [1, 1], [0, 1]]) A = dict(vertices=points) B = triangle.triangulate(A, 'p') print(B['triangles']) Requires numpy; Python >= 3.7. Verify before relying: - Whether the wrapped triangle library version and its mesh quality guarantees are documented. - Performance characteristics and scalability limits for large point sets or complex polygons. - Active maintenance status: last commit is recent (2025-01-07) but maintenance is marked dormant. ## Package facts - License: LGPL-3.0 (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 511.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags delaunay triangulation python, mesh generation 2d, quality mesh generator, computational geometry triangulation, polygon triangulation library, constrained delaunay triangulation, mesh refinement, computational-geometry, mesh-generation, delaunay [View on SkillFed](https://skillfed.io/packages/triangle) · [View on PyPI](https://pypi.org/project/triangle/)