# global sections of structure sheaf on the toric Calabi-Yau

Let P be a lattice polytope and lying in $N \times {1} \subset N \times \mathbb{R}$. Let $\sigma$ be the cone over this polytope and $X_\sigma$ be the corresponding toric variety, which is an affine,Gorenstein, toric variety.

Is there a simple algorithm for computing the ring of global sections of the structure sheaf on X_{\sigma}? I would like the presentation in terms of generators and relations if possible. If this is not possible in general, I would be happy if this is possible under some nice, fairly general situation. Thank you for your help.

I suppose a different version of this question is: Are there computer programs which are freely available and which can make these computations quickly?

-
Isn't it something like: Generators are all lattice points in the cone that are not sums of other lattice points in the cone, relations are identities where one sum of lattice points equals another sum of lattice points? Or the dual cone? –  Will Sawin May 25 '13 at 22:30
Yes, it is as you say in the dual cone. But this description is not so explicit(at least I have trouble to implement it in practice) and I was hoping know what the best algorithm is for computing. –  Eleanor Von Hohlandsbourg May 26 '13 at 5:20