Ideal horoball packings and unit-equilateral realizations of triangulated spheres: solvers, placements, homotopy continuation, and bracket proofs.
This repository contains C and Python tools for computing ideal horoball packings, certifying their existence by a sub/supersolution bracket, and continuing ideal bends to unit-equilateral Euclidean realizations.
The C tools and the ideal-packing Python tools read face lists
a,b,c;d,e,f;...
one triangulation per line. python/puffup.py reads and writes JSON.
The underlying geometric model is the usual product metric: adjacent vertices i and j have edge length u[i] u[j], with one vertex sent to infinity and its neighbors pinned on the boundary. The unknowns are the remaining positive vertex weights.
This repository has three main jobs:
- compute the weights and associated flat placement
- certify existence by a bracket argument with explicit slack checks
- continue the ideal bends to equilateral realizations and check closure
The motivating combinatorial inputs in the broader project are prime 6-nets; the command-line C tools take triangulated-sphere face lists.
make
make clean
Requires a C compiler and libm (standard on macOS and Linux).
Solve for the horoball weights u[v] of a triangulation.
C version:
../clers/bin/clers decode < 20.txt | src/horou_c > horou_20.bin
Python version:
echo "CCAE" | ../clers/bin/clers decode | python3 python/horou.py
Solve for the weights and place vertices in the upper half-plane.
C version:
../clers/bin/clers decode < 20.txt | src/horoz_c > horoz_20.bin
Python usage:
from horou import horou
from horoz import horoz
u = horou(poly)
pos = horoz(poly, u)
Certify existence by bracketing the solution between a sub-solution and a super-solution.
The proof code checks five positive-slack conditions:
- mono
- excess
- triangle
- convex
- boundary
Python examples:
echo "CCAE" | ../clers/bin/clers decode | python3 python/proof.py --verbose
../clers/bin/clers decode < 20.txt | python3 python/proof.py
C example:
../clers/bin/clers decode < 20.txt | src/proof_c > proof_20.bin
Continue the ideal bends to the unit-equilateral Euclidean problem by homotopy in the corner angle.
C version:
../clers/bin/clers decode < 20.txt | src/puffup_c
The Python version reads and writes JSON:
python3 python/puffup.py --in input.json --out output.json
The base-bend reconstruction is described in docs/puffup_pyp.md.
The checked-in table data/eps_needed.txt records the smallest tested eps proving all prime 6-nets for each v through v = 80.
The checked-in data/v4_50_closure.txt records successful closure for
all 8,239,684 prime 6-nets through v = 50; one net needed a retry.
In particular:
- the checked-in results currently go through
v = 80 1/8000suffices fromv = 60throughv = 80
For multicore sweeps:
./scripts/run_proof.sh 81
./scripts/run_proof.sh 81 100
./scripts/find_eps.sh 81
./scripts/run_closure.sh 4 50
The separate clers repository handles combinatorial naming and
decoding of triangulations. This repository handles ideal horoball
packings and their continuation to equilateral realizations.
The code and documentation in this repository were drafted primarily with Claude Code under the author's direction, with additional advice, review, and supervision from ChatGPT.
See LICENSE.