user_guide:tutorials:pcom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
tutorial:pcom [2017/07/28 15:01] – added app switch oroehriguser_guide:tutorials:pcom [2019/01/25 09:38] – ↷ Page moved from user_guide:pcom to user_guide:tutorials:pcom oroehrig
Line 5: Line 5:
 > application "fan"; > application "fan";
 </code> </code>
-There are two ways to define polyhedral complexes in ''polymake''. Firsta polyhedral complex can be defined by an array of input points and, firstly, by a list of polytopes or, secondly, by a list of cells. In both cases the indices refer to the given points. The distinction between them is done due to the definition of [[regular_subdivisions|regular subdivisions]], where a point projected back to the subdivision may be an inner point of a cell and not a vertex of it. In both cases the indices refer to the given points.+To define polyhedral complexes in ''polymake'', you need to provide an array of input points and a list of polytopes represented as an array of arrays of point indices.
  
 <code> <code>
 fan > $pc1 = new PolyhedralComplex(POINTS=>[[1,0,0],[1,0,1],[1,1,0],[1,1,1]],INPUT_POLYTOPES=>[[0,1,2],[2,3],[1]]); fan > $pc1 = new PolyhedralComplex(POINTS=>[[1,0,0],[1,0,1],[1,1,0],[1,1,1]],INPUT_POLYTOPES=>[[0,1,2],[2,3],[1]]);
-fan > $pc2 = new PolyhedralComplex(POINTS=>[[1,0],[1,1],[1,2]], MAXIMAL_CELLS=>[[0,2],[0,1,2]]); 
 </code> </code>
  
Line 15: Line 14:
  
 <code> <code>
-fan > print $pc->MAXIMAL_POLYTOPES;+fan > print $pc1->MAXIMAL_POLYTOPES; 
 +{0 1 2} 
 +{2 3}
 </code> </code>
  
-{{ :tutorial:pcom2.png }}+{{ user_guide:pcom2.png }}
  
 +=== Triangulations ===
 Triangulations of polytopes form an important special class of polytopal complexes.  In polymake they are objects of type ''SimplicialComplex'' (and thus belong to the application ''topaz'').  However, it is easy to convert them as follows: Triangulations of polytopes form an important special class of polytopal complexes.  In polymake they are objects of type ''SimplicialComplex'' (and thus belong to the application ''topaz'').  However, it is easy to convert them as follows:
 <code> <code>
Line 25: Line 27:
 fan > $triangulation=new PolyhedralComplex(VERTICES=>$c->VERTICES,MAXIMAL_POLYTOPES=>$c->TRIANGULATION->FACETS); fan > $triangulation=new PolyhedralComplex(VERTICES=>$c->VERTICES,MAXIMAL_POLYTOPES=>$c->TRIANGULATION->FACETS);
 </code> </code>
-In the future, the polytope object ''VoronoiDiagram'' and regular subdivisions will be handled as polyhedral subdivisions. +=== Voronoi Diagrams and regular subdivisions=== 
 +There are seperate tutorials for [[voronoi|Voronoi diagrams]] and [[regular_subdivisions|regluar subdivisions]] of point sets.
  • user_guide/tutorials/pcom.txt
  • Last modified: 2019/02/04 22:55
  • by 127.0.0.1