Query regarding 3D mesh-grid
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
**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 commentaires
Réponses (1)
Sean de Wolski
le 30 Oct 2012
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 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!