Macaulay2 » Documentation
Packages » Polyhedra :: addCone
next | previous | forward | backward | up | index | toc

addCone -- adds cones to a Fan

Synopsis

Description

If addCone is applied to a Cone and a Fan it adds the Cone to the Fan if they are in the same ambient space, if the Cone is compatible with every generating Cone of F, but is not a face of one of them. If one of the first two conditions fails, there will be an error and no fan will be returned. The pairs of incompatible cones can be accessed with the function incompCones. If the last condition fails, then the cone is already in the fan as a face of one of the cones, so it does not have to be added. The conditions are checked in this order.

If addCone is applied to a List and a Fan, then the function adds the list cone by cone and stops if one of the three conditions fails for one of the cones. There is again an error for the first two conditions. The pairs of incompatible cones can again be retrieved using incompCones.

If applied to a pair of fans it adds the generating cones of the first fan to the second fan, again checking for the same conditions as above.

As an example, we make a fan consisting of the following cone and try to add an adjacent orthant.
i1 : C = coneFromVData matrix {{1,0,0},{0,1,1},{0,0,1}};
i2 : F = fan C

o2 = F

o2 : Fan
i3 : C = coneFromVData matrix {{-1,0,0},{0,1,0},{0,0,1}};
i4 : incompCones(C,F)

o4 = {(C, Cone{...1...})}

o4 : List

This shows that the two cones do not intersect in a common face, but if we divide C into two parts, we get a fan.
i5 : C1 = intersection {C, coneFromHData(matrix {{0,1,-1}})};
i6 : C2 = intersection {C, coneFromHData(matrix {{0,-1,1}})};
i7 : F = addCone({C1,C2},F)

o7 = F

o7 : Fan

Ways to use addCone :

For the programmer

The object addCone is a method function.