To generate vertice mesh from a series of contours
Show older comments
Hello,
As beginner in MATLAB, now I have a series of contours, which define a structure. On each contour there are isolated points whose cartesian coordinates are known. Now I would like to generate a mesh from these contours (or points). The MyRobustCrust.m from file exchange does generate a mesh with faces, but without vertices' coordinates. And the vertices are needed for my calculation.
Does any one have any hints? Thank you very much.
Erhong
Accepted Answer
More Answers (1)
Jiexian Ma
on 12 Apr 2025
Edited: Jiexian Ma
on 12 Apr 2025
0 votes
If you plan to work with 2D finite element mesh, the following methods may be helpful.
- Method 1. Create geometry from contour vertices via Constructive Solid Geometry and obtain mesh via PDE toolbox. Darova's answer used this method.
- Method 2. Create geometry from contour vertices via polyshape and generate mesh via Im2mesh package.
Personally, I perfer method 2 because you can edit polyshape object easily.








You could check demo14 to demo17 in Im2mesh package. I provide a few examples.
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!