# Singular

### 4.24.1 polytopeViaPoints

`Syntax:`
`polytopeViaPoints(` intmat V `)`
`polytopeViaPoints(` intmat V, int flags `)`
`Type:`
polytope
`Purpose:`
polytope which is the intersection of the cone generated by the row vectors of V with the hyperplane, in which the first coordinate equals 1; flags may be 0 or 1, if flags is 1, then program assumes that each row vector of M generates a ray in the cone, if flags is 0, then program computes that information itself.
`Example:`
 ```LIB"gfanlib.so"; // This is a polytope in R^2 generated by (0,0), (1,0), (0,1), (0,0); intmat V[4][3]= 1,0,0, 1,1,0, 1,0,1, 1,1,1; polytope p=polytopeViaPoints(V); p; ==> AMBIENT_DIM ==> 2 ==> INEQUALITIES ==> 0, 0, 1, ==> 0, 1, 0, ==> 1,-1, 0, ==> 1, 0,-1 ==> EQUATIONS ==> ==> // This is a polytope in R^2 generated by (1/2,2/3), (3/4,4/5), (5/6,6/7): intmat V[3][3]= ==> // ** redefining V ** 6,3,4, 20,15,16, 42,35,36; polytope p=polytopeViaPoints(V); ==> // ** redefining p ** p; ==> AMBIENT_DIM ==> 2 ==> INEQUALITIES ==> -10,-24, 35, ==> -6, -8, 15, ==> 8, 12,-21 ==> EQUATIONS ==> ==> // This polytope is the positive orthant in R^2: // (0,1,0) and (0,0,1) imply that the polytope is unbounded in that direction intmat V[3][3]= ==> // ** redefining V ** 1,0,0, 0,1,0, 0,0,1; polytope p=polytopeViaPoints(V); ==> // ** redefining p ** p; ==> AMBIENT_DIM ==> 2 ==> INEQUALITIES ==> 0,0,1, ==> 0,1,0, ==> 1,0,0 ==> EQUATIONS ==> ==> ```