Code associated to the paper "From disc patterns in the plane to character varieties of knot groups"
In this repository you will find the computer code used to generate many of the pictures in the paper "From disc patterns in the plane to character varieties of knot groups", arxiv:2503.13829. The majority of the code for examples in sections 1, 2, and 4 runs in Python on a home laptop and depends on the package bella. The code for examples in section 3 is written in C++, it is self-contained but designed to run on a high-performance computing cluster (it will run on a laptop but very slowly, and only the naive version of the algorithm - which is very memory hungry - is implemented here).
Example 1.3: beads.py
Example 1.4: atom.py - This runs in parallel using multiprocessing and can use a lot of memory. Will place output CSVs, one per thread, in atom/ subdirectory.
Example 2.1: circles.py - set up to do
Example 2.4: eightfive.py for
To compile the software in this section, use a line like
g++ -O2 -Wall -Wextra -march=native schottky_slice_hard.cpp -std=c++20 -pthread -o schottky_slice_hard
Note that -Ofast introduces too many numerical errors. Everything here unless otherwise mentioned will output diagnostic and progress information to stderr
and the actual data in CSV format to stdout, so redirect stdout to an appropriate file. To make nice plots run python plot_slice_images.py (see names of CSV
files embedded in there). You need eigen.
Example 3.3: schottky_slice_easy.cpp
Example 3.7: schottky_slice_hard.cpp - also an alternative partial implementation of the improved algorithm in Remark 3.5, schottky_slice_hard_rand.cpp which will produce a lot of CSV's in a subdirectory that need to be concatenated by hand into schottky_slice_hard_rand.csv. As of 31/07/2025 the values for
Example 3.8: (in sage not C++) wielenberg_slice.sage - alternatively modify modify lines 102-104 of the C++ source for Example 3.9 as appropriate.
Example 3.9: whitehead_cusp.cpp - for Example 3.8 modify lines 102-104 as appropriate.
Example 3.10: solomon_cusp.cpp
Example 3.11: pendulum.cpp
Example 4.3: Fig. 17 limit sets (only) plotted by fig8path_limit_sets.py. Full computation including Fig. 16 is in 08_pleatingray_extensions.py