How do I create a 2D mesh of triangular elements?

What is the best way to create a 2D mesh of triangular elements given connectivity (T), and x, y coordinates? trimesh function perhaps?

 採用された回答

Matt J
Matt J 2021 年 11 月 22 日

0 投票

Yes. Or triplot().

6 件のコメント

math5217
math5217 2021 年 11 月 22 日
Great, but do you know how T relates to x,y coordinates? Given a connectivity matrix T, x column vector, and y column vector. (e.g. How many rows of T per x and y for each triangular element?)
Matt J
Matt J 2021 年 11 月 22 日
編集済み: Matt J 2021 年 11 月 22 日
For example,
T(j,:)=[2 5 7]
means that the j-th triangle in the mesh will be made up of the vertices (x(2),y(2)) , (x(5),y(5)) , and (x(7),y(7)).
math5217
math5217 2021 年 11 月 23 日
That makes sense. What about meshgrid function? That needs to be used for trimesh.
Matt J
Matt J 2021 年 11 月 23 日
No, it does not.
math5217
math5217 2021 年 11 月 23 日
Got a mesh plot. Thanks for the help.
Matt J
Matt J 2021 年 11 月 23 日
You are quite welcome, but please Accept-click the answer to indicate that your problem has been resolved.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

製品

リリース

R2021b

質問済み:

2021 年 11 月 22 日

コメント済み:

2021 年 11 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by