- triplot - Used to plot a 2D triangular mesh based on the input x,y co-ordinates & a triangulation object.
- delaunayTriangulation - We can specify few edge constraints on how a triangulation object is to be created based on which the triangular mesh is plotted.
Creating a 2D mesh on a given boundary
29 views (last 30 days)
Fabrizio Bernardi on 14 Oct 2021
Hello, I wanted to ask how to create a triangular mesh in a delimited region. I have a vector of points x and y delimiting all the point, I constructed the region boundary using
k = boundary(x,y);
and I can see the plot of my boundary with
How do i create a triangular mesh of a specific h size covering this region?
Thanks for your help!
Pavan Guntha on 22 Oct 2021
You could use 'triplot' function with an appropriate triangulation object to plot the triangular mesh. An illustration on how can we draw a triangular mesh onto a random shape is shown below:
P = rand(10,2);
K = boundary(P(:,1), P(:,2));
T = delaunayTriangulation(P);
The random shape & triangular mesh are as follows:
For more information you could look at the following documentation pages:
Hope this helps!