Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| user_guide:tutorials:apps_topaz [2019/01/25 09:38] – ↷ Page moved from user_guide:apps_topaz to user_guide:tutorials:apps_topaz oroehrig | user_guide:tutorials:apps_topaz [2019/02/11 23:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Introduction to topaz ===== | + | {{page> |
| - | **This tutorial is also available as a {{ user_guide: | ||
| - | |||
| - | This tutorial tries to give the user a first idea about the features of the '' | ||
| - | |||
| - | First, we have to make '' | ||
| - | < | ||
| - | polymake -A topaz | ||
| - | </ | ||
| - | or, if you've already started '' | ||
| - | < | ||
| - | polytope > application ' | ||
| - | </ | ||
| - | in the '' | ||
| - | |||
| - | ==== Simplicial complexes ==== | ||
| - | |||
| - | The most important object of the '' | ||
| - | |||
| - | ===From faces=== | ||
| - | For example, you can specify some faces of the complex. Pass them as an Array< Set< | ||
| - | < | ||
| - | topaz > $s = new SimplicialComplex(INPUT_FACES=> | ||
| - | </ | ||
| - | {{ user_guide: | ||
| - | As you can see, redundancies are allowed -- [0] is not a facet of the complex, and thus not necessary for encoding $s. You can compute the inclusion maximal faces like this: | ||
| - | < | ||
| - | topaz > print $s-> | ||
| - | {0 1} | ||
| - | {1 2 3} | ||
| - | </ | ||
| - | You can also pass the FACETS to the constructor, | ||
| - | |||
| - | Take a look at your complex using | ||
| - | < | ||
| - | topaz > $s-> | ||
| - | </ | ||
| - | For more information on visualizing simplicial complex, see the section below. | ||
| - | |||
| - | {{user_guide: | ||
| - | < | ||
| - | topaz >print $s-> | ||
| - | ({-1} 4) | ||
| - | ({0 1} 2) | ||
| - | ({1 2 3} 3) | ||
| - | ({0} 1) | ||
| - | ({1} 1) | ||
| - | ({1 2} 2) | ||
| - | ({1 3} 2) | ||
| - | ({2 3} 2) | ||
| - | ({} 0) | ||
| - | ({2} 1) | ||
| - | ({3} 1) | ||
| - | </ | ||
| - | The first entry of each pair denotes the face, the second is the rank. The '' | ||
| - | < | ||
| - | topaz > $s-> | ||
| - | </ | ||
| - | |||
| - | ===Using clients=== | ||
| - | There are several clients that construct common simplicial complexes (for a comprehensive list, see the [[release_docs: | ||
| - | < | ||
| - | topaz > $t = torus(); | ||
| - | </ | ||
| - | Of course, '' | ||
| - | < | ||
| - | topaz > print $t-> | ||
| - | 1 | ||
| - | topaz > print $t-> | ||
| - | ({} 0) | ||
| - | ({} 2) | ||
| - | ({} 1) | ||
| - | </ | ||
| - | The '' | ||
| - | < | ||
| - | topaz > print rows_numbered( real_projective_plane()-> | ||
| - | 0:{} 0 | ||
| - | 1:{(2 1)} 0 | ||
| - | 2:{} 0 | ||
| - | </ | ||
| - | As expected, the first homology group has torsion coefficient 2 with multiplicity 1 and all Betti numbers are zero. | ||
| - | |||
| - | ===As boundary complex=== | ||
| - | If your complex is a pseudo-manifold, | ||
| - | < | ||
| - | topaz > $bs = simplex(3)-> | ||
| - | topaz > print $bs-> | ||
| - | 1 | ||
| - | </ | ||
| - | |||
| - | ===Triangulating polytopes=== | ||
| - | The triangulation of a polytope is a simplicial complex, too. The '' | ||
| - | < | ||
| - | topaz > $c = polytope:: | ||
| - | topaz > $tc = $c-> | ||
| - | topaz > print $tc-> | ||
| - | {0 1 2 4} | ||
| - | {1 2 3 4} | ||
| - | {1 3 4 5} | ||
| - | {2 3 4 6} | ||
| - | {3 4 5 6} | ||
| - | {3 5 6 7} | ||
| - | </ | ||
| - | |||
| - | ==== Geometric realizations ==== | ||
| - | The '' | ||
| - | |||
| - | You can pass the coordinates to the constructor. Take care to choose an embedding without crossings! | ||
| - | < | ||
| - | topaz > $s = new GeometricSimplicialComplex(INPUT_FACES=> | ||
| - | </ | ||
| - | |||
| - | Some clients produce complexes with geometric realization... | ||
| - | < | ||
| - | topaz > $b = ball(3); | ||
| - | topaz > # print a dense representation of the sparse matrix | ||
| - | topaz > print dense( $b-> | ||
| - | 0 0 0 | ||
| - | 1 0 0 | ||
| - | 0 1 0 | ||
| - | 0 0 1 | ||
| - | </ | ||
| - | ...some others provide the option '' | ||
| - | < | ||
| - | topaz > $bs = barycentric_subdivision($b, | ||
| - | </ | ||
| - | Again, see the [[release_docs: | ||
| - | |||
| - | |||
| - | ==== Visualization ==== | ||
| - | Visualization of simplicial complexes uses the '' | ||
| - | < | ||
| - | topaz > help ' | ||
| - | </ | ||
| - | {{ user_guide: | ||
| - | for a list of available options and this [[visual_tutorial|tutorial]] for a general intro to visualization in polymake. | ||
| - | |||
| - | If your complex is of dimension three or lower, you can visualize a geometric realization together with the '' | ||
| - | < | ||
| - | topaz > $bs-> | ||
| - | </ | ||
| - | You should give the '' | ||
| - | |||
| - | {{user_guide: | ||
| - | < | ||
| - | topaz > $a = new Array< | ||
| - | topaz > $bs-> | ||
| - | </ | ||
| - | |||
| - | The same can be used for the visualization of the face lattice. As an example, we have a look at a '' | ||
| - | < | ||
| - | topaz > $k = klein_bottle(); | ||
| - | topaz > graphviz($k-> | ||
| - | </ | ||
| - | {{ user_guide: | ||
| - | Here the matching of faces is denoted by reversed red arrows and the critical faces are marked red. Check that the graph remains acyclic. | ||
| - | |||
| - | For higher dimensional complexes that cannot be visualized in 3D, you can still have a look at the graphs while ignoring any specified coordinates by using '' | ||
| - | < | ||
| - | topaz > polytope:: | ||
| - | </ | ||
| - | shows the primal and dual graph of the polytope together with an edge between a primal and a dual node iff the primal node represents a vertex of the corresponding facet of the dual node. | ||
| - | |||
| - | {{ user_guide: | ||
| - | |||
| - | Visualization of the '' | ||
| - | < | ||
| - | tikz($s-> | ||
| - | </ | ||