nextdrei - Neighbour analysis of triangles and voronoy diagram
If only the index matrix of delaunay points is given, then you get the neighbourmatrix of the delaunay triangles. If you use complex points as input argument, and you have less than two output arguments, then you will see also a graphical display of delaunay lines and voronoy diagram.
Triangulation works fine with irregualry spaced points. When you have installed the metanet toolbox, then you do not really need this function.
p=rand(1,20,'normal') + %i .*rand(1,20,'normal'); [Q,vl,dl]=nextdrei(p); plot2d(real(p),imag(p),style=-3); // Now, Voronoy Lines will be drawn plot2d(real(vl),imag(vl),style=2*ones(1,size(vl,2))); // Now, Delaunay Triangles will be drawn plot2d(real(dl),imag(dl),style=3*ones(1,size(dl,2))); xclick(); xbasc(); TRI1=delaunay(p); Q=nextdrei(TRI1);
delaunay ,