MESH2D: Delaunay-based unstructured mesh-generation
Updated 27 Mar 2021
MESH2D is a MATLAB-based Delaunay mesh-generator for two-dimensional geometries. It is designed to generate high-quality constrained Delaunay triangulations for general polygonal regions in the plane. MESH2D provides simple and yet effective implementations of "Delaunay-refinement" and "Frontal-Delaunay" triangulation techniques, in additional to "hill-climbing" type mesh-optimisation. Support for user-defined "mesh-spacing" functions and "multi-part" geometry definitions are provided, allowing varying levels of mesh-resolution to be specified within complex domains. Algorithms implemented in MESH2D are "provably-good" - ensuring convergence, geometrical and topological correctness, and providing guarantees on algorithm termination and worst-case element quality bounds. MESH2D typically generates very high-quality output, appropriate for a variety of finite-volume/element type applications.
See TRIDEMO to get started with a set of example problems:
tridemo(0); % a very simple example to get everything started.
tridemo(1); % investigate the impact of the "radius-edge" threshold.
tridemo(2); % Frontal-Delaunay vs. Delaunay-refinement algorithms.
tridemo(3); % explore impact of user-defined mesh-size constraints.
tridemo(4); % explore impact of "hill-climbing" mesh optimisations.
tridemo(5); % assemble triangulations for "multi-part" geometries.
tridemo(6); % assemble triangulations with "internal" constraints.
tridemo(7); % investigate the use of "quadtree"-type refinement.
tridemo(8); % explore use of custom, user-defined mesh-size functions.
tridemo(9); % larger-scale problem, mesh refinement + optimisation.
tridemo(10); % medium-scale problem, mesh refinement + optimisation.
Additional information and references are available via the GitHub repository: http://github.com/dengwirda/mesh2d.
MESH2D is a simplified version of my three-dimensional mesh-generation algorithm JIGSAW, providing an implementation of "provably-good" Delaunay-refinement and Frontal-Delaunay triangulation techniques. JIGSAW is available here: http://github.com/dengwirda/jigsaw-matlab.
MESH2D also makes use of my AABBTREE and FINDTRIA packages to compute efficient spatial queries and intersection tests. See http://github.com/dengwirda/aabb-tree and http://github.com/dengwirda/find-tria for details.
D. Engwirda, Locally-optimal Delaunay-refinement and optimisation-based mesh generation, Ph.D. Thesis, School of Mathematics and Statistics, The University of Sydney, http://hdl.handle.net/2123/13148, 2014.
D. Engwirda, Unstructured mesh methods for the Navier-Stokes equations, Honours Thesis, School of Aerospace, Mechanical and Mechatronic Engineering, The University of Sydney, 2005.
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
- Mathematics and Optimization > Mapping Toolbox > Map Display >
- Radar > Mapping Toolbox > Map Display >
- MATLAB > Mathematics > Computational Geometry > Delaunay Triangulation >
Inspired by: FINDTRIA - Point-in-Simplex queries in d-dimensions., AABBTREE - A d-dimensional bounding-box tree.
Inspired: Im2mesh (2D image to triangular meshes), Remove Unconnected Triangle, FGT - Fold Geometry Toolbox, Accelerating Finite Element Analysis (FEA) in MATLAB
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
Updates to description/references.
Updates to the underlying AABB-Tree package.
Updates to 3.0.2: added TRIDIV2, improved REFINE2 / SMOOTH2, new examples in TRIDEMO.
Update project title.
Major updates all-round for MESH2D - 3.0.0.