next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Polyhedra :: triangulate

triangulate -- computes a triangulation of a polytope

Synopsis

Description

triangulate computes the triangulation of the polyhedron P, if it is compact, i.e. a polytope, recursively. For this, it takes all facets and checks if they are simplices. If so, then it takes the convex hull of these with the weighted centre of the polytope (the sum of the vertices divided by the number of vertices). For those that are not simplices it takes all their facets and does the same for these.

i1 : P = hypercube 2

o1 = P

o1 : Polyhedron
i2 : triangulate P
Warning: This method is deprecated. Please consider using polyhedronFromHData instead.
Warning: This method is deprecated. Please consider using polyhedronFromHData instead.
Warning: This method is deprecated. Please consider using polyhedronFromHData instead.
Warning: This method is deprecated. Please consider using polyhedronFromHData instead.

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

o2 : List

Ways to use triangulate :