snappy 3.1__cp311-cp311-macosx_11_0_arm64.whl → 3.2__cp311-cp311-macosx_11_0_arm64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. snappy/CyOpenGL.cpython-311-darwin.so +0 -0
  2. snappy/SnapPy.cpython-311-darwin.so +0 -0
  3. snappy/SnapPyHP.cpython-311-darwin.so +0 -0
  4. snappy/__init__.py +299 -402
  5. snappy/app.py +70 -20
  6. snappy/browser.py +18 -17
  7. snappy/canonical.py +249 -0
  8. snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
  9. snappy/cusps/cusp_area_matrix.py +101 -0
  10. snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
  11. snappy/cusps/maximal_cusp_area_matrix.py +136 -0
  12. snappy/cusps/test.py +21 -0
  13. snappy/cusps/trig_cusp_area_matrix.py +63 -0
  14. snappy/database.py +10 -9
  15. snappy/decorated_isosig.py +337 -114
  16. snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
  17. snappy/dev/extended_ptolemy/extended.py +3 -3
  18. snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
  19. snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
  20. snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
  21. snappy/doc/_images/m125_paper_plane.jpg +0 -0
  22. snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
  23. snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
  24. snappy/doc/_sources/credits.rst.txt +6 -1
  25. snappy/doc/_sources/development.rst.txt +66 -46
  26. snappy/doc/_sources/index.rst.txt +72 -5
  27. snappy/doc/_sources/installing.rst.txt +145 -162
  28. snappy/doc/_sources/news.rst.txt +73 -1
  29. snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
  30. snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
  31. snappy/doc/_sources/triangulation.rst.txt +2 -2
  32. snappy/doc/_sources/verify.rst.txt +89 -29
  33. snappy/doc/_sources/verify_internals.rst.txt +5 -16
  34. snappy/doc/_static/basic.css +23 -1
  35. snappy/doc/_static/css/badge_only.css +1 -1
  36. snappy/doc/_static/css/theme.css +1 -1
  37. snappy/doc/_static/doctools.js +1 -1
  38. snappy/doc/_static/documentation_options.js +2 -3
  39. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  40. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  41. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  42. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  43. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  44. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  45. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  46. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  47. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  48. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  49. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  50. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  51. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  52. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  53. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  54. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  55. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  56. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  57. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  58. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  59. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  60. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  61. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  62. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  63. snappy/doc/_static/js/versions.js +228 -0
  64. snappy/doc/_static/language_data.js +2 -2
  65. snappy/doc/_static/pygments.css +1 -0
  66. snappy/doc/_static/searchtools.js +125 -71
  67. snappy/doc/_static/sphinx_highlight.js +13 -3
  68. snappy/doc/additional_classes.html +291 -122
  69. snappy/doc/bugs.html +17 -20
  70. snappy/doc/censuses.html +34 -53
  71. snappy/doc/credits.html +22 -22
  72. snappy/doc/development.html +88 -68
  73. snappy/doc/genindex.html +66 -145
  74. snappy/doc/index.html +86 -31
  75. snappy/doc/installing.html +164 -182
  76. snappy/doc/manifold.html +1168 -556
  77. snappy/doc/manifoldhp.html +18 -21
  78. snappy/doc/news.html +91 -33
  79. snappy/doc/objects.inv +0 -0
  80. snappy/doc/other.html +20 -22
  81. snappy/doc/platonic_census.html +31 -34
  82. snappy/doc/plink.html +19 -22
  83. snappy/doc/ptolemy.html +20 -22
  84. snappy/doc/ptolemy_classes.html +102 -105
  85. snappy/doc/ptolemy_examples1.html +34 -36
  86. snappy/doc/ptolemy_examples2.html +28 -31
  87. snappy/doc/ptolemy_examples3.html +26 -29
  88. snappy/doc/ptolemy_examples4.html +20 -23
  89. snappy/doc/ptolemy_prelim.html +25 -28
  90. snappy/doc/py-modindex.html +16 -19
  91. snappy/doc/screenshots.html +22 -24
  92. snappy/doc/search.html +15 -18
  93. snappy/doc/searchindex.js +1 -1
  94. snappy/doc/snap.html +18 -21
  95. snappy/doc/snappy.html +18 -20
  96. snappy/doc/spherogram.html +84 -87
  97. snappy/doc/todo.html +17 -20
  98. snappy/doc/triangulation.html +324 -215
  99. snappy/doc/tutorial.html +17 -20
  100. snappy/doc/verify.html +100 -46
  101. snappy/doc/verify_internals.html +106 -563
  102. snappy/drilling/__init__.py +153 -235
  103. snappy/drilling/barycentric.py +103 -0
  104. snappy/drilling/constants.py +0 -2
  105. snappy/drilling/crush.py +56 -130
  106. snappy/drilling/cusps.py +12 -6
  107. snappy/drilling/debug.py +2 -1
  108. snappy/drilling/exceptions.py +7 -40
  109. snappy/drilling/moves.py +302 -243
  110. snappy/drilling/perturb.py +63 -37
  111. snappy/drilling/shorten.py +36 -0
  112. snappy/drilling/subdivide.py +0 -5
  113. snappy/drilling/test.py +23 -0
  114. snappy/drilling/test_cases.py +126 -0
  115. snappy/drilling/tracing.py +9 -37
  116. snappy/exceptions.py +18 -5
  117. snappy/exterior_to_link/barycentric_geometry.py +2 -4
  118. snappy/exterior_to_link/main.py +8 -7
  119. snappy/exterior_to_link/mcomplex_with_link.py +2 -2
  120. snappy/exterior_to_link/rational_linear_algebra.py +1 -1
  121. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
  122. snappy/exterior_to_link/test.py +21 -33
  123. snappy/geometric_structure/__init__.py +212 -0
  124. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  125. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  126. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  127. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  128. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  129. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  130. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  131. snappy/geometric_structure/geodesic/__init__.py +0 -0
  132. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  133. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  134. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  135. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  136. snappy/geometric_structure/geodesic/constants.py +6 -0
  137. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  138. snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
  139. snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
  140. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  141. snappy/geometric_structure/geodesic/line.py +30 -0
  142. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  143. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  144. snappy/geometric_structure/test.py +22 -0
  145. snappy/gui.py +23 -13
  146. snappy/horoviewer.py +7 -7
  147. snappy/hyperboloid/__init__.py +96 -31
  148. snappy/hyperboloid/distances.py +245 -0
  149. snappy/hyperboloid/horoball.py +19 -0
  150. snappy/hyperboloid/line.py +35 -0
  151. snappy/hyperboloid/point.py +9 -0
  152. snappy/hyperboloid/triangle.py +29 -0
  153. snappy/isometry_signature.py +382 -0
  154. snappy/len_spec/__init__.py +596 -0
  155. snappy/len_spec/geodesic_info.py +110 -0
  156. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  157. snappy/len_spec/geodesic_piece.py +143 -0
  158. snappy/len_spec/geometric_structure.py +182 -0
  159. snappy/len_spec/geometry.py +80 -0
  160. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  161. snappy/len_spec/spine.py +206 -0
  162. snappy/len_spec/test.py +24 -0
  163. snappy/len_spec/test_cases.py +69 -0
  164. snappy/len_spec/tile.py +275 -0
  165. snappy/len_spec/word.py +86 -0
  166. snappy/math_basics.py +39 -13
  167. snappy/matrix.py +52 -9
  168. snappy/number.py +12 -6
  169. snappy/numeric_output_checker.py +2 -3
  170. snappy/pari.py +8 -4
  171. snappy/phone_home.py +2 -1
  172. snappy/polyviewer.py +8 -8
  173. snappy/ptolemy/__init__.py +1 -1
  174. snappy/ptolemy/component.py +2 -2
  175. snappy/ptolemy/coordinates.py +25 -25
  176. snappy/ptolemy/findLoops.py +9 -9
  177. snappy/ptolemy/manifoldMethods.py +27 -29
  178. snappy/ptolemy/polynomial.py +50 -57
  179. snappy/ptolemy/processFileBase.py +60 -0
  180. snappy/ptolemy/ptolemyVariety.py +109 -41
  181. snappy/ptolemy/reginaWrapper.py +4 -4
  182. snappy/ptolemy/rur.py +1 -1
  183. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
  184. snappy/ptolemy/test.py +99 -54
  185. snappy/ptolemy/utilities.py +1 -1
  186. snappy/raytracing/__init__.py +64 -0
  187. snappy/raytracing/additional_horospheres.py +64 -0
  188. snappy/raytracing/additional_len_spec_choices.py +63 -0
  189. snappy/raytracing/cohomology_fractal.py +0 -3
  190. snappy/raytracing/eyeball.py +123 -0
  191. snappy/raytracing/finite_raytracing_data.py +17 -17
  192. snappy/raytracing/finite_viewer.py +15 -15
  193. snappy/raytracing/geodesic_tube_info.py +93 -63
  194. snappy/raytracing/geodesics.py +94 -64
  195. snappy/raytracing/geodesics_window.py +56 -34
  196. snappy/raytracing/gui_utilities.py +21 -6
  197. snappy/raytracing/hyperboloid_navigation.py +29 -4
  198. snappy/raytracing/hyperboloid_utilities.py +73 -73
  199. snappy/raytracing/ideal_raytracing_data.py +121 -91
  200. snappy/raytracing/inside_viewer.py +199 -66
  201. snappy/raytracing/pack.py +22 -0
  202. snappy/raytracing/raytracing_data.py +37 -25
  203. snappy/raytracing/raytracing_view.py +70 -65
  204. snappy/raytracing/shaders/Eye.png +0 -0
  205. snappy/raytracing/shaders/NonGeometric.png +0 -0
  206. snappy/raytracing/shaders/__init__.py +39 -3
  207. snappy/raytracing/shaders/fragment.glsl +451 -133
  208. snappy/raytracing/test.py +29 -0
  209. snappy/raytracing/tooltip.py +146 -0
  210. snappy/raytracing/upper_halfspace_utilities.py +42 -9
  211. snappy/sage_helper.py +67 -134
  212. snappy/settings.py +90 -77
  213. snappy/shell.py +2 -0
  214. snappy/snap/character_varieties.py +2 -2
  215. snappy/snap/find_field.py +4 -3
  216. snappy/snap/fundamental_polyhedron.py +2 -2
  217. snappy/snap/kernel_structures.py +5 -1
  218. snappy/snap/nsagetools.py +9 -8
  219. snappy/snap/peripheral/dual_cellulation.py +4 -3
  220. snappy/snap/peripheral/peripheral.py +2 -2
  221. snappy/snap/peripheral/surface.py +5 -5
  222. snappy/snap/peripheral/test.py +1 -1
  223. snappy/snap/polished_reps.py +8 -8
  224. snappy/snap/slice_obs_HKL.py +16 -14
  225. snappy/snap/t3mlite/arrow.py +3 -3
  226. snappy/snap/t3mlite/edge.py +3 -3
  227. snappy/snap/t3mlite/homology.py +2 -2
  228. snappy/snap/t3mlite/mcomplex.py +3 -3
  229. snappy/snap/t3mlite/simplex.py +12 -0
  230. snappy/snap/t3mlite/spun.py +18 -17
  231. snappy/snap/t3mlite/test_vs_regina.py +4 -4
  232. snappy/snap/test.py +37 -53
  233. snappy/snap/utilities.py +4 -5
  234. snappy/test.py +121 -138
  235. snappy/test_cases.py +263 -0
  236. snappy/testing.py +131 -0
  237. snappy/tiling/__init__.py +2 -0
  238. snappy/tiling/canonical_key_dict.py +59 -0
  239. snappy/tiling/dict_based_set.py +79 -0
  240. snappy/tiling/floor.py +49 -0
  241. snappy/tiling/hyperboloid_dict.py +54 -0
  242. snappy/tiling/iter_utils.py +78 -0
  243. snappy/tiling/lifted_tetrahedron.py +22 -0
  244. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  245. snappy/tiling/real_hash_dict.py +164 -0
  246. snappy/tiling/test.py +23 -0
  247. snappy/tiling/tile.py +215 -0
  248. snappy/tiling/triangle.py +33 -0
  249. snappy/tkterminal.py +116 -86
  250. snappy/twister/main.py +1 -7
  251. snappy/twister/twister_core.cpython-311-darwin.so +0 -0
  252. snappy/upper_halfspace/__init__.py +78 -17
  253. snappy/verify/__init__.py +3 -7
  254. snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
  255. snappy/verify/complex_volume/adjust_torsion.py +1 -2
  256. snappy/verify/complex_volume/closed.py +13 -13
  257. snappy/verify/complex_volume/cusped.py +6 -6
  258. snappy/verify/complex_volume/extended_bloch.py +5 -8
  259. snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
  260. snappy/verify/edge_equations.py +80 -0
  261. snappy/verify/exceptions.py +0 -55
  262. snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
  263. snappy/verify/interval_newton_shapes_engine.py +7 -5
  264. snappy/verify/interval_tree.py +5 -5
  265. snappy/verify/krawczyk_shapes_engine.py +17 -18
  266. snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
  267. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
  268. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
  269. snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
  270. snappy/verify/shapes.py +5 -3
  271. snappy/verify/short_slopes.py +39 -41
  272. snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
  273. snappy/verify/test.py +57 -60
  274. snappy/verify/upper_halfspace/extended_matrix.py +1 -1
  275. snappy/verify/upper_halfspace/finite_point.py +3 -4
  276. snappy/verify/upper_halfspace/ideal_point.py +9 -9
  277. snappy/verify/volume.py +2 -2
  278. snappy/version.py +2 -2
  279. {snappy-3.1.dist-info → snappy-3.2.dist-info}/METADATA +26 -11
  280. snappy-3.2.dist-info/RECORD +503 -0
  281. {snappy-3.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  282. {snappy-3.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  283. snappy/__pycache__/__init__.cpython-311.pyc +0 -0
  284. snappy/__pycache__/browser.cpython-311.pyc +0 -0
  285. snappy/__pycache__/cache.cpython-311.pyc +0 -0
  286. snappy/__pycache__/database.cpython-311.pyc +0 -0
  287. snappy/__pycache__/db_utilities.cpython-311.pyc +0 -0
  288. snappy/__pycache__/decorated_isosig.cpython-311.pyc +0 -0
  289. snappy/__pycache__/exceptions.cpython-311.pyc +0 -0
  290. snappy/__pycache__/export_stl.cpython-311.pyc +0 -0
  291. snappy/__pycache__/filedialog.cpython-311.pyc +0 -0
  292. snappy/__pycache__/gui.cpython-311.pyc +0 -0
  293. snappy/__pycache__/horoviewer.cpython-311.pyc +0 -0
  294. snappy/__pycache__/infowindow.cpython-311.pyc +0 -0
  295. snappy/__pycache__/math_basics.cpython-311.pyc +0 -0
  296. snappy/__pycache__/matrix.cpython-311.pyc +0 -0
  297. snappy/__pycache__/number.cpython-311.pyc +0 -0
  298. snappy/__pycache__/numeric_output_checker.cpython-311.pyc +0 -0
  299. snappy/__pycache__/pari.cpython-311.pyc +0 -0
  300. snappy/__pycache__/polyviewer.cpython-311.pyc +0 -0
  301. snappy/__pycache__/sage_helper.cpython-311.pyc +0 -0
  302. snappy/__pycache__/version.cpython-311.pyc +0 -0
  303. snappy/doc/_sources/verify_canon.rst.txt +0 -90
  304. snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
  305. snappy/doc/_static/js/html5shiv.min.js +0 -4
  306. snappy/doc/verify_canon.html +0 -304
  307. snappy/drilling/__pycache__/__init__.cpython-311.pyc +0 -0
  308. snappy/drilling/__pycache__/constants.cpython-311.pyc +0 -0
  309. snappy/drilling/__pycache__/crush.cpython-311.pyc +0 -0
  310. snappy/drilling/__pycache__/cusps.cpython-311.pyc +0 -0
  311. snappy/drilling/__pycache__/debug.cpython-311.pyc +0 -0
  312. snappy/drilling/__pycache__/epsilons.cpython-311.pyc +0 -0
  313. snappy/drilling/__pycache__/exceptions.cpython-311.pyc +0 -0
  314. snappy/drilling/__pycache__/fixed_points.cpython-311.pyc +0 -0
  315. snappy/drilling/__pycache__/geodesic_info.cpython-311.pyc +0 -0
  316. snappy/drilling/__pycache__/geodesic_tube.cpython-311.pyc +0 -0
  317. snappy/drilling/__pycache__/geometric_structure.cpython-311.pyc +0 -0
  318. snappy/drilling/__pycache__/line.cpython-311.pyc +0 -0
  319. snappy/drilling/__pycache__/moves.cpython-311.pyc +0 -0
  320. snappy/drilling/__pycache__/peripheral_curves.cpython-311.pyc +0 -0
  321. snappy/drilling/__pycache__/perturb.cpython-311.pyc +0 -0
  322. snappy/drilling/__pycache__/quotient_space.cpython-311.pyc +0 -0
  323. snappy/drilling/__pycache__/spatial_dict.cpython-311.pyc +0 -0
  324. snappy/drilling/__pycache__/subdivide.cpython-311.pyc +0 -0
  325. snappy/drilling/__pycache__/tracing.cpython-311.pyc +0 -0
  326. snappy/drilling/geodesic_tube.py +0 -441
  327. snappy/drilling/geometric_structure.py +0 -366
  328. snappy/drilling/line.py +0 -122
  329. snappy/drilling/quotient_space.py +0 -94
  330. snappy/drilling/spatial_dict.py +0 -128
  331. snappy/exterior_to_link/__pycache__/__init__.cpython-311.pyc +0 -0
  332. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-311.pyc +0 -0
  333. snappy/exterior_to_link/__pycache__/exceptions.cpython-311.pyc +0 -0
  334. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-311.pyc +0 -0
  335. snappy/exterior_to_link/__pycache__/link_projection.cpython-311.pyc +0 -0
  336. snappy/exterior_to_link/__pycache__/main.cpython-311.pyc +0 -0
  337. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-311.pyc +0 -0
  338. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-311.pyc +0 -0
  339. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-311.pyc +0 -0
  340. snappy/exterior_to_link/__pycache__/pl_utils.cpython-311.pyc +0 -0
  341. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-311.pyc +0 -0
  342. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-311.pyc +0 -0
  343. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-311.pyc +0 -0
  344. snappy/exterior_to_link/__pycache__/stored_moves.cpython-311.pyc +0 -0
  345. snappy/hyperboloid/__pycache__/__init__.cpython-311.pyc +0 -0
  346. snappy/manifolds/__pycache__/__init__.cpython-311.pyc +0 -0
  347. snappy/ptolemy/__pycache__/__init__.cpython-311.pyc +0 -0
  348. snappy/ptolemy/__pycache__/component.cpython-311.pyc +0 -0
  349. snappy/ptolemy/__pycache__/coordinates.cpython-311.pyc +0 -0
  350. snappy/ptolemy/__pycache__/fieldExtensions.cpython-311.pyc +0 -0
  351. snappy/ptolemy/__pycache__/findLoops.cpython-311.pyc +0 -0
  352. snappy/ptolemy/__pycache__/homology.cpython-311.pyc +0 -0
  353. snappy/ptolemy/__pycache__/manifoldMethods.cpython-311.pyc +0 -0
  354. snappy/ptolemy/__pycache__/matrix.cpython-311.pyc +0 -0
  355. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-311.pyc +0 -0
  356. snappy/ptolemy/__pycache__/polynomial.cpython-311.pyc +0 -0
  357. snappy/ptolemy/__pycache__/processComponents.cpython-311.pyc +0 -0
  358. snappy/ptolemy/__pycache__/processFileBase.cpython-311.pyc +0 -0
  359. snappy/ptolemy/__pycache__/processFileDispatch.cpython-311.pyc +0 -0
  360. snappy/ptolemy/__pycache__/processMagmaFile.cpython-311.pyc +0 -0
  361. snappy/ptolemy/__pycache__/processRurFile.cpython-311.pyc +0 -0
  362. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-311.pyc +0 -0
  363. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-311.pyc +0 -0
  364. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-311.pyc +0 -0
  365. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
  366. snappy/ptolemy/__pycache__/rur.cpython-311.pyc +0 -0
  367. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
  368. snappy/ptolemy/__pycache__/utilities.cpython-311.pyc +0 -0
  369. snappy/raytracing/__pycache__/__init__.cpython-311.pyc +0 -0
  370. snappy/raytracing/__pycache__/finite_raytracing_data.cpython-311.pyc +0 -0
  371. snappy/raytracing/__pycache__/gui_utilities.cpython-311.pyc +0 -0
  372. snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-311.pyc +0 -0
  373. snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-311.pyc +0 -0
  374. snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-311.pyc +0 -0
  375. snappy/raytracing/__pycache__/inside_viewer.cpython-311.pyc +0 -0
  376. snappy/raytracing/__pycache__/raytracing_data.cpython-311.pyc +0 -0
  377. snappy/raytracing/__pycache__/raytracing_view.cpython-311.pyc +0 -0
  378. snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-311.pyc +0 -0
  379. snappy/raytracing/__pycache__/view_scale_controller.cpython-311.pyc +0 -0
  380. snappy/raytracing/zoom_slider/__pycache__/__init__.cpython-311.pyc +0 -0
  381. snappy/snap/__pycache__/__init__.cpython-311.pyc +0 -0
  382. snappy/snap/__pycache__/character_varieties.cpython-311.pyc +0 -0
  383. snappy/snap/__pycache__/fundamental_polyhedron.cpython-311.pyc +0 -0
  384. snappy/snap/__pycache__/interval_reps.cpython-311.pyc +0 -0
  385. snappy/snap/__pycache__/kernel_structures.cpython-311.pyc +0 -0
  386. snappy/snap/__pycache__/mcomplex_base.cpython-311.pyc +0 -0
  387. snappy/snap/__pycache__/nsagetools.cpython-311.pyc +0 -0
  388. snappy/snap/__pycache__/polished_reps.cpython-311.pyc +0 -0
  389. snappy/snap/__pycache__/shapes.cpython-311.pyc +0 -0
  390. snappy/snap/__pycache__/slice_obs_HKL.cpython-311.pyc +0 -0
  391. snappy/snap/__pycache__/utilities.cpython-311.pyc +0 -0
  392. snappy/snap/peripheral/__pycache__/__init__.cpython-311.pyc +0 -0
  393. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-311.pyc +0 -0
  394. snappy/snap/peripheral/__pycache__/link.cpython-311.pyc +0 -0
  395. snappy/snap/peripheral/__pycache__/peripheral.cpython-311.pyc +0 -0
  396. snappy/snap/peripheral/__pycache__/surface.cpython-311.pyc +0 -0
  397. snappy/snap/t3mlite/__pycache__/__init__.cpython-311.pyc +0 -0
  398. snappy/snap/t3mlite/__pycache__/arrow.cpython-311.pyc +0 -0
  399. snappy/snap/t3mlite/__pycache__/corner.cpython-311.pyc +0 -0
  400. snappy/snap/t3mlite/__pycache__/edge.cpython-311.pyc +0 -0
  401. snappy/snap/t3mlite/__pycache__/face.cpython-311.pyc +0 -0
  402. snappy/snap/t3mlite/__pycache__/files.cpython-311.pyc +0 -0
  403. snappy/snap/t3mlite/__pycache__/homology.cpython-311.pyc +0 -0
  404. snappy/snap/t3mlite/__pycache__/linalg.cpython-311.pyc +0 -0
  405. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-311.pyc +0 -0
  406. snappy/snap/t3mlite/__pycache__/perm4.cpython-311.pyc +0 -0
  407. snappy/snap/t3mlite/__pycache__/simplex.cpython-311.pyc +0 -0
  408. snappy/snap/t3mlite/__pycache__/spun.cpython-311.pyc +0 -0
  409. snappy/snap/t3mlite/__pycache__/surface.cpython-311.pyc +0 -0
  410. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-311.pyc +0 -0
  411. snappy/snap/t3mlite/__pycache__/vertex.cpython-311.pyc +0 -0
  412. snappy/togl/__init__.py +0 -3
  413. snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
  414. snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
  415. snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  416. snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
  417. snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
  418. snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
  419. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  420. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
  421. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  422. snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
  423. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
  424. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
  425. snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  426. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  427. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
  428. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
  429. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  430. snappy/twister/__pycache__/__init__.cpython-311.pyc +0 -0
  431. snappy/twister/__pycache__/main.cpython-311.pyc +0 -0
  432. snappy/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
  433. snappy/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
  434. snappy/verify/__pycache__/__init__.cpython-311.pyc +0 -0
  435. snappy/verify/__pycache__/cuspCrossSection.cpython-311.pyc +0 -0
  436. snappy/verify/__pycache__/cuspTranslations.cpython-311.pyc +0 -0
  437. snappy/verify/__pycache__/cusp_areas.cpython-311.pyc +0 -0
  438. snappy/verify/__pycache__/cusp_shapes.cpython-311.pyc +0 -0
  439. snappy/verify/__pycache__/exceptions.cpython-311.pyc +0 -0
  440. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-311.pyc +0 -0
  441. snappy/verify/__pycache__/interval_tree.cpython-311.pyc +0 -0
  442. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-311.pyc +0 -0
  443. snappy/verify/__pycache__/realAlgebra.cpython-311.pyc +0 -0
  444. snappy/verify/__pycache__/shapes.cpython-311.pyc +0 -0
  445. snappy/verify/__pycache__/short_slopes.cpython-311.pyc +0 -0
  446. snappy/verify/__pycache__/squareExtensions.cpython-311.pyc +0 -0
  447. snappy/verify/__pycache__/verifyCanonical.cpython-311.pyc +0 -0
  448. snappy/verify/__pycache__/verifyHyperbolicity.cpython-311.pyc +0 -0
  449. snappy/verify/__pycache__/volume.cpython-311.pyc +0 -0
  450. snappy/verify/complex_volume/__pycache__/__init__.cpython-311.pyc +0 -0
  451. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-311.pyc +0 -0
  452. snappy/verify/complex_volume/__pycache__/closed.cpython-311.pyc +0 -0
  453. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-311.pyc +0 -0
  454. snappy/verify/complex_volume/__pycache__/cusped.cpython-311.pyc +0 -0
  455. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-311.pyc +0 -0
  456. snappy/verify/cuspCrossSection.py +0 -1422
  457. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-311.pyc +0 -0
  458. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-311.pyc +0 -0
  459. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-311.pyc +0 -0
  460. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
  461. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-311.pyc +0 -0
  462. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-311.pyc +0 -0
  463. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
  464. snappy-3.1.dist-info/RECORD +0 -585
  465. {snappy-3.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -1,9 +1,9 @@
1
1
  from snappy.snap import t3mlite as t3m
2
2
  from snappy import Triangulation
3
3
 
4
- from snappy.SnapPy import matrix, vector
4
+ from ..matrix import make_matrix, make_vector
5
5
 
6
- from snappy.upper_halfspace import pgl2c_to_o13
6
+ from ..upper_halfspace import pgl2c_to_o13
7
7
 
8
8
  # We could use
9
9
  #
@@ -60,7 +60,7 @@ class FiniteRaytracingData(RaytracingData):
60
60
  return r
61
61
 
62
62
  def __init__(self, hyperbolic_structure):
63
- super(FiniteRaytracingData, self).__init__(
63
+ super().__init__(
64
64
  hyperbolic_structure.mcomplex)
65
65
 
66
66
  def _compute_matrices(self, hyperbolic_structure):
@@ -69,7 +69,7 @@ class FiniteRaytracingData(RaytracingData):
69
69
  hyperbolic_structure, tet.Index)
70
70
 
71
71
  def _compute_tet_vertices(self):
72
- c = vector(self.RF, [1, 0, 0, 0])
72
+ c = make_vector([1, 0, 0, 0], ring=self.RF)
73
73
 
74
74
  def _compute_vertex(tet, perm):
75
75
  m = tet.permutahedron_matrices[perm]
@@ -83,8 +83,8 @@ class FiniteRaytracingData(RaytracingData):
83
83
  t3m.V3 : _compute_vertex(tet, (3,0,1,2)) }
84
84
 
85
85
  def _compute_edge_ends(self):
86
- cs = [ vector(self.RF,[1, 1, 0, 0]),
87
- vector(self.RF,[1, -1, 0, 0]) ]
86
+ cs = [ make_vector([1, 1, 0, 0], ring=self.RF),
87
+ make_vector([1, -1, 0, 0], ring=self.RF) ]
88
88
 
89
89
  def _compute_edge_ends(tet, perm):
90
90
  m = tet.permutahedron_matrices[perm]
@@ -100,12 +100,12 @@ class FiniteRaytracingData(RaytracingData):
100
100
  t3m.E23 : _compute_edge_ends(tet, (2,3,0,1)) }
101
101
 
102
102
  def _compute_planes(self):
103
- c = vector(self.RF, [0.0, 0.0, 0.0, -1.0])
103
+ c = make_vector([0.0, 0.0, 0.0, -1.0], ring=self.RF)
104
104
 
105
105
  def _compute_plane(tet, perm):
106
106
  m = tet.permutahedron_matrices[perm]
107
107
  v = c * pgl2c_to_o13(m)
108
- return vector([-v[0], v[1], v[2], v[3]])
108
+ return make_vector([-v[0], v[1], v[2], v[3]])
109
109
 
110
110
  for tet in self.mcomplex.Tetrahedra:
111
111
  tet.R13_planes = {
@@ -125,7 +125,7 @@ class FiniteRaytracingData(RaytracingData):
125
125
  for F in t3m.TwoSubsimplices:
126
126
  for V in t3m.ZeroSubsimplices:
127
127
  if V & F:
128
- v0 = tet.O13_matrices[F] * vector(tet.R13_vertices[V])
128
+ v0 = tet.O13_matrices[F] * make_vector(tet.R13_vertices[V])
129
129
  v1 = tet.Neighbor[F].R13_vertices[tet.Gluing[F].image(V)]
130
130
 
131
131
  if abs(r13_dot(v0, v1) - (-1.0)) > 1e-6:
@@ -136,7 +136,7 @@ class FiniteRaytracingData(RaytracingData):
136
136
  def get_uniform_bindings(self):
137
137
  # self._check_consistency()
138
138
 
139
- d = super(FiniteRaytracingData, self).get_uniform_bindings()
139
+ d = super().get_uniform_bindings()
140
140
  d['TetrahedraEdges.R13EdgeEnds'] = (
141
141
  'vec4[]',
142
142
  [ edge_end
@@ -153,15 +153,15 @@ class FiniteRaytracingData(RaytracingData):
153
153
  return d
154
154
 
155
155
  def get_compile_time_constants(self):
156
- d = super(FiniteRaytracingData, self).get_compile_time_constants()
156
+ d = super().get_compile_time_constants()
157
157
  d[b'##finiteTrig##'] = 1
158
158
  return d
159
159
 
160
160
  def initial_view_state(self):
161
- boost = matrix([[1.0,0.0,0.0,0.0],
162
- [0.0,1.0,0.0,0.0],
163
- [0.0,0.0,1.0,0.0],
164
- [0.0,0.0,0.0,1.0]])
161
+ boost = make_matrix([[1.0,0.0,0.0,0.0],
162
+ [0.0,1.0,0.0,0.0],
163
+ [0.0,0.0,1.0,0.0],
164
+ [0.0,0.0,0.0,1.0]])
165
165
  tet_num = 0
166
166
  weight = 0.0
167
167
  return (boost, tet_num, weight)
@@ -191,8 +191,8 @@ def _compute_face_pairing(tet, F):
191
191
 
192
192
 
193
193
  def _adjoint(m):
194
- return matrix([[ m[1,1],-m[0,1]],
195
- [-m[1,0], m[0,0]]])
194
+ return make_matrix([[ m[1,1],-m[0,1]],
195
+ [-m[1,0], m[0,0]]])
196
196
 
197
197
 
198
198
  _new_perm_edge_type_old_perm = [
@@ -65,7 +65,7 @@ class FiniteViewer(ttk.Frame):
65
65
 
66
66
  UniformDictController(
67
67
  self.widget.ui_parameter_dict, 'fov',
68
- update_function=self.widget.redraw_if_initialized,
68
+ update_function=self.widget.draw,
69
69
  scale=self.fov_scale,
70
70
  label=self.fov_label,
71
71
  format_string='%.1f')
@@ -121,7 +121,7 @@ class FiniteViewer(ttk.Frame):
121
121
  return frame
122
122
 
123
123
  def checkbox_update(self):
124
- self.widget.redraw_if_initialized()
124
+ self.widget.draw()
125
125
  self.focus_viewer()
126
126
 
127
127
  def create_fillings_frame(self, parent):
@@ -207,7 +207,7 @@ class FiniteViewer(ttk.Frame):
207
207
  row=row,
208
208
  left_end=0.0,
209
209
  right_end=0.35,
210
- update_function=self.widget.redraw_if_initialized,
210
+ update_function=self.widget.draw,
211
211
  format_string='%.3f')
212
212
 
213
213
  row += 1
@@ -219,7 +219,7 @@ class FiniteViewer(ttk.Frame):
219
219
  row=row,
220
220
  left_end=0.0,
221
221
  right_end=1.35,
222
- update_function=self.widget.redraw_if_initialized,
222
+ update_function=self.widget.draw,
223
223
  format_string='%.3f')
224
224
 
225
225
  row += 1
@@ -231,7 +231,7 @@ class FiniteViewer(ttk.Frame):
231
231
  row=row,
232
232
  left_end=0.0,
233
233
  right_end=0.5,
234
- update_function=self.widget.redraw_if_initialized)
234
+ update_function=self.widget.draw)
235
235
 
236
236
  return frame
237
237
 
@@ -251,7 +251,7 @@ class FiniteViewer(ttk.Frame):
251
251
  row=row,
252
252
  left_end=1,
253
253
  right_end=100,
254
- update_function=self.widget.redraw_if_initialized)
254
+ update_function=self.widget.draw)
255
255
 
256
256
  row += 1
257
257
  UniformDictController.create_horizontal_scale(
@@ -262,7 +262,7 @@ class FiniteViewer(ttk.Frame):
262
262
  row=row,
263
263
  left_end=1.0,
264
264
  right_end=28.0,
265
- update_function=self.widget.redraw_if_initialized)
265
+ update_function=self.widget.draw)
266
266
 
267
267
  row += 1
268
268
  UniformDictController.create_horizontal_scale(
@@ -273,7 +273,7 @@ class FiniteViewer(ttk.Frame):
273
273
  row=row,
274
274
  left_end=1.0,
275
275
  right_end=4.25,
276
- update_function=self.widget.redraw_if_initialized)
276
+ update_function=self.widget.draw)
277
277
 
278
278
  return frame
279
279
 
@@ -295,7 +295,7 @@ class FiniteViewer(ttk.Frame):
295
295
  row=row,
296
296
  left_end=0.0,
297
297
  right_end=0.25,
298
- update_function=self.widget.redraw_if_initialized,
298
+ update_function=self.widget.draw,
299
299
  format_string='%.3f')
300
300
  row += 1
301
301
 
@@ -307,7 +307,7 @@ class FiniteViewer(ttk.Frame):
307
307
  row=row,
308
308
  left_end=0.3,
309
309
  right_end=4.0,
310
- update_function=self.widget.redraw_if_initialized)
310
+ update_function=self.widget.draw)
311
311
 
312
312
  row += 1
313
313
  UniformDictController.create_horizontal_scale(
@@ -318,7 +318,7 @@ class FiniteViewer(ttk.Frame):
318
318
  row=row,
319
319
  left_end=0.1,
320
320
  right_end=2.0,
321
- update_function=self.widget.redraw_if_initialized)
321
+ update_function=self.widget.draw)
322
322
 
323
323
  row += 1
324
324
  UniformDictController.create_horizontal_scale(
@@ -329,7 +329,7 @@ class FiniteViewer(ttk.Frame):
329
329
  row=row,
330
330
  left_end=0.3,
331
331
  right_end=3.0,
332
- update_function=self.widget.redraw_if_initialized)
332
+ update_function=self.widget.draw)
333
333
 
334
334
  return frame
335
335
 
@@ -364,7 +364,7 @@ class FiniteViewer(ttk.Frame):
364
364
  left_end=0.1,
365
365
  right_end=1.0)
366
366
 
367
- label = ttk.Label(frame, text=u"Keys: \u2190\u2191\u2192\u2193xz")
367
+ label = ttk.Label(frame, text="Keys: \u2190\u2191\u2192\u2193xz")
368
368
  label.grid(row=row, column=3, sticky=tkinter.NSEW)
369
369
 
370
370
  row += 1
@@ -540,7 +540,7 @@ def _maximal_cusp_area(mfd):
540
540
 
541
541
  def _mouse_gestures_text():
542
542
  if sys.platform == 'darwin':
543
- return u"Move: Click & Drag Rotate: Shift-Click & Drag Orbit: \u2318-Click & Drag"
543
+ return "Move: Click & Drag Rotate: Shift-Click & Drag Orbit: \u2318-Click & Drag"
544
544
  else:
545
545
  return "Move: Click & Drag Rotate: Shift-Click & Drag Orbit: Alt-Click & Drag"
546
546
 
@@ -578,7 +578,7 @@ class PerfTest:
578
578
  self.widget.view_state = self.widget.raytracing_data.update_view_state(
579
579
  self.widget.view_state, self.m)
580
580
 
581
- self.widget.redraw_if_initialized()
581
+ self.widget.draw()
582
582
  self.widget.after(250, self.redraw)
583
583
 
584
584
 
@@ -1,91 +1,121 @@
1
- from ..drilling import compute_geodesic_info
2
- from ..drilling.geodesic_tube import GeodesicTube
3
- from ..drilling.line import distance_r13_lines
1
+ from ..tiling.iter_utils import IteratorCache
2
+ from ..tiling.tile import Tile
3
+
4
+ from ..hyperboloid.distances import distance_r13_lines
5
+
6
+ from ..geometric_structure.geodesic.geodesic_start_point_info import compute_geodesic_start_point_info
7
+ from ..geometric_structure.geodesic.tiles_for_geodesic import compute_tiles_for_geodesic
4
8
 
5
9
  from ..snap.t3mlite import simplex # type: ignore
6
10
 
11
+ from typing import Sequence
12
+
13
+ # Do not draw line segments of geodesic that are fully within a tube
14
+ # about a core curve of this radius.
15
+ avoid_core_curve_tube_radius = 0.1
16
+
17
+ def tiles_up_to_core_curve(tiles : Sequence[Tile]) -> Sequence[Tile]:
18
+ """
19
+ Only develop tube until the radius is 98% of the distance to
20
+ a core curve
21
+ """
22
+
23
+ min_dist_to_core_curve = 1e50
24
+
25
+ for tile in tiles:
26
+ if (tile.lower_bound_distance > 0.0001 and
27
+ not tile.lower_bound_distance < min_dist_to_core_curve * 0.98):
28
+ break
29
+
30
+ for v in simplex.ZeroSubsimplices:
31
+ tet = tile.lifted_tetrahedron.tet
32
+ core_curve = tet.core_curves.get(v, None)
33
+ if core_curve is None:
34
+ continue
35
+
36
+ dist_to_core_curve = distance_r13_lines(
37
+ core_curve.r13_line, tile.inverse_lifted_geometric_object)
38
+
39
+ # We already drop the pieces that are too close to a core curve.
40
+ min_dist_to_core_curve = min(
41
+ min_dist_to_core_curve, dist_to_core_curve)
42
+
43
+ tile.dist_to_core_curve = min_dist_to_core_curve
44
+
45
+ yield tile
46
+
47
+ class GeodesicLinePieces:
48
+ def __init__(self,
49
+ tets_and_end_points,
50
+ covered_radius,
51
+ dist_to_core_curve):
52
+ self.tets_and_end_points = tets_and_end_points
53
+ self.covered_radius = covered_radius
54
+ self.dist_to_core_curve = dist_to_core_curve
7
55
 
8
56
  class GeodesicTubeInfo:
9
57
  def __init__(self, mcomplex, word, index, is_primitive=None):
10
58
  # Compute GeodesicTube
11
- self.geodesic_info = compute_geodesic_info(mcomplex, word)
12
-
13
- if not self.geodesic_info.core_curve_cusp:
14
- self.geodesic_tube = GeodesicTube(mcomplex, self.geodesic_info)
59
+ self.geodesic_start_point_info = compute_geodesic_start_point_info(mcomplex, word)
60
+
61
+ for tet in mcomplex.Tetrahedra:
62
+ for v, core_curve in tet.core_curves.items():
63
+ tet.Class[v].core_curve_tube_radius = mcomplex.RF(avoid_core_curve_tube_radius)
64
+
65
+ if not self.geodesic_start_point_info.core_curve_cusp:
66
+ self.tiles = IteratorCache(
67
+ tiles_up_to_core_curve(
68
+ compute_tiles_for_geodesic(
69
+ mcomplex,
70
+ self.geodesic_start_point_info,
71
+ avoid_core_curves=True,
72
+ for_raytracing=True)))
73
+ self._tiles_to_cover = []
15
74
 
16
75
  # Compute complex length from trace
17
- t = self.geodesic_info.trace
76
+ t = self.geodesic_start_point_info.trace
18
77
  self.complex_length = _normalize_complex_length(2 * (t / 2).arccosh())
19
78
 
20
79
  self.words = [ word ]
21
80
  self.index = index
22
81
 
23
82
  RF = t.real().parent()
24
- self.dist_to_core_curve = RF(1e50)
25
-
26
- # Caches enough pieces so that we can compare tetrahedra.
27
- self._pieces_covering_geodesic = []
28
83
 
29
84
  self._is_primitive = is_primitive
30
85
 
31
- def compute_tets_and_R13_endpoints_and_radius_for_tube(self, radius):
32
-
33
- # Only develop tube until the radius is 98% of the distance to
34
- # a core curve
35
- while True:
36
- safe_radius = self.dist_to_core_curve * 0.98
37
- if radius > safe_radius:
38
- # Stop. Tube is about to intersect a core curve.
39
- radius = safe_radius
40
- break
41
-
42
- if self.geodesic_tube.covered_radius() > radius:
43
- # Done. We covered the tube.
44
- break
45
-
46
- self.geodesic_tube._add_next_piece()
47
-
48
- # Get last piece. Compute distance of lifted geodesic to
49
- # to core curves.
50
- piece = self.geodesic_tube.pieces[-1]
51
- for v in simplex.ZeroSubsimplices:
52
- core_curve = piece.tet.core_curves.get(v, None)
53
- if core_curve:
54
- d = distance_r13_lines(
55
- core_curve.r13_line,
56
- piece.lifted_geodesic)
57
-
58
- if d < self.dist_to_core_curve:
59
- self.dist_to_core_curve = d
86
+ def compute_line_pieces(self, radius) -> GeodesicLinePieces:
60
87
 
61
- result = []
88
+ tets_and_end_points = []
62
89
 
63
- for piece in self.geodesic_tube.pieces:
64
- if piece.lower_bound > radius:
90
+ for tile in self.tiles:
91
+ if tile.lower_bound_distance > radius:
65
92
  break
66
- result.append(
67
- (piece.tet.Index,
68
- [ piece.tet.to_coordinates_in_symmetric_tet * pt
69
- for pt in piece.lifted_geodesic.points] ))
93
+ tet = tile.lifted_tetrahedron.tet
94
+ tets_and_end_points.append(
95
+ (tet.Index,
96
+ [ tet.to_coordinates_in_symmetric_tet * pt
97
+ for pt in tile.inverse_lifted_geometric_object.points] ))
70
98
 
71
- return result, radius
99
+ return GeodesicLinePieces(
100
+ tets_and_end_points,
101
+ tile.lower_bound_distance,
102
+ tile.dist_to_core_curve)
72
103
 
73
104
  def _get_pieces_covering_geodesic(self):
74
- if not self._pieces_covering_geodesic:
75
- self.geodesic_tube.add_pieces_for_radius(0)
76
- for piece in self.geodesic_tube.pieces:
77
- if piece.lower_bound > 0:
105
+ if not self._tiles_to_cover:
106
+ for tile in self.tiles:
107
+ if tile.lower_bound_distance > 0:
78
108
  break
79
- self._pieces_covering_geodesic.append(piece)
80
- return self._pieces_covering_geodesic
109
+ self._tiles_to_cover.append(tile)
110
+ return self._tiles_to_cover
81
111
 
82
112
  def __eq__(self, other):
83
113
  diff = _normalize_complex_length(self.complex_length - other.complex_length)
84
114
  if not abs(diff) < 1e-3:
85
115
  return False
86
116
 
87
- self_cusp = self.geodesic_info.core_curve_cusp
88
- other_cusp = other.geodesic_info.core_curve_cusp
117
+ self_cusp = self.geodesic_start_point_info.core_curve_cusp
118
+ other_cusp = other.geodesic_start_point_info.core_curve_cusp
89
119
 
90
120
  if self_cusp or other_cusp:
91
121
  if self_cusp and other_cusp:
@@ -96,10 +126,10 @@ class GeodesicTubeInfo:
96
126
  # We should ask snappy.drilling for the two tetrahedra adjacent to
97
127
  # a face.
98
128
  piece = self._get_pieces_covering_geodesic()[0]
99
- point = piece.lifted_geodesic.points[0]
129
+ point = piece.inverse_lifted_geometric_object.points[0]
100
130
  for other_piece in other._get_pieces_covering_geodesic():
101
- if piece.tet == other_piece.tet:
102
- for other_point in other_piece.lifted_geodesic.points:
131
+ if piece.lifted_tetrahedron.tet == other_piece.lifted_tetrahedron.tet:
132
+ for other_point in other_piece.inverse_lifted_geometric_object.points:
103
133
  if _are_parallel_light_vectors(point, other_point, 1e-5):
104
134
  return True
105
135
  return False
@@ -114,10 +144,10 @@ class GeodesicTubeInfo:
114
144
  for i, piece0 in enumerate(pieces):
115
145
  for j, piece1 in enumerate(pieces):
116
146
  if i < j:
117
- if piece0.tet == piece1.tet:
147
+ if piece0.lifted_tetrahedron.tet == piece1.lifted_tetrahedron.tet:
118
148
  if _are_parallel_light_vectors(
119
- piece0.lifted_geodesic.points[0],
120
- piece1.lifted_geodesic.points[0],
149
+ piece0.inverse_lifted_geometric_object.points[0],
150
+ piece1.inverse_lifted_geometric_object.points[0],
121
151
  1e-5):
122
152
  return False
123
153
  return True
@@ -1,21 +1,26 @@
1
- from .geodesic_tube_info import GeodesicTubeInfo
2
- from .upper_halfspace_utilities import *
3
-
4
- from ..drilling.geometric_structure import add_r13_geometry
5
- from ..drilling.geodesic_tube import add_structures_necessary_for_tube
1
+ from .geodesic_tube_info import (GeodesicTubeInfo,
2
+ GeodesicLinePieces,
3
+ avoid_core_curve_tube_radius)
4
+ from .pack import pack_tet_data
5
+ from .upper_halfspace_utilities import add_coordinate_transform_to_mcomplex
6
+ from .hyperboloid_utilities import O13_orthonormalise
7
+
8
+ from ..geometric_structure import (add_r13_geometry,
9
+ add_filling_information)
10
+ from ..geometric_structure.geodesic.add_core_curves import add_r13_core_curves
11
+ from ..tiling.triangle import add_triangles_to_tetrahedra
6
12
  from ..snap.t3mlite import Mcomplex, simplex
7
- from ..upper_halfspace import pgl2c_to_o13, sl2c_inverse
13
+ from ..matrix import make_matrix # type: ignore
8
14
 
15
+ import traceback
9
16
 
10
17
  class LengthSpectrumError(RuntimeError):
11
18
  pass
12
19
 
13
-
14
20
  class Geodesics:
15
21
  def __init__(self, manifold, words):
16
22
  """
17
23
 
18
- >>> from snappy import Manifold
19
24
  >>> M = Manifold("o9_00000")
20
25
  >>> g = Geodesics(M, ["b", "c"])
21
26
  >>> g.set_enables_and_radii_and_update([True, True], [0.3, 0.4])
@@ -40,11 +45,8 @@ class Geodesics:
40
45
  self.num_tetrahedra = manifold.num_tetrahedra()
41
46
  self.RF = manifold.tetrahedra_shapes('rect')[0].real().parent()
42
47
 
43
- self.data_heads = []
44
- self.data_tails = []
45
- self.data_indices = []
46
- self.data_radius_params = []
47
- self.data_offsets = (self.num_tetrahedra + 1) * [ 0 ]
48
+ self._uniform_bindings = {}
49
+ self._num = 0
48
50
 
49
51
  def set_enables_and_radii_and_update(self, enables, radii):
50
52
 
@@ -56,58 +58,55 @@ class Geodesics:
56
58
  if not self.geodesic_tube_infos:
57
59
  return success
58
60
 
59
- self.data_heads = []
60
- self.data_tails = []
61
- self.data_indices = []
62
- self.data_radius_params = []
63
- self.data_offsets = []
64
-
65
61
  tets_to_data = [ [] for i in range(self.num_tetrahedra) ]
66
62
 
63
+ a_radius = self.RF(avoid_core_curve_tube_radius)
64
+
67
65
  for i, (enable, radius, geodesic_tube) in enumerate(
68
66
  zip(enables, radii, self.geodesic_tube_infos)):
69
67
  if enable:
70
68
  radius = self.RF(radius)
71
69
 
72
- tets_and_endpoints, safe_radius = (
73
- geodesic_tube.compute_tets_and_R13_endpoints_and_radius_for_tube(radius))
70
+ line_pieces : GeodesicLinePieces = (
71
+ geodesic_tube.compute_line_pieces(radius))
74
72
 
75
- if safe_radius < radius:
73
+ if (line_pieces.covered_radius < radius or
74
+ line_pieces.dist_to_core_curve < radius or
75
+ line_pieces.dist_to_core_curve < a_radius):
76
76
  success = False
77
77
 
78
- radius_param = safe_radius.cosh() ** 2 / 2
78
+ # A user can always force the tube to have this radius.
79
+ # Even though it might be incomplete at that point.
80
+ min_user_radius = 0.1
79
81
 
80
- for tet, endpoints in tets_and_endpoints:
82
+ effective_radius = min(
83
+ radius,
84
+ max(line_pieces.covered_radius, self.RF(min_user_radius)))
85
+
86
+ radius_param = effective_radius.cosh() ** 2 / 2
87
+
88
+ for tet, (head, tail) in line_pieces.tets_and_end_points:
81
89
  tets_to_data[tet].append(
82
- (endpoints, i, radius_param))
90
+ {'Heads' : ('vec4', head),
91
+ 'Tails' : ('vec4', tail),
92
+ 'Index' : ('int', i),
93
+ 'TubeRadiusParam' : ('float', radius_param)})
83
94
 
84
- for data in tets_to_data:
85
- self.data_offsets.append(len(self.data_heads))
86
- for (head, tail), i, radius_param in data:
87
- self.data_heads.append(head)
88
- self.data_tails.append(tail)
89
- self.data_indices.append(i)
90
- self.data_radius_params.append(radius_param)
91
- self.data_offsets.append(len(self.data_heads))
95
+ self._uniform_bindings, self._num = pack_tet_data(
96
+ 'geodesics.geodesic', tets_to_data)
92
97
 
93
98
  return success
94
99
 
95
100
  def get_uniform_bindings(self):
96
- return {
97
- 'geodesics.geodesicHeads' : ('vec4[]', self.data_heads),
98
- 'geodesics.geodesicTails' : ('vec4[]', self.data_tails),
99
- 'geodesics.geodesicIndex' : ('int[]', self.data_indices),
100
- 'geodesics.geodesicTubeRadiusParam' : ('float[]', self.data_radius_params),
101
- 'geodesics.geodesicOffsets' : ('int[]', self.data_offsets) }
102
-
103
- def get_compile_time_constants(self):
104
- if self.data_heads:
105
- num = max(100, len(self.data_heads))
101
+ return self._uniform_bindings
102
+
103
+ def get_compile_time_defs(self):
104
+ if self._num > 0:
105
+ num = max(100, self._num)
106
106
  else:
107
107
  num = 0
108
108
 
109
- return {
110
- b'##num_geodesic_segments##' : num }
109
+ return { 'num_geodesic_segments' : num }
111
110
 
112
111
  def add_length_spectrum(self, l):
113
112
 
@@ -125,8 +124,8 @@ class Geodesics:
125
124
  try:
126
125
  self.add_word(g['word'], is_primitive=True)
127
126
  except Exception as e:
128
- print(dict(g))
129
- print(e)
127
+ traceback.print_exc()
128
+ print("Geodesic is ", dict(g))
130
129
  exception = e
131
130
 
132
131
  if exception:
@@ -158,21 +157,57 @@ class Geodesics:
158
157
  def get_mcomplex(self):
159
158
  if self.mcomplex is None:
160
159
  self.mcomplex = Mcomplex(self.manifold)
161
- add_r13_geometry(self.mcomplex,
162
- self.manifold)
163
- add_structures_necessary_for_tube(self.mcomplex)
164
-
165
- for tet in self.mcomplex.Tetrahedra:
166
- z = tet.ShapeParameters[simplex.E01]
167
- vert0 = [ tet.ideal_vertices[v]
168
- for v in simplex.ZeroSubsimplices[:3]]
169
- vert1 = symmetric_vertices_for_tetrahedron(z)[:3]
170
- tet.to_coordinates_in_symmetric_tet = (
171
- o13_matrix_taking_ideal_vertices_to_ideal_vertices(
172
- vert0, vert1))
160
+ add_r13_geometry(
161
+ self.mcomplex, self.manifold)
162
+ add_filling_information(
163
+ self.mcomplex, self.manifold)
164
+ add_r13_core_curves(
165
+ self.mcomplex, self.manifold)
166
+ add_triangles_to_tetrahedra(self.mcomplex)
167
+ add_coordinate_transform_to_mcomplex(self.mcomplex)
173
168
 
174
169
  return self.mcomplex
175
170
 
171
+ def view_state_for_geodesic(self, index):
172
+ geodesic_start_point_info = self.geodesic_tube_infos[index].geodesic_start_point_info
173
+ p0, p1 = geodesic_start_point_info.line.r13_line.points
174
+
175
+ ring = p0[0].parent()
176
+
177
+ # Rotate the camera so that it is looking down the x-Axis
178
+ r = make_matrix([[1, 0, 0, 0],
179
+ [0, 0, 0, 1],
180
+ [0, 1, 0, 0],
181
+ [0, 0, 1, 0]],
182
+ ring=ring)
183
+
184
+ # Create a transform that takes the origin to a point on the
185
+ # geodesic and takes the tangent vector at the origin parallel
186
+ # to the x-Axis to a vector tangent to the geodesic.
187
+ #
188
+ # Note that the orthonormalisation processes the columns from left
189
+ # to right. This is exactly what we want.
190
+ #
191
+ g = O13_orthonormalise(
192
+ make_matrix(
193
+ [ p0 + p1, # (Projective) point on the geodesic.
194
+ # Orthonormalisation just normalizes it
195
+ # so that it is on the hyperboloid.
196
+ p0 - p1, # Direction of geodesic.
197
+ # Orthonormalisation just projects it into
198
+ # the tangent space of the hyperboloid
199
+ # at the above point and normalizes it.
200
+ [ 0, 1, 0, 0], # Some other vectors so that
201
+ [ 0, 0, 1, 0]], # orthonormalisation produces a camera frame.
202
+ ring=ring).transpose())
203
+
204
+ # Change coordinate system used for computation of geodesics
205
+ # to the one used by the raytracing code.
206
+ tet_index = 0
207
+ tet = self.get_mcomplex().Tetrahedra[tet_index]
208
+ c = tet.to_coordinates_in_symmetric_tet
209
+
210
+ return c * g * r, tet_index, 0.0
176
211
 
177
212
  def compute_geodesic_tube_info_key(geodesic_tube_info):
178
213
  l = geodesic_tube_info.complex_length
@@ -209,8 +244,3 @@ def geodesic_index_to_color(i):
209
244
  return hsv2rgb(golden_angle_by_2_pi * i + 0.1, 1.0, 1.0)
210
245
 
211
246
 
212
- def o13_matrix_taking_ideal_vertices_to_ideal_vertices(verts0, verts1):
213
- m1 = pgl2_matrix_taking_0_1_inf_to_given_points(*verts0)
214
- m2 = pgl2_matrix_taking_0_1_inf_to_given_points(*verts1)
215
-
216
- return pgl2c_to_o13(m2 * sl2c_inverse(m1))