Query regarding 3D mesh-grid

1 次查看(过去 30 天)
Ampi
Ampi 2012-10-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.*___

回答(1 个)

Sean de Wolski
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

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by