ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 10 Oct 2021 09:01:44 +0200Hasse diagram of different dimensional cells of a polyhedronhttps://ask.sagemath.org/question/59311/hasse-diagram-of-different-dimensional-cells-of-a-polyhedron/I am trying to get a facet poset diagram of a polyhedron.
What I want is an adjacency matrix describing the Hasse diagram/poset
where vertices are cells, and two vertices are connected by an edge
if one of their corresponding cells is contained in the other.
So I want a Hasse diagram where the top row consists of a vertex
for the highest dimensional cell, then the next row consists of
cells of one less dimension, and so on until the final row
corresponding to vertices.
For instance, I have:
E = polytopes.dodecahedron().face_lattice()
I don't know how to extract this kind of information from this.
I want to be able to plot the cell poset diagram in some other software to look at it.arboreal_vfSun, 10 Oct 2021 09:01:44 +0200https://ask.sagemath.org/question/59311/how do I enumerate the integer lattice points contained in a convex polyhedron?https://ask.sagemath.org/question/58402/how-do-i-enumerate-the-integer-lattice-points-contained-in-a-convex-polyhedron/ The following Sage code is working perfectly. It generates the polyhedron from a vertex list of interest and computes the Ehrhart polynomial.
p = Polyhedron(vertices = vertex_list)
p = p.ehrhart_polynomial(engine = 'latte')
How can I now compute the number of integer lattice points inisde the convex hull of the polyhedron?
Moreover, can I enumerate them?Justin McClungTue, 10 Aug 2021 19:52:09 +0200https://ask.sagemath.org/question/58402/How to use faces of a polytope as variables?https://ask.sagemath.org/question/57027/how-to-use-faces-of-a-polytope-as-variables/ Hello, I am very new to using computer algebras system, and I can't figure out the following: I need to create a 3D polytope (in fact, an associahedron) and then do some computations in the algebra of rational functions in variables that correspond to faces of associahedron. How do I do that? I know writing something like Frac(ZZ['x,y,z']) creates the algebra that I need, but how do I make formal symbols x,y,z remember that they once were faces of a polytope (so that I could check if one was a subface of another, or something like that...)?PolydaryaSat, 08 May 2021 21:44:28 +0200https://ask.sagemath.org/question/57027/Extracting inequalities for polytopeshttps://ask.sagemath.org/question/53826/extracting-inequalities-for-polytopes/Here is a buckyball
bb = polytopes.buckyball()
rep = bb.Hrepresentation()
show(rep)
and its Hrepresentation. When i ask for say
rep[10]
Sagemath returns the 10th inequality in a way that i coud not use it. Is there a way to obtain explicit inequalities for the polytopes ?
If i type
eq0 = rep[0]
I have an acceptable answer with $x_1$ and $x_2$, but I do not know how to call either $x_1$ or $x_2$ to reuse that inequality in say a linear program.CyrilleSun, 11 Oct 2020 08:19:03 +0200https://ask.sagemath.org/question/53826/rotating polytope in 4d?https://ask.sagemath.org/question/52652/rotating-polytope-in-4d/ So back in the day, when one had to install a viewer separately to see 3D stuff in Sage... when one plotted a 4-polytope in Sage, there were popup menu options for rotating the image in other than the visible 3 dimensions.
How does this work now? (Or how is it supposed to work?) None of my students are able to find controls of any kind; we have people on Macs, PCs, Linux. Everyone is in Sage 9.0 or 9.1.smbelcasFri, 24 Jul 2020 16:28:21 +0200https://ask.sagemath.org/question/52652/