# Revision history [back]

### To find the ordered vertices of the faces of a 3D polyhedron with Vrepresentation

I have this list of vertices of a polyhedron in 3D.

V=[[0.00, 0.00, 2.0],
[1.0, 0.31, 1.0],
[1.2, 0.00, 0.62],
[1.0, 0.00, 0.00],
[0.078, 0.31, 2.0],
[0.00, 0.31, 2.0],
[0.00, 0.62, 0.00],
[0.00, 0.00, 0.00],
[0.00, 0.88, 0.50]]


Thoses vertices define some faces listed in the following list

F= [[0.00, 0.00, 2.0],
[1.0, 0.31, 1.0],
[1.2, 0.00, 0.62],
[1.0, 0.00, 0.00],
[0.078, 0.31, 2.0],
[0.00, 0.31, 2.0],
[0.00, 0.62, 0.00],
[0.00, 0.00, 0.00],
[0.00, 0.88, 0.50]]


Sage is able to gives a list for indexes of vertices wghich belongs to a face :

fC=[[0, 2, 4, 6],
[0, 1, 4, 5],
[0, 1, 2, 3],
[1, 3, 5, 7],
[2, 3, 6, 7],
[4, 5, 6, 7]]


but unfortunately the indices are not necessarily given in the good order that gives the convex hull of each sublist of vertices in fc. I know the adjacency matrix of polyhedron which is

A=[[0 1 1 0 1 0 0 0],
[1 0 0 1 0 1 0 0],
[1 0 0 1 0 0 1 0],
[0 1 1 0 0 0 0 1],
[1 0 0 0 0 1 1 0],
[0 1 0 0 1 0 0 1],
[0 0 1 0 1 0 0 1],
[0 0 0 1 0 1 1 0]]


I am a bad programmer and I do not know how to find the good permutation of the sublist in fc (Perhaps ther is a simple way that the one I suggest). I need help. Thanks in advance.