Returns a list of
- a Matrix A with the vertices of the convex hull of L in its rows
- a list of lists with the faces of the convex hull sorted by increasing dimension.
The vertices of the faces are represented by the indices of the rows of A.
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=mConvexHullFaces(L) o2 = {| 1 0 0 |, {{{}}, {{1}, {2}, {3}, {4}, {5}, {6}}, {{2, 5}, {3, 5}, | -1 0 0 | | 0 1 0 | | 0 -1 0 | | 0 0 1 | | 0 0 -1 | ------------------------------------------------------------------------ {1, 5}, {4, 5}, {3, 6}, {2, 3}, {1, 3}, {2, 4}, {1, 4}, {2, 6}, {1, 6}, ------------------------------------------------------------------------ {4, 6}}, {{2, 3, 5}, {1, 3, 5}, {2, 4, 5}, {1, 4, 5}, {2, 3, 6}, {1, 3, ------------------------------------------------------------------------ 6}, {2, 4, 6}, {1, 4, 6}}, {{1, 2, 3, 4, 5, 6}}}} o2 : List |