How can I generate a mesh of quadrilaterals for a given 2D surface using MATLAB?
Show older comments
Does somebody know, how to simply and theoretically generate a mesh of quadrilaterals on a given surface?
The surface is in the x,y-plane and might also have curved borders.
I have searched on google and found like tons and tons of informations and also free software to take over this Job, but I really would like to know, how I can generate a mesh of quadrilateral elements which corresponds to a given surface just on my own.
So where is the best place to start? I need to develop my own understanding and also my own spaghetti code for this task.
Given the borders of and the interior of a 2D surface, how or where should I start in order to get my 'new' vertices on the interior of the surface? How do I know, how many quadrilateral elements and corresponding vertices do I need?
Thank you for your help and support in advance.
Regards
Ahmed Hossam
1 Comment
Ahmed Hossam
on 30 Mar 2017
Accepted Answer
More Answers (1)
Jiexian Ma
on 7 Mar 2025
Edited: Jiexian Ma
about 2 hours ago
0 votes
A general way is using Gmsh to generate quasi-structured or unstructured quadrilateral mesh.
In Im2mesh (an open-source Matlab package), I demostrate how to define 2d geometry in Matlab and then generate unstructured quadrilateral mesh via Gmsh.

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!