Ask Your Question
2

Face of a polytope

asked 2016-09-12 14:41:20 +0200

nb gravatar image

Consider a finite set l of points in R^4. I define a polyotpe with P= Polyhedron(l). I consider the set of faces of dimension 2 with P.faces(2).

My question is to find the set of faces of dimension 2 which contains one vertex. What is the command ? Best regards,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-09-12 17:38:42 +0200

tmonteil gravatar image

You can do a Python list extension as follows:

sage: C = polytopes.hypercube(4) ; C
A 4-dimensional polyhedron in ZZ^4 defined as the convex hull of 16 vertices
sage: v = C.vertices()[0] ; v
A vertex at (-1, -1, -1, -1)

sage: [f for f in C.faces(2) if v in f.vertices()]
[<0,1,2,3>, <0,1,4,5>, <0,2,4,6>, <0,1,8,9>, <0,2,8,10>, <0,4,8,12>]
edit flag offensive delete link more
0

answered 2016-09-12 18:56:25 +0200

nb gravatar image

Thanks PS: plus rapide que par email :)

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2016-09-12 14:41:20 +0200

Seen: 483 times

Last updated: Sep 12 '16