# DistMesh: High-Quality Unstructured Mesh Generation for Implicit Geometries

DistMesh is a simple MATLAB code for generation of unstructured triangular and tetrahedral meshes. The geometries are specified by implicit functions, with negative sign inside the region and positive outside. DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimize the node locations by a force-based smoothing procedure. The topology is regularly updated by Delaunay. The boundary points are only allowed to move tangentially to the boundary by projections using the implicit function. This iterative procedure typically results in very well-shaped meshes.

The importance of good unstructured mesh generators cannot be overstated. Essentially every finite element software package used in industry and academia is based on the efficient generation of meshes directly from CAD geometries, with applications in areas such as solid mechanics, fluid dynamics, electromagnetics, etc. The high impact of DistMesh is primarily due to (1) its ability to handle implicit geometries, which allows for meshing of MRI/CT images and connections to the level set method, (2) the high-quality of the mesh elements, which is particularly important to avoid inversion with moving and deforming meshes, and (3) the simplicity of the method, which has an educational benefit and has inspired a large number of researchers and engineers to make improvements to the algorithm.

DistMesh is widely used in many different fields---the original paper has been cited by 162 journal articles, it has been rewritten by independent developers in a number of other languages, including C, C++, C#, Fortran 77/90, Python, Mathematica, Octave, and it is being used in many computational books and university courses.