Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

show polyhedron in an interact

Hi, I am trying to write an interact which lets the user enter a list of vertices and then shows the corresponding polyhedron.

My first attempt is the following. The problem is that Sage does not show the polyhedron.

@interact
def _(t1=text_control("Polyhedron"), vertices="[[1,0],[0,1],[0,0]]"):
    p=Polyhedron(vertices=eval(vertices))
    show(p)

Does anybody know how to fix this?

Thanks.