Introduction
This is the documentation for DelaunayTriangulation.jl. Click here to go back to the GitHub repository.
This is a package for computing Delaunay triangulations and Voronoi tessellations of points in two dimensions, amongst many other features:
- Unconstrained and constrained Delaunay triangulations, supporting many types of domains.
- Computation of Voronoi tessellations, clipped Voronoi tessellations where the Voronoi tiles get clipped to the convex hull, and centroidal Voronoi tessellations where each Voronoi tile's generator is the tile's centroid.
- Mesh refinement, with support for custom angle and area constraints, as well as refinement of curve-bounded domains.
- Dynamic point insertion, point deletion, and segment insertion, amongst many other operations.
- Computation of convex hulls.
- Triangulation of convex polygons.
- Point location.
- Computation of the pole of inaccessibility.
- The interface for defining geometric primitives is fully customisable.
To ensure that the algorithms are robust, by default we make use of AdaptivePredicates.jl to use adaptive arithmetic for all geometric predicates in this package. This choice can be configured, allowing for the additional choices of ExactPredicates.jl or no adaptive or exact arithmetic at all; see here. Much of the work in this package is derived from the book Delaunay Mesh Generation by Cheng, Dey, and Shewchuk (2013).
Documentation Structure
The documentation for this package is broken into several sections.
- Tutorials: These are examples that introduce the functionality of the package, demonstrating how to perform many operations.
- Manual: Some particular descriptions of how certain things work in the package, such as representing boundaries and working with the triangulation and tessellation data structures.
- API Reference: This section lists docstrings for all functions in the public API.
- Extended Reference: This section is for providing more details about the internals of the package, meaning not in the public API.The material in this section is subject to change across any version, but may be useful for you to understand how certain functions work. For example, all utility functions are documented here.
- Mathematical Details: This section is for describing in detail the mathematics that underpins the algorithms in this package, for example walking you through the theory behind the algorithm for computing constrained Delaunay triangulations.
- Example Applications: In case you want to use this package for some of your applications, it might be useful to see how it has been applied in certain situations. Only a few applications are considered here, but more could be added in the future.
- Terminology: This section provides a short description of some of the terminology used throughout the package.
If you see anything missing in any of these sections, or anything you think could be improved, feel free to file an issue.
Citing DelaunayTriangulation.jl
If you use DelaunayTriangulation.jl, please cite it. For now, we have a Zenodo record available at 10.5281/zenodo.7456989.
Installation
You can install DelaunayTriangulation.jl using the package manager:
import Pkg
Pkg.add("DelaunayTriangulation")
Alternatively, the Pkg REPL can be used (accessed by typing ]
at the julia>
prompt):
pkg> add DelaunayTriangulation
License
DelaunayTriangulation.jl is provided under a MIT license.
Similar Packages
This is not the only package available in Julia for working with Delaunay triangulations and Voronoi tessellations, although DelaunayTriangulation.jl is currently the most developed native Julia package available. Some other packages are:
- VoronoiDelaunay.jl: A pure Julia library that constructs planar triangulations and tessellations like in this package, although no support for constrained triangulations / mesh refinement or clipped / centroid tessellations. Restricts points to $[1, 2] \times [1, 2]$.
- VoronoiCells.jl: A pure Julia library that extends VoronoiDelaunay.jl. This package provides useful tools for constructing and working with Voronoi tessellations. Supports clipping Voronoi cells to a specified rectangle. Like VoronoiDelaunay.jl, restricts points to $[1, 2] \times [1, 2]$.
- Delaunay.jl: Wraps Python's main Delaunay triangulation library,
scipy.spatial.Delaunay
, for computing Delaunay triangulations in $\mathbb R^N$. Constrained triangulations or mesh refinement are not available here. - MiniQhull.jl: Wraps Qhull for computing unconstrained Delaunay triangulations in $\mathbb R^N$. No support is provided for mesh refinement.
- DirectQhull.jl: Similar to MiniQhull.jl, although also provides support for convex hulls and Voronoi tessellations from Qhull.
- Delaunator.jl: A pure Julia library modelled after the JavaScript Delaunator library. This package can construct unconstrained triangulations of planar point sets. No support is available for constrained triangulations or mesh refinement, although support exists for computing the dual Voronoi tessellation. Centroidal tessellations are not implemented, although the Voronoi cells can be clipped to a bounding box.
- TriangleMesh.jl, Triangulate.jl, Triangle.jl: Interfaces to Shewchuk's Triangle library.
- TetGen.jl: This is for Delaunay tetrahedralisation, wrapping TetGen.
- Quickhull.jl: A pure Julia library for unconstrained triangulations, Voronoi tessellations, and convex hulls in $N$ dimensions.