2021-03-25 19:50:49 +0200 | commented question | Oriented vertices of Polyhedron Am I understanding correctly that you are referring only to 3-dimensional polytopes? (Because I woudn't even understand |

2020-08-25 10:59:18 +0200 | commented answer | Computing projection of a polyhedron The following answer should give you a step by step guide: https://ask.sagemath.org/question/354... In particular how to obtain the matrix that induces a projection to an affine span. |

2020-08-24 08:18:30 +0200 | commented answer | Computing projection of a polyhedron In sage 9.1 one can skip the third part by just multiplying the matrix with the polyhedron: |

2020-08-13 18:46:13 +0200 | received badge | ● Necromancer (source) |

2020-07-15 18:18:51 +0200 | answered a question | Parallelizing Polyhedral volume computation In sage 9.2+ (and probably since a while), you can use the optional package one a computer with 64 processors you should use that many processors (I hope at least, it worked for me for 8). The following used 8 threads for me: |

2020-05-11 21:54:17 +0200 | received badge | ● Nice Answer (source) |

2020-05-11 21:16:32 +0200 | commented answer | What is the most efficient way to "look up" a face in the face lattice of a polyhedron? I edited the answer to explain what the code is doing. |

2020-04-24 09:44:34 +0200 | commented answer | Projection along affine hull Sure. Thanks. |

2020-04-24 09:41:12 +0200 | received badge | ● Necromancer (source) |

2020-04-23 23:30:25 +0200 | commented question | Can sage determine if a cone is gorenstein? Normaliz might be useful here. It's an optional package of sage and if you have it installed you can use it: I'm not sure, whether or not the definition in normaliz agrees with your definition. |

2020-04-23 23:05:13 +0200 | received badge | ● Necromancer (source) |

2020-04-23 22:09:03 +0200 | commented answer | What is the most efficient way to "look up" a face in the face lattice of a polyhedron? Yes, I noticed. It wasn't until JP pointed me to this post that I realized that this would be a nice thing to have.
This is all very much work in progress and it reminds me that more stuff of combinatorial polyhedron should be exposed. I might be about the only person aware of the methods |

2020-04-23 21:43:23 +0200 | answered a question | Can sage determine if a cone is gorenstein? Normaliz can do it, which is an optional package of sage. So I guess the following answer is only useful, if you have installed sage from source. (Technically, all you need is a normaliz and a way to transfer your input into normaliz input.) Unfortunately, normaliz only accepts homogeneous format for this property and as of now (sage 9.1), we have to do some work : The verbose call of the polyhedron constructor is of course not necessary, but it is useful to figure out the normaliz input.
The homogenized input is obtained by appending a 0 to rays and a 1 to vertices and putting them together as input |

2020-04-23 18:54:21 +0200 | answered a question | Projection along affine hull In sage 9.1+ matrices act on polyhedra as linear transformation. This makes it easy. Let me explain how to project the 3-dimensional permutahedron Obtaining To do this we use the right kernel: The first two rows are spanning our linear space we want to map to. The third and fourth row are a base extension such that they are orthogonal to the first and second row. Now we want to linearly transform Finally, we add the vector again: |

2020-04-23 18:04:54 +0200 | answered a question | What is the most efficient way to "look up" a face in the face lattice of a polyhedron? This is a very natural question, but unfortunately at the moment the answer is a bit complicated. This answer assumes sage 9.1+: As this is a combinatorial property, you can go into The iterator yields first all facets. Then it inductively yields all faces of the first facet (treating it as it's own polyhedron) and then marks it as being visited. Then it yields all faces of the second facet, but the faces contained in the first facet. After that it marks the second facet as being visited and so on. Now in our situation it might happen, that the first facet does not contain the goal face. Then we want to mark it immediately as being visited. Likewise we proceed with all facets. The below code will proceed like this for the ridges and so on, which might be easier to adapt, when you need different properties. You might observe that in this particular situation it suffices to mark the correct facets as visited. Now, if your polyhedron contains many facets but few vertices, generating all faces from the facets might be a bad idea. This is why the iterator can work in dual mode as well. In this case you can decide to skip supfaces instead of subfaces. As mentioned before, this is a natural question and eventually I think there should be a method like find-join-of-vertices or find-meet-of-facets. The following should work (it assumes that the face really does exist, otherwise you need to alter the termination condition of the while loop to fit your need): Then you get: This should be pretty fast. Note, that no options of the face iterator are exposed in the polyhedron and one has to go into combinatorial polyhedron (skipping subfaces or supfaces is crucial, because we only want one depth search and find our face immediately). The the subset check function is not optimized deliberately. |

2020-03-27 11:45:05 +0200 | commented answer | Compute the centroid of a polytope I have implemented this approach in https://trac.sagemath.org/ticket/29382. |

2020-03-20 12:31:42 +0200 | received badge | ● Nice Answer (source) |

2020-03-19 18:45:10 +0200 | received badge | ● Necromancer (source) |

2020-03-19 16:46:15 +0200 | answered a question | VoronoiDiagram returns empty regions I think I have fixed the bug in ticket 29176. Hopefully, it will be available from Sage version 9.1+. In the meantime you can use the following workaround. Then will produce correctly |

2019-08-27 22:29:02 +0200 | received badge | ● Supporter (source) |

2019-08-27 22:24:33 +0200 | received badge | ● Editor (source) |

2019-08-27 22:11:31 +0200 | received badge | ● Necromancer (source) |

2019-08-27 22:11:31 +0200 | received badge | ● Teacher (source) |

2019-08-27 19:08:27 +0200 | answered a question | Forming a polytope from only its combinatorial data From Sage version 8.9+ there will be With this object you have a face iterator, the face lattice and some other methods. I don't know if that helps. |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.