Macaulay2 » Documentation
Packages » LatticePolytopes :: randQPoly
next | previous | forward | backward | up | index | toc

randQPoly -- gives a random rational polytope

Synopsis

Description

Given integers v and n this function returns a random rational polytope with v vertices in ambient dimension n, such that the vertices lie close to the unit n-sphere.

i1 : P=randQPoly(5,3)

o1 = P

o1 : Polyhedron
i2 : vertices P

o2 = | -25635085/29623471                  -52716571/58307795 
     | -135404657/603997032                38472626/340858829 
     | -8074150053793509/18014398509481984 -74703605/181263738
     ------------------------------------------------------------------------
     -145722081/549303688 -186849956/201457317 -176083960/237806033 |
     -77014985/96080674   87302468/521543421   23501683/40146693    |
     -41861883/78125000   98791658/295540837   64221107/194481586   |

              3       5
o2 : Matrix QQ  <-- QQ

See also

Ways to use randQPoly :

For the programmer

The object randQPoly is a method function.