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

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)).
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.
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