I have a polyhedron which is defined by a series of vertices, which are vectors in R^3, and triangular faces, which are defined by a mapping of the three vertices which define the face.
As an example, here is V and F
V=[-0.8379 0.1526 -0.0429;
-0.6595 -0.3555 0.0664;
-0.6066 0.3035 0.2454;
-0.1323 -0.3591 0.1816;
0.1148 -0.5169 0.0972;
0.2875 -0.2619 -0.3980;
0.2995 0.4483 0.2802;
0.5233 0.2003 -0.3184;
0.5382 -0.3219 0.2870;
0.7498 0.1377 0.1593]
F=[2 3 1;
7 3 4;
3 2 4;
7 9 10;
10 8 7;
9 5 6;
9 8 10;
1 6 2;
7 8 1;
2 6 5;
8 9 6;
5 9 4;
9 7 4;
4 2 5;
7 1 3;
6 1 8]
Euler's formula gives the relationship between face, edges, and vertices
V-E+F = 2
I'm trying to find the unique set of edges of the polyhedron from the vertices. I can already find all edges for each face (3 edges per face and every edge is a member of two adjacent faces) by doing the following
Fa = F(:,1);
Fb = F(:,2);
Fc = F(:,3);
e1=V(Fb,:)-V(Fa,:);
e2=V(Fc,:)-V(Fb,:);
e3=V(Fa,:)-V(Fc,:);
However, this finds all the edges for each face and includes duplicates. An edge, e_i on Face A, is also -e_i on Face B.
Anyone have a good method of finding the unique set of edges (positive and negative directions), or determining a mapping within e1,e2,e3 that links the positive edge to it's negative?