Macaulay2 » Documentation
Packages » ConvexInterface :: mConvexHullFacesAndDuals
next | previous | forward | backward | up | index | toc

mConvexHullFacesAndDuals -- Faces and their duals of a convex hull.

Synopsis

Description

Returns a list of

- a Matrix A with the vertices of the convex hull of L in its rows

- a Matrix Adual with the vertices of the dual in its rows

- a list of lists with the faces of the convex hull sorted by increasing dimension.

Each face is a list with two elements. The first is a list of the vertices of the face, the second a list of the vertices of the dual face.

The vertices of the faces are represented by the indices of the rows of A.

This requires that the convex hull of L contains 0 in its interior.

This uses the Convex functions convHull and faces.

i1 : L={vector {1,0,0},vector {-1,0,0},vector {0,1,0},vector {0,-1,0},vector {0,0,1},vector {0,0,-1}}

o1 = {| 1 |, | -1 |, | 0 |, | 0  |, | 0 |, | 0  |}
      | 0 |  | 0  |  | 1 |  | -1 |  | 0 |  | 0  |
      | 0 |  | 0  |  | 0 |  | 0  |  | 1 |  | -1 |

o1 : List
i2 : P=mConvexHullFacesAndDuals(L)

o2 = {| 1  0  0  |, | 1  -1 -1 |, {{{{}, {1, 2, 3, 4, 5, 6, 7, 8}}}, {{{1},
      | -1 0  0  |  | -1 -1 -1 |
      | 0  1  0  |  | 1  1  -1 |
      | 0  -1 0  |  | -1 1  -1 |
      | 0  0  1  |  | 1  -1 1  |
      | 0  0  -1 |  | -1 -1 1  |
                    | 1  1  1  |
                    | -1 1  1  |
     ------------------------------------------------------------------------
     {2, 4, 6, 8}}, {{2}, {1, 3, 5, 7}}, {{3}, {1, 2, 5, 6}}, {{4}, {3, 4, 7,
     ------------------------------------------------------------------------
     8}}, {{5}, {1, 2, 3, 4}}, {{6}, {5, 6, 7, 8}}}, {{{3, 5}, {1, 2}}, {{2,
     ------------------------------------------------------------------------
     5}, {1, 3}}, {{2, 3}, {1, 5}}, {{1, 5}, {2, 4}}, {{1, 3}, {2, 6}}, {{4,
     ------------------------------------------------------------------------
     5}, {3, 4}}, {{2, 4}, {3, 7}}, {{1, 4}, {4, 8}}, {{3, 6}, {5, 6}}, {{2,
     ------------------------------------------------------------------------
     6}, {5, 7}}, {{1, 6}, {6, 8}}, {{4, 6}, {7, 8}}}, {{{2, 3, 5}, {1}},
     ------------------------------------------------------------------------
     {{1, 3, 5}, {2}}, {{2, 4, 5}, {3}}, {{1, 4, 5}, {4}}, {{2, 3, 6}, {5}},
     ------------------------------------------------------------------------
     {{1, 3, 6}, {6}}, {{2, 4, 6}, {7}}, {{1, 4, 6}, {8}}}, {{{1, 2, 3, 4, 5,
     ------------------------------------------------------------------------
     6}, {}}}}}

o2 : List

Ways to use mConvexHullFacesAndDuals :

For the programmer

The object mConvexHullFacesAndDuals is a method function with options.