This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
tutorial:coordinates [2011/05/18 07:32] – [Coordinates for Polyhedra] added example joswig | user_guide:coordinates [2019/01/25 09:27] – ↷ Page moved from tutorial:coordinates to user_guide:coordinates oroehrig |
---|
0 0 0 1 | 0 0 0 1 |
</code> | </code> |
| |
| Each line describes one linear inequality. The encoding is as follows: (a_0,a_1,...,a_d) is the inequality a_0 + a_1 x_1 + ... + a_d x_d >= 0. This way a point in (oriented) homogeneous coordinates satisfies an inequality if and only if the scalar product of the point with the inequality gives a non-negative value. (Use the command ''print_constraints($m)'' to display the inequalities of the matrix ''$m'' in a nice way.) |
| |
Clearly, the polyhedron is unbounded. | Clearly, the polyhedron is unbounded. |
</code> | </code> |
| |
===== Internal treatment of polytope generators (svn version only) ===== | By the way, unbounded polyhedra can be visualized just like bounded ones. ''polymake'' automatically chooses a bounding box. |
| <code> |
| polytope > $p->VISUAL; |
| </code> |
| ===== Internal treatment of polytope generators ===== |
As described above polyhedra in ''polymake'' are modelled as the intersection of a cone with the affine hyperplane defined by //x<sub>0</sub>=1//. Hence, infinitely many cones give rise to the same polytope. The algorithms in ''polymake'' usually work with the //homogenized cone// ''homog(P)'' of a polyhedron. Hence, ''polymake'' takes care about the correct canonicalization of user input of polytope generators in the following way:\\ In order to construct ''homog(P)'', the cone defining the polyhedron is intersected with the hyperplane //H<sub>0</sub>: x<sub>0</sub>=0//. The rays defining the bounded part (R<sub>b</sub>) and rays with //x<sub>0</sub>=0// (R<sub>0</sub>) are just inherited. To obtain the rest of the generators for the unbounded part, it is necessary to carry out a "dual Fourier-Motzkin procedure": Any two rays with different signs are linearly combined to a new ray that is contained in //H<sub>0</sub>//. All these rays together with the rays in R<sub>b</sub> and R<sub>0</sub> then define the //homogenized cone// ''homog(P)''. | As described above polyhedra in ''polymake'' are modelled as the intersection of a cone with the affine hyperplane defined by //x<sub>0</sub>=1//. Hence, infinitely many cones give rise to the same polytope. The algorithms in ''polymake'' usually work with the //homogenized cone// ''homog(P)'' of a polyhedron. Hence, ''polymake'' takes care about the correct canonicalization of user input of polytope generators in the following way:\\ In order to construct ''homog(P)'', the cone defining the polyhedron is intersected with the hyperplane //H<sub>0</sub>: x<sub>0</sub>=0//. The rays defining the bounded part (R<sub>b</sub>) and rays with //x<sub>0</sub>=0// (R<sub>0</sub>) are just inherited. To obtain the rest of the generators for the unbounded part, it is necessary to carry out a "dual Fourier-Motzkin procedure": Any two rays with different signs are linearly combined to a new ray that is contained in //H<sub>0</sub>//. All these rays together with the rays in R<sub>b</sub> and R<sub>0</sub> then define the //homogenized cone// ''homog(P)''. |
| |
Until version 2.9.9 input generators with a negative first coordinate are just multiplied by -1. | Until version 2.9.9 input generators with a negative first coordinate are just multiplied by -1. |