필터 지우기
필터 지우기

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