×

A simple mesh generator in MATLAB. (English) Zbl 1061.65134

Summary: Creating a mesh is the first step in a wide range of applications, including scientific computing and computer graphics. An unstructured simplex mesh requires a choice of meshpoints (vertex nodes) and a triangulation. We want to offer a short and simple MATLAB code, described in more detail than usual, so the reader can experiment (and add to the code) knowing the underlying principles. We find the node locations by solving for equilibrium in a truss structure (using piecewise linear force-displacement relations) and reset the topology by the Delaunay algorithm.
The geometry is described implicitly by its distance function. In addition to being much shorter and simpler than other meshing techniques, our algorithm typically produces meshes of very high quality. We discuss ways to improve the robustness and the performance, but our aim here is simplicity. Readers can download (and edit) the codes from http://math.mit.edu/persson/mesh.

MSC:

65N50 Mesh generation, refinement, and adaptive methods for boundary value problems involving PDEs
65D18 Numerical aspects of computer graphics, image analysis, and computational geometry

Software:

DistMesh; Matlab
PDF BibTeX XML Cite
Full Text: DOI