Ask Your Question
1

How to obtain the vertices of the faces of a polyhedron in the cycling order ?

asked 2021-06-08 16:21:24 +0100

Cyrille gravatar image

I wanted to transfer informations from sagemath to Asymptote and draw the faces of a dodecahedron. So according to the documentation I code

Dodec=polytopes.dodecahedron()
F1 = Dodec.faces(2)
fa=[f.ambient_V_indices() for f in F1]
fa
Vdodec=Dodec.Vrepresentation()
Sdodec=[(round(Vdodec[i][0],2),round(Vdodec[i][1],2),round(Vdodec[i][2],2)) for i in range(len(Vdodec))]
show("fa= ",fa)
show("points = ",Sdodec)

If I have understood the documentation fa gives the vertices implied in a face. Those vertices are numbered according to the order of the Vrepresentation() of Dodec as written in the doc :

"The faces are printed in shorthand notation where each integer is the index of a vertex/ray/line in the same order as the containing Polyhedron’s Vrepresentation()". So (15,16,17,18,19) is a face composed of the points :

p15=(-0.76, 0.76, -0.76),
p16=(-0.76, -0.76, -0.76),
p17=(-1.24, 0.47, 0.0),
p18=(-1.24, -0.47, 0.0),
p19=(-0.47, 0.0, -1.24),

And this is true. But here comes the problem : as I understand it, the face should be the closed cycle p15--p16--p17--p18--p19. But transfered in Asymptote, I discovered that the true order should be p15--p19--p16--p18--p17. The same type of error seems to be the case for each face (good composition but bad order).

So here is my question : is there a command which gives the good order of the vertices which define a face or is it an error because the vertices should be given in the good order ?

(Hope that this time there is no element missing in the code)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-06-08 20:46:26 +0100

FrédéricC gravatar image
edit flag offensive delete link more

Comments

The suggestion is a good start but not the way to find it. If some one is interested I have a solution.

Cyrille gravatar imageCyrille ( 2021-06-15 16:08:53 +0100 )edit

@Cyrille -- it's a good idea to post your solution as an answer.

slelievre gravatar imageslelievre ( 2021-06-19 16:19:46 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-06-08 16:21:24 +0100

Seen: 224 times

Last updated: Jun 08 '21