SecondaryPolytope.sws

526 days ago by vbraun

pointmatrix = matrix([ [ 1, 1, 0, -1, -1, 0 ], [ 0, 1, 1, 0, -1, -1 ], [ 1, 1, 1, 1, 1, 1 ] ]); pointmatrix = matrix(pointmatrix.rows()[0:2]) pointmatrix 
       
[ 1  1  0 -1 -1  0]
[ 0  1  1  0 -1 -1]
[ 1  1  0 -1 -1  0]
[ 0  1  1  0 -1 -1]
pc = PointConfiguration(pointmatrix.columns()); pc 
       
A point configuration in QQ^2 consisting of 6 points
A point configuration in QQ^2 consisting of 6 points
t = pc.triangulations_list() t 
       
[A triangulation in QQ^2 consisting of 4 simplices, A triangulation in
QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4
simplices, A triangulation in QQ^2 consisting of 4 simplices, A
triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2
consisting of 4 simplices, A triangulation in QQ^2 consisting of 4
simplices, A triangulation in QQ^2 consisting of 4 simplices, A
triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2
consisting of 4 simplices, A triangulation in QQ^2 consisting of 4
simplices, A triangulation in QQ^2 consisting of 4 simplices, A
triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2
consisting of 4 simplices]
[A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices, A triangulation in QQ^2 consisting of 4 simplices]
# You can move the slider to see different triangulations @interact def show_triangulation(i=(1 .. len(t)+1)): html('Triangulation number '+str(i)+' out of '+str(len(t)+1)) show( t[i-1].plot(axes=False) ) 
       

Click to the left again to hide and once more to show the dynamic interactive window

secondarypolytope = pc.secondary_polytope() secondarypolytope 
       
A lattice polytope: 3-dimensional, 14 vertices.
A lattice polytope: 3-dimensional, 14 vertices.
plot = secondarypolytope.plot3d() # the plot command gives nice live 3-d graphics in the web browser, but printing does not work plot 
       
plot.rotateZ(60*pi/180).show(viewer='tachyon') 
       
p = Polyhedron( vertices=secondarypolytope.vertices().columns() ); p 
       
A 3-dimensional polyhedron in QQ^6 defined as the convex hull of 14
vertices.
A 3-dimensional polyhedron in QQ^6 defined as the convex hull of 14 vertices.
edge_graph = p.graph() edge_graph 
       
Looped graph on 14 vertices
Looped graph on 14 vertices
edge_graph.show()