I'm working on a surface etching model for a research project. I want to model a surface by using MATLABs delaunay or delaunayTriangulation functions. I've been able to produce the surface that I want using delaunay, and the following code:
if true[x,y] = meshgrid(0:10,0:10);z = ones(size(x));tri = delaunay(x,y);trisurf(tri,x,y,z);end
Which yields the following surface:
However, the delaunay function will not allow me to access the vertices of the triangles so that I can perform the "etching" reaction. I know that I need to use delaunayTriangulation(). But I'm having trouble reproducing the same results that I have with delaunay(). I've tried this code:
if truex = 0:10;y = 0:10;tri = delaunayTriangulation(x,y);end
It outputs a triangulation that does not have any "Connectivity List" but only a 11:2 double. How can I remedy this, and create a surface similar to that of the delaunay() function? I've also tried using:
if true x = 0:10; y = 0:10; z = ones([1 11]); tri = delaunayTriangulation(x,y,z);end
With the same result. Once I get this going, I'll be inputing a nanoscale scan of a metallic surface so that I can simulate a diffusion reaction. I'm just starting with this, so that I can learn how to manipulate the triangles and the vertices.
Best Answer