2D & 3D Delaunay Triangulation of data?
Show older comments
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 true
x = 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.
Accepted Answer
More Answers (1)
John BG
on 8 Feb 2016
if it doesn't work try shaking it:
tri3 = delaunayTriangulation(randperm(11)',randperm(11)',randperm(11)');
now the nodes of tri3 are not empty
while reading d'Errico's approved answer
John does not recommend delaunay for rectangular regular meshes, makes sense.
You may still have to reorder the vertices.
If this answer helps you progress in this tiny step through your nanomachining research, please click on the thumbs-up vote link above, thanks in advance.
John
Categories
Find more on Delaunay Triangulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!