I have a list of vertices and faces which index the vertex:
For example the list of vertices are (x,y,z) :
0 1 0
1 1 1
2 0 1
3 0 0
1 1 2
...
...
...
Faces that index the vertex:
0 1 2
2 3 4
4 0 1
...
...
...
With the list of faces I need to group them up for those that faces are connected to each other. For the first 3 faces I know that they are connected to each other as they have common index. How do I implement an algorithm to do this? thanks.