Query regarding 3D mesh-grid
1 回表示 (過去 30 日間)
古いコメントを表示
**Hello, I have a question regarding 3D meshes. Say i have plotted a meshgrid using the following command:-
x=rand(1000,1)-1;
y=rand(size(x))-1;
z=sin(2*(x.^2+y.^2));
[xx,yy]=meshgrid(linspace(-1,1,32));
griddata(x,y,z,xx,yy);
My question is what is the matlab command except trisurf,patch that could be used to display/plot particularly the vertices,triangles and polygons that make up this mesh? Any help regarding this question would be appreciable.*___
0 件のコメント
回答 (1 件)
Sean de Wolski
2012 年 10 月 30 日
You don't know these vertices! Is vertex 1 connected to vertex 47 or 598 or 32 and 981? You need to come up wiht a way to determine these polygons.
A Delaunay Triangulation is one method of doing this, i.e. it has a bunch of constraints, vertices who meet these constraints with one another are used to form triangles.
Delaunay triangulation may work for you in which case you could use triplot/trisurf etc.
doc DelaunayTri
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Triangulation Representation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!