snappy 3.1.1__cp312-cp312-macosx_11_0_arm64.whl → 3.2__cp312-cp312-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cpython-312-darwin.so +0 -0
- snappy/SnapPy.cpython-312-darwin.so +0 -0
- snappy/SnapPyHP.cpython-312-darwin.so +0 -0
- snappy/__init__.py +271 -401
- snappy/app.py +70 -20
- snappy/browser.py +18 -17
- snappy/canonical.py +249 -0
- snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
- snappy/cusps/cusp_area_matrix.py +101 -0
- snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
- snappy/cusps/maximal_cusp_area_matrix.py +136 -0
- snappy/cusps/test.py +21 -0
- snappy/cusps/trig_cusp_area_matrix.py +63 -0
- snappy/database.py +10 -9
- snappy/decorated_isosig.py +337 -114
- snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
- snappy/dev/extended_ptolemy/extended.py +3 -3
- snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
- snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
- snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
- snappy/doc/_images/m125_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
- snappy/doc/_sources/development.rst.txt +66 -46
- snappy/doc/_sources/index.rst.txt +72 -5
- snappy/doc/_sources/installing.rst.txt +145 -162
- snappy/doc/_sources/news.rst.txt +73 -1
- snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
- snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
- snappy/doc/_sources/triangulation.rst.txt +2 -2
- snappy/doc/_sources/verify.rst.txt +89 -29
- snappy/doc/_sources/verify_internals.rst.txt +5 -16
- snappy/doc/_static/basic.css +1 -1
- snappy/doc/_static/css/badge_only.css +1 -1
- snappy/doc/_static/css/theme.css +1 -1
- snappy/doc/_static/doctools.js +1 -1
- snappy/doc/_static/documentation_options.js +1 -1
- snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- snappy/doc/_static/js/versions.js +228 -0
- snappy/doc/_static/language_data.js +2 -2
- snappy/doc/_static/searchtools.js +108 -62
- snappy/doc/additional_classes.html +209 -40
- snappy/doc/bugs.html +16 -19
- snappy/doc/censuses.html +19 -38
- snappy/doc/credits.html +16 -19
- snappy/doc/development.html +84 -64
- snappy/doc/genindex.html +65 -144
- snappy/doc/index.html +81 -26
- snappy/doc/installing.html +158 -176
- snappy/doc/manifold.html +1119 -507
- snappy/doc/manifoldhp.html +16 -19
- snappy/doc/news.html +90 -32
- snappy/doc/objects.inv +0 -0
- snappy/doc/other.html +17 -19
- snappy/doc/platonic_census.html +16 -19
- snappy/doc/plink.html +16 -19
- snappy/doc/ptolemy.html +17 -19
- snappy/doc/ptolemy_classes.html +31 -34
- snappy/doc/ptolemy_examples1.html +23 -25
- snappy/doc/ptolemy_examples2.html +16 -19
- snappy/doc/ptolemy_examples3.html +18 -21
- snappy/doc/ptolemy_examples4.html +16 -19
- snappy/doc/ptolemy_prelim.html +17 -20
- snappy/doc/py-modindex.html +16 -19
- snappy/doc/screenshots.html +18 -20
- snappy/doc/search.html +15 -18
- snappy/doc/searchindex.js +1 -1
- snappy/doc/snap.html +16 -19
- snappy/doc/snappy.html +17 -19
- snappy/doc/spherogram.html +29 -32
- snappy/doc/todo.html +16 -19
- snappy/doc/triangulation.html +299 -190
- snappy/doc/tutorial.html +16 -19
- snappy/doc/verify.html +97 -43
- snappy/doc/verify_internals.html +59 -516
- snappy/drilling/__init__.py +153 -235
- snappy/drilling/barycentric.py +103 -0
- snappy/drilling/constants.py +0 -2
- snappy/drilling/crush.py +56 -130
- snappy/drilling/cusps.py +12 -6
- snappy/drilling/debug.py +2 -1
- snappy/drilling/exceptions.py +7 -40
- snappy/drilling/moves.py +302 -243
- snappy/drilling/perturb.py +63 -37
- snappy/drilling/shorten.py +36 -0
- snappy/drilling/subdivide.py +0 -5
- snappy/drilling/test.py +23 -0
- snappy/drilling/test_cases.py +126 -0
- snappy/drilling/tracing.py +9 -37
- snappy/exceptions.py +18 -5
- snappy/exterior_to_link/barycentric_geometry.py +2 -4
- snappy/exterior_to_link/main.py +8 -7
- snappy/exterior_to_link/mcomplex_with_link.py +2 -2
- snappy/exterior_to_link/rational_linear_algebra.py +1 -1
- snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
- snappy/exterior_to_link/test.py +21 -33
- snappy/geometric_structure/__init__.py +212 -0
- snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
- snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
- snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
- snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
- snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
- snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
- snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
- snappy/geometric_structure/geodesic/__init__.py +0 -0
- snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
- snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
- snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
- snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
- snappy/geometric_structure/geodesic/constants.py +6 -0
- snappy/geometric_structure/geodesic/exceptions.py +22 -0
- snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
- snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
- snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
- snappy/geometric_structure/geodesic/line.py +30 -0
- snappy/geometric_structure/geodesic/multiplicity.py +127 -0
- snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
- snappy/geometric_structure/test.py +22 -0
- snappy/gui.py +23 -13
- snappy/horoviewer.py +7 -7
- snappy/hyperboloid/__init__.py +96 -31
- snappy/hyperboloid/distances.py +245 -0
- snappy/hyperboloid/horoball.py +19 -0
- snappy/hyperboloid/line.py +35 -0
- snappy/hyperboloid/point.py +9 -0
- snappy/hyperboloid/triangle.py +29 -0
- snappy/isometry_signature.py +382 -0
- snappy/len_spec/__init__.py +596 -0
- snappy/len_spec/geodesic_info.py +110 -0
- snappy/len_spec/geodesic_key_info_dict.py +117 -0
- snappy/len_spec/geodesic_piece.py +143 -0
- snappy/len_spec/geometric_structure.py +182 -0
- snappy/len_spec/geometry.py +80 -0
- snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
- snappy/len_spec/spine.py +206 -0
- snappy/len_spec/test.py +24 -0
- snappy/len_spec/test_cases.py +69 -0
- snappy/len_spec/tile.py +275 -0
- snappy/len_spec/word.py +86 -0
- snappy/math_basics.py +39 -13
- snappy/matrix.py +52 -9
- snappy/number.py +12 -6
- snappy/numeric_output_checker.py +2 -3
- snappy/pari.py +6 -3
- snappy/polyviewer.py +8 -8
- snappy/ptolemy/__init__.py +1 -1
- snappy/ptolemy/component.py +2 -2
- snappy/ptolemy/coordinates.py +25 -25
- snappy/ptolemy/findLoops.py +9 -9
- snappy/ptolemy/manifoldMethods.py +27 -29
- snappy/ptolemy/polynomial.py +50 -57
- snappy/ptolemy/processFileBase.py +60 -0
- snappy/ptolemy/ptolemyVariety.py +109 -41
- snappy/ptolemy/reginaWrapper.py +4 -4
- snappy/ptolemy/rur.py +1 -1
- snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
- snappy/ptolemy/test.py +99 -54
- snappy/ptolemy/utilities.py +1 -1
- snappy/raytracing/__init__.py +64 -0
- snappy/raytracing/additional_horospheres.py +64 -0
- snappy/raytracing/additional_len_spec_choices.py +63 -0
- snappy/raytracing/cohomology_fractal.py +0 -3
- snappy/raytracing/eyeball.py +123 -0
- snappy/raytracing/finite_raytracing_data.py +17 -17
- snappy/raytracing/finite_viewer.py +15 -15
- snappy/raytracing/geodesic_tube_info.py +93 -63
- snappy/raytracing/geodesics.py +94 -64
- snappy/raytracing/geodesics_window.py +56 -34
- snappy/raytracing/gui_utilities.py +21 -6
- snappy/raytracing/hyperboloid_navigation.py +29 -4
- snappy/raytracing/hyperboloid_utilities.py +73 -73
- snappy/raytracing/ideal_raytracing_data.py +121 -91
- snappy/raytracing/inside_viewer.py +199 -66
- snappy/raytracing/pack.py +22 -0
- snappy/raytracing/raytracing_data.py +37 -25
- snappy/raytracing/raytracing_view.py +70 -65
- snappy/raytracing/shaders/Eye.png +0 -0
- snappy/raytracing/shaders/NonGeometric.png +0 -0
- snappy/raytracing/shaders/__init__.py +39 -3
- snappy/raytracing/shaders/fragment.glsl +451 -133
- snappy/raytracing/test.py +29 -0
- snappy/raytracing/tooltip.py +146 -0
- snappy/raytracing/upper_halfspace_utilities.py +42 -9
- snappy/sage_helper.py +67 -134
- snappy/settings.py +90 -77
- snappy/shell.py +2 -0
- snappy/snap/character_varieties.py +2 -2
- snappy/snap/find_field.py +4 -3
- snappy/snap/fundamental_polyhedron.py +2 -2
- snappy/snap/kernel_structures.py +5 -1
- snappy/snap/nsagetools.py +9 -8
- snappy/snap/peripheral/dual_cellulation.py +4 -3
- snappy/snap/peripheral/peripheral.py +2 -2
- snappy/snap/peripheral/surface.py +5 -5
- snappy/snap/peripheral/test.py +1 -1
- snappy/snap/polished_reps.py +8 -8
- snappy/snap/slice_obs_HKL.py +16 -14
- snappy/snap/t3mlite/arrow.py +3 -3
- snappy/snap/t3mlite/edge.py +3 -3
- snappy/snap/t3mlite/homology.py +2 -2
- snappy/snap/t3mlite/mcomplex.py +3 -3
- snappy/snap/t3mlite/simplex.py +12 -0
- snappy/snap/t3mlite/spun.py +18 -17
- snappy/snap/t3mlite/test_vs_regina.py +4 -4
- snappy/snap/test.py +37 -53
- snappy/snap/utilities.py +4 -5
- snappy/test.py +121 -138
- snappy/test_cases.py +263 -0
- snappy/testing.py +131 -0
- snappy/tiling/__init__.py +2 -0
- snappy/tiling/canonical_key_dict.py +59 -0
- snappy/tiling/dict_based_set.py +79 -0
- snappy/tiling/floor.py +49 -0
- snappy/tiling/hyperboloid_dict.py +54 -0
- snappy/tiling/iter_utils.py +78 -0
- snappy/tiling/lifted_tetrahedron.py +22 -0
- snappy/tiling/lifted_tetrahedron_set.py +54 -0
- snappy/tiling/real_hash_dict.py +164 -0
- snappy/tiling/test.py +23 -0
- snappy/tiling/tile.py +215 -0
- snappy/tiling/triangle.py +33 -0
- snappy/tkterminal.py +113 -84
- snappy/twister/main.py +1 -7
- snappy/twister/twister_core.cpython-312-darwin.so +0 -0
- snappy/upper_halfspace/__init__.py +78 -17
- snappy/verify/__init__.py +3 -7
- snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
- snappy/verify/complex_volume/adjust_torsion.py +1 -2
- snappy/verify/complex_volume/closed.py +13 -13
- snappy/verify/complex_volume/cusped.py +6 -6
- snappy/verify/complex_volume/extended_bloch.py +5 -8
- snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
- snappy/verify/edge_equations.py +80 -0
- snappy/verify/exceptions.py +0 -55
- snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
- snappy/verify/interval_newton_shapes_engine.py +7 -5
- snappy/verify/interval_tree.py +5 -5
- snappy/verify/krawczyk_shapes_engine.py +17 -18
- snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
- snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
- snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
- snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
- snappy/verify/shapes.py +5 -3
- snappy/verify/short_slopes.py +39 -41
- snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
- snappy/verify/test.py +57 -60
- snappy/verify/upper_halfspace/extended_matrix.py +1 -1
- snappy/verify/upper_halfspace/finite_point.py +3 -4
- snappy/verify/upper_halfspace/ideal_point.py +9 -9
- snappy/verify/volume.py +2 -2
- snappy/version.py +2 -2
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/METADATA +25 -11
- snappy-3.2.dist-info/RECORD +503 -0
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
- snappy/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/__pycache__/browser.cpython-312.pyc +0 -0
- snappy/__pycache__/cache.cpython-312.pyc +0 -0
- snappy/__pycache__/database.cpython-312.pyc +0 -0
- snappy/__pycache__/db_utilities.cpython-312.pyc +0 -0
- snappy/__pycache__/decorated_isosig.cpython-312.pyc +0 -0
- snappy/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/__pycache__/export_stl.cpython-312.pyc +0 -0
- snappy/__pycache__/filedialog.cpython-312.pyc +0 -0
- snappy/__pycache__/gui.cpython-312.pyc +0 -0
- snappy/__pycache__/horoviewer.cpython-312.pyc +0 -0
- snappy/__pycache__/infowindow.cpython-312.pyc +0 -0
- snappy/__pycache__/math_basics.cpython-312.pyc +0 -0
- snappy/__pycache__/matrix.cpython-312.pyc +0 -0
- snappy/__pycache__/number.cpython-312.pyc +0 -0
- snappy/__pycache__/numeric_output_checker.cpython-312.pyc +0 -0
- snappy/__pycache__/pari.cpython-312.pyc +0 -0
- snappy/__pycache__/polyviewer.cpython-312.pyc +0 -0
- snappy/__pycache__/sage_helper.cpython-312.pyc +0 -0
- snappy/__pycache__/version.cpython-312.pyc +0 -0
- snappy/doc/_sources/verify_canon.rst.txt +0 -90
- snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
- snappy/doc/_static/js/html5shiv.min.js +0 -4
- snappy/doc/verify_canon.html +0 -304
- snappy/drilling/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/constants.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/crush.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/cusps.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/debug.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/epsilons.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/fixed_points.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_info.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_tube.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geometric_structure.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/line.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/moves.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/peripheral_curves.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/perturb.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/quotient_space.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/spatial_dict.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/subdivide.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/tracing.cpython-312.pyc +0 -0
- snappy/drilling/geodesic_tube.py +0 -441
- snappy/drilling/geometric_structure.py +0 -366
- snappy/drilling/line.py +0 -122
- snappy/drilling/quotient_space.py +0 -94
- snappy/drilling/spatial_dict.py +0 -128
- snappy/exterior_to_link/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/hyp_utils.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/link_projection.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/main.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/pl_utils.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/put_in_S3.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/stored_moves.cpython-312.pyc +0 -0
- snappy/hyperboloid/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/manifolds/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/component.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/coordinates.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/fieldExtensions.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/findLoops.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/homology.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/manifoldMethods.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/matrix.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/polynomial.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processComponents.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileBase.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileDispatch.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processMagmaFile.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processRurFile.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVariety.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/rur.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/finite_raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/gui_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/inside_viewer.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/raytracing_view.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/view_scale_controller.cpython-312.pyc +0 -0
- snappy/raytracing/zoom_slider/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/character_varieties.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/fundamental_polyhedron.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/interval_reps.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/kernel_structures.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/mcomplex_base.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/nsagetools.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/polished_reps.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/shapes.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/slice_obs_HKL.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/utilities.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/link.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/peripheral.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/surface.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/arrow.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/corner.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/edge.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/face.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/files.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/homology.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/linalg.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/mcomplex.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/perm4.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/simplex.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/spun.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/surface.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/vertex.cpython-312.pyc +0 -0
- snappy/togl/__init__.py +0 -3
- snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
- snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
- snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
- snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/twister/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/twister/__pycache__/main.cpython-312.pyc +0 -0
- snappy/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cuspCrossSection.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cuspTranslations.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cusp_areas.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cusp_shapes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/interval_tree.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/realAlgebra.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/shapes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/short_slopes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/squareExtensions.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/verifyCanonical.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/verifyHyperbolicity.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/volume.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/closed.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/cusped.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-312.pyc +0 -0
- snappy/verify/cuspCrossSection.py +0 -1422
- snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-312.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
- snappy-3.1.1.dist-info/RECORD +0 -585
- {snappy-3.1.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
|
4
|
+
from ..matrix import make_matrix, make_vector
|
5
5
|
|
6
|
-
from
|
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(
|
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 =
|
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 = [
|
87
|
-
|
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 =
|
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
|
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] *
|
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(
|
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(
|
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 =
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
195
|
-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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=
|
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
|
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.
|
581
|
+
self.widget.draw()
|
582
582
|
self.widget.after(250, self.redraw)
|
583
583
|
|
584
584
|
|
@@ -1,91 +1,121 @@
|
|
1
|
-
from ..
|
2
|
-
from ..
|
3
|
-
|
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.
|
12
|
-
|
13
|
-
|
14
|
-
|
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.
|
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
|
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
|
-
|
88
|
+
tets_and_end_points = []
|
62
89
|
|
63
|
-
for
|
64
|
-
if
|
90
|
+
for tile in self.tiles:
|
91
|
+
if tile.lower_bound_distance > radius:
|
65
92
|
break
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
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
|
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.
|
75
|
-
self.
|
76
|
-
|
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.
|
80
|
-
return self.
|
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.
|
88
|
-
other_cusp = other.
|
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.
|
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.
|
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.
|
120
|
-
piece1.
|
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
|
snappy/raytracing/geodesics.py
CHANGED
@@ -1,21 +1,26 @@
|
|
1
|
-
from .geodesic_tube_info import GeodesicTubeInfo
|
2
|
-
|
3
|
-
|
4
|
-
from
|
5
|
-
from
|
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 ..
|
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.
|
44
|
-
self.
|
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
|
-
|
73
|
-
geodesic_tube.
|
70
|
+
line_pieces : GeodesicLinePieces = (
|
71
|
+
geodesic_tube.compute_line_pieces(radius))
|
74
72
|
|
75
|
-
if
|
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
|
-
|
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
|
-
|
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
|
-
(
|
90
|
+
{'Heads' : ('vec4', head),
|
91
|
+
'Tails' : ('vec4', tail),
|
92
|
+
'Index' : ('int', i),
|
93
|
+
'TubeRadiusParam' : ('float', radius_param)})
|
83
94
|
|
84
|
-
|
85
|
-
|
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
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
-
|
129
|
-
print(
|
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(
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
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))
|