next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
NormalToricVarieties :: normalToricVariety(Polyhedron)

normalToricVariety(Polyhedron) -- make a normal toric variety from a 'Polyhedra' polyhedron

Synopsis

Description

This method makes a NormalToricVariety from a Polyhedron as implemented in the Polyhedra package. In particular, the associated fan is outer normal fan to the polyhedron.
i1 : P = hypercube 3

o1 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of polyhedron => 3
      number of facets => 6
      number of rays => 0
      number of vertices => 8

o1 : Polyhedron
i2 : X = normalToricVariety P;
i3 : rays X

o3 = {{0, 0, -1}, {0, 0, 1}, {0, -1, 0}, {1, 0, 0}, {-1, 0, 0}, {0, 1, 0}}

o3 : List
i4 : max X

o4 = {{0, 2, 3}, {0, 2, 4}, {0, 3, 5}, {0, 4, 5}, {1, 2, 3}, {1, 2, 4}, {1,
     ------------------------------------------------------------------------
     3, 5}, {1, 4, 5}}

o4 : List

Remark

The recommended method for creating a NormalToricVariety from a polytope is normalToricVariety(Matrix). In fact, this package avoids using objects from the Polyhedra whenever possible because their significant overhead. Here is a trivial example, namely projective 2-space, illustrating the substantial increase in time resulting from the use of a Polyhedra polyhedron.
i5 : V = matrix {{0,-1,0},{0,0,-1}}

o5 = | 0 -1 0  |
     | 0 0  -1 |

              2        3
o5 : Matrix ZZ  <--- ZZ
i6 : X1 = time normalToricVariety convexHull ((-1)*V);
     -- used 0.187392 seconds
i7 : X2 = time normalToricVariety V;
     -- used 0.00949714 seconds
i8 : set rays X2 === set rays X1

o8 = false
i9 : max X1 == max X2

o9 = true

See also