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

## Synopsis

• Usage:
X = normalToricVariety P
• Function: normalToricVariety
• Inputs:
• Optional inputs:
• CoefficientRing => a ring, default value QQ, the coefficient ring of the total coordinate ring
• MinimalGenerators => , default value false, an option which specifics whether to compute minimal generators
• Variable => , default value x, the base symbol for the indexed variables in the total coordinate ring
• WeilToClass => , default value null, allows one to specify the map from the group of torus-invariant Weil divisors to the class group
• Outputs:

## 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.156 seconds``` ```i7 : X2 = time normalToricVariety V; -- used 0.016 seconds``` ```i8 : set rays X2 === set rays X1 o8 = false``` ```i9 : max X1 == max X2 o9 = true```