File: triangulation.session

package info (click to toggle)
regina-normal 7.4.1-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 154,244 kB
  • sloc: cpp: 295,026; xml: 9,992; sh: 1,344; python: 1,225; perl: 616; ansic: 138; makefile: 26
file content (112 lines) | stat: -rw-r--r-- 3,454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
example$ regina-python
Regina 7.0
Software for low-dimensional topology
Copyright (c) 1999-2021, The Regina development team
>>> ################################
>>> #
>>> #  Sample Python Script
>>> #
>>> #  Illustrates different queries and actions on a 3-manifold triangulation
>>> #  and its normal surfaces.
>>> #
>>> #  See the file "triangulation.session" for the results of running this
>>> #  script.
>>> #
>>> ################################
>>>
>>> # Create a new (3,4,7) layered solid torus.  This is a 3-tetrahedron
>>> # triangulation of a solid torus.
>>> t = Example3.lst(3, 4)
>>> print(t)
Bounded orientable 3-D triangulation, f = ( 1 5 7 3 )
>>>
>>> # Print the full skeleton of the triangulation.
>>> print(t.detail())
Size of the skeleton:
  Tetrahedra: 3
  Triangles: 7
  Edges: 5
  Vertices: 1

Tetrahedron gluing:
  Tet  |  glued to:      (012)      (013)      (023)      (123)
  -----+-------------------------------------------------------
    0  |              boundary   boundary    1 (012)    1 (130)
    1  |               0 (023)    0 (312)    2 (013)    2 (120)
    2  |               1 (312)    1 (023)    2 (312)    2 (230)

Vertices:
  Tet  |  vertex:    0   1   2   3
  -----+--------------------------
    0  |             0   0   0   0
    1  |             0   0   0   0
    2  |             0   0   0   0

Edges:
  Tet  |  edge:   01  02  03  12  13  23
  -----+--------------------------------
    0  |           0   1   2   2   1   3
    1  |           1   2   3   3   2   4
    2  |           2   4   3   3   4   3

Triangles:
  Tet  |  face:  012 013 023 123
  -----+------------------------
    0  |           0   1   2   3
    1  |           2   3   4   5
    2  |           5   4   6   6


>>>
>>> # Calculate some algebraic properties of the triangulation.
>>> print(t.homology())
Z
>>> print(t.homologyBdry())
2 Z
>>>
>>> # Test for 0-efficiency, which asks Regina to search for certain types
>>> # of normal surfaces.
>>> print(t.isZeroEfficient())
False
>>>
>>> # Make our own list of vertex normal surfaces in standard coordinates.
>>> surfaces = NormalSurfaces(t, NormalCoords.Standard)
>>>
>>> # Print the full list of vertex normal surfaces.
>>> print(surfaces.detail())
Embedded, vertex surfaces
Coordinates: Standard normal (tri-quad)
Number of surfaces is 9
1 1 1 1 ; 0 0 0 || 1 1 0 0 ; 1 0 0 || 0 0 0 0 ; 0 2 0
0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 0 2 || 0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0
1 1 0 0 ; 0 0 1 || 1 1 0 0 ; 0 0 0 || 0 0 0 0 ; 0 1 0
3 3 0 0 ; 0 0 1 || 1 1 0 0 ; 0 0 2 || 1 1 0 0 ; 0 0 1
0 0 1 1 ; 1 0 0 || 1 1 0 0 ; 1 0 0 || 0 0 0 0 ; 0 2 0
0 0 0 0 ; 0 1 0 || 0 0 0 0 ; 1 0 0 || 0 0 0 0 ; 0 1 0
1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0 || 1 1 1 1 ; 0 0 0

>>>
>>> # Print the Euler characteristic and orientability of each surface.
>>> for s in surfaces:
...     print("Chi =", s.eulerChar(), "; Or =", s.isOrientable())
...
Chi = -1 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = True
Chi = 0 ; Or = False
Chi = 1 ; Or = True
Chi = -2 ; Or = True
Chi = -1 ; Or = False
Chi = 1 ; Or = True
>>>
>>> # List all surfaces with more than one quad in the first tetrahedron.
>>> for s in surfaces:
...     if s.quads(0,0) + s.quads(0,1) + s.quads(0,2) > 1:
...         print(s)
...
0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0 || 1 1 1 1 ; 0 0 0
0 0 0 0 ; 0 0 2 || 0 0 0 0 ; 0 2 0 || 0 0 1 1 ; 1 0 0
>>>