Monday, May 25, 2009

Polytopes in Sage, take 1

Here's a first attempt at a short video intro to polytopes in Sage. Sage 4.0, which should be released soon, has some new functionality that was added during Sage Days 15 (thanks to David Perkinson for reviewing some of that, and Rob Beezer for helping David learn the review ropes).

The video is about 4 MB and can be found here. I am not sure how the format will work on other computers so if anyone takes a look and it doesn't work let me know. Also, I am interested in getting constructive criticism on the video.


Anonymous said...

Thank you very much, but it would really be good to show a small bit at the end a construction of a non-predefined polytope. I assume those are possible since near the beggining you speak of polytopes constructed from arbitrary vertices or inequalities.

I kind of imagine what would the command for "poly from vertices" look like (pass a list of lists). But I'm curious about the inequalities. Would it be possible to show a small example?

Since predefined polytopes are interesting, but dealing with arbitrary polytopes is somethign not many packages do well

M. Hampton said...

Thanks for the response. I realized as soon as I finished that I had forgotten to do a non-predefined example. I guess I'll have to do take 2 soon.

For vertex definitions, an example of the syntax is:

p = Polyhedron(vertices = [[0,0,0], [0,0,1], [1,2,3], [0,1,0], [1,0,0]])

Anonymous said...

Yes, exactly as I imagined. However for inequalities there are several possible inputs, from symbolic a+3b-5c <=4 to matricial forms (as in polymake)