Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Vertices of Polytope

Hi!

I have a list of points that I'm using to construct a convex, finite-sided, compact polytope:

P1 = Polyhedron(vertices = [list_of_points])

I know how to extract from P1 the list of vertices that define it:

vertex_list=[]
for q in P1.Vrepresentation():
    vertex_list.append(q)
print('vertices ='), vertex_list

This returns the following output:

vertices = [A vertex at (0.5, 0.0), A vertex at (-0.5, 0.0), A vertex at (-0.5, 1.0), A vertex at (0.5, -1.0)]

But what I'd like to do is have a list of the coordinates of the vertices only: i.e have sage tell me a list of the form [(.5,0), (-.5, 0), (-.5, 1), (.5, -1)], so that I can do some computations about P1 that are dependent on the coordinates of the vertices. Is there a way to do this?

Thanks!