Hi all,
I have recently released the first major version of my package DelaunayTriangulation.jl, a package for computing Delaunay triangulations and Voronoi tessellations in two dimensions. The most important new feature here is the ability to now triangulate and refine domains defined by curves rather than only piecewise linear boundaries. Thus, the packageβs major features are now:
- Unconstrained and constrained triangulations.
- Mesh refinement, with support for generic constraints.
- Voronoi tessellations.
- Voronoi tessellations clipped to a rectangle or to the convex hull.
- Centroidal Voronoi tessellations.
- Triangulations of curve-bounded domains.
More features are listed in the README and in the documentation. In addition to this new feature of curve-bounded domains, the documentation has been completely rewritten and should hopefully be a lot easier to navigate. I give some better examples of using the code, some example applications, and give better details of the mathematics involved.
The curves I provide support for are:
BSpline
BezierCurve
CircularArc
CatmullRomSpline
LineSegment
EllipticalArc
But you can also define your own; see the docstring for DelaunayTriangulation.AbstractParametricCurve
or the docs.
Here is an example of triangulating and refining a domain defined by an annulus.
using DelaunayTriangulation
using CairoMakie
Rβ = 1.0
Rβ = 2.0
outer_circle = CircularArc((Rβ, 0.0), (Rβ, 0.0), (0.0, 0.0))
inner_circle = CircularArc((Rβ, 0.0), (Rβ, 0.0), (0.0, 0.0), positive=false)
points = NTuple{2,Float64}[]
tri = triangulate(points; boundary_nodes=[[[outer_circle]], [[inner_circle]]])
A = 2Ο * (Rβ^2 - Rβ^2)
refine!(tri; max_area=2e-3A, min_angle=33.0)
fig, ax, sc = triplot(tri)
fig
If you want some more examples other than just those in the docs, I will soon be updating FiniteVolumeMethod.jl to use these new curve-bounded domains rather than e.g. manually discretising a circle and triangulating that
Many other improvements have been made. For example, you no longer need to do check_args=false
for more complicated domains, as I have now implemented an automatic way for the package to check that your domain is valid even with nested domains and disjoint domains. The public API has now also been fully defined for the first time. See the full changelog here.