# Matlab - Add/Remove edges in delaunay triangulation

• Jul 15th 2010, 09:28 AM
faisalpias
Matlab - Add/Remove edges in delaunay triangulation
I want to do the following:

1. Construct Delaunay Triangulation dt

I used the following code for basic triangulation

x = rand(10,1);
y = rand(10,1);
dt = DelaunayTri(x,y)
triplot(dt);

2. Remove edges from specific nodes in dt if node degree > D
(By node degree, I mean the number number of edges connected to each vertex of triangle.)

3. Add edges to specific nodes in dt if node degree < D

If removing or adding edges spoil the triangulation than it will not be a problem for me. I want to use the final pattern as a topology of my free space optical sensor network.

If removing an edge from one point lowers the degree of the other end, it's also fine.

In case of a vertex having too great a degree than expected, the edge removal will be done in this way: the longest edge will be removed first, and so on.

In case of adding edges to a node where the degree is low, it will be connected to another neighbor node who is also short in degree. If every possible neighbor node has satisfactory degree, than I may just leave the node with it's lower degree.

*** It may sound weird, but I need the final diagram only for a topology design. It doesn't have to look like a triangulation at the end.

If anyone can help, it will be highly appreciated.

-Faisal
• Jul 16th 2010, 11:09 PM
elbarto
I think you will need to do this in two parts.

1) Create a plot with all "node degree > D" and set its edge color to None
2)Create a plot with all "node degree < D" and set its edge color to what ever you want
Using "hold" to combine the two plots.

The issue will be that you will need to first do the Delaunay triangulation then sort out what data needs to go in what plot (ie you will need to use some of the same nodes in each plot, you cant simply treat it as two separate triangulations).

Let us know how you get on.

Regards Elbarto