Appendix E: Thesis Research Reproduction & Setup
Each script uses the PyEQSP Python library (this repository) to reproduce results originally computed in MATLAB using the EQ Sphere Partitioning Toolbox.
Paul Leopardi, “Distributing points on the sphere: Partitions, separation, quadrature and energy”, UNSW, 2007.
Note
Beta Feedback Wanted If you are running these thesis reproduction scripts on your local system, we would love to know if the results are consistent with your hardware. Please share a screenshot or report any numerical variances in our Feedback Hub.
Script Inventory
The following table maps the scripts in examples/phd-thesis/src/ to the original thesis figures.
Script |
Thesis Figure |
Backend |
Description |
|---|---|---|---|
|
Fig 3.1 |
PyVista |
3D partition EQ(2, 33) on S² |
|
Fig 3.3 |
Matplotlib (Agg) |
Algorithm illustration for EQ(3, 99) |
|
Fig 3.4 |
Matplotlib (Agg) |
Max diameter coefficients of EQ(2, N), N=1..100,000 |
|
Fig 3.5 |
Matplotlib (Agg) |
Max diameter coefficients of EQ(3, N), N=1..100,000 |
|
Fig 3.6 |
Matplotlib (Agg) |
Max diameter coefficients of EQ(4, N), N=1..100,000 |
|
Fig 3.7 |
Matplotlib (Agg) |
Max diameters of EQ(d, 2^k), d=2..8, k=1..20 (parallelized) |
|
Fig 4.1 |
PyVista |
3D EQ code EQP(2, 33) with partition EQ(2, 33) |
|
Fig 4.2 |
Matplotlib (Agg) |
Min distance coefficient of EQP(2, N), N=1..20,000 |
|
Fig 4.3 |
Matplotlib (Agg) |
Min distance coefficient of EQP(3, N), N=1..20,000 |
|
Fig 4.4 |
Matplotlib (Agg) |
Min distance coefficient of EQP(4, N), N=1..20,000 |
|
Fig 4.5 |
Matplotlib (Agg) |
Packing density of EQP(2, N), N=1..20,000 |
|
Fig 4.6 |
Matplotlib (Agg) |
Packing density of EQP(3, N), N=1..20,000 |
|
Fig 4.7 |
Matplotlib (Agg) |
Packing density of EQP(4, N), N=1..20,000 |
|
Fig 4.8 |
Matplotlib (Agg) |
Wyner ratios for EQP(2), EQP(3), EQP(4), N=2..20,000 |
|
Fig 4.9 |
Matplotlib (Agg) |
Wyner ratios for EQP(5), EQP(6), EQP(7), N=2..20,000 |
|
Fig 4.10 |
PyVista |
EQP(2, 33) Voronoi edges on S² in 3D |
|
Fig 5.1 |
Matplotlib (Agg) |
Normalized energy of EQP(d, N), d=2,3,4 |
|
Fig 5.2 |
Matplotlib (Agg) |
Convergence of normalized energy |
|
Fig 5.3 |
Matplotlib (Agg) |
Energy coefficient of EQP(2, N), N=2..20,000 |
|
Fig 5.4 |
Matplotlib (Agg) |
Energy coefficient of EQP(3, N), N=2..20,000 |
|
Fig 5.5 |
Matplotlib (Agg) |
Energy coefficient of EQP(4, N), N=2..20,000 |
All scripts save a PNG output file to the current directory and print a confirmation message on completion.
Reproduction Notes
3D Figures: Visualizations using
PyVistaare not always bitwise identical across hardware due to non-deterministic GPU rasterization, even when the underlying mesh is identical.Min-distance: Unified search using KDTrees ensures \(O(N \log N)\) scaling, allowing \(N=20,000\) to complete in seconds.
Riesz Energy: Exact summations for \(s > 0\) use memory-efficient block-tiling to ensure \(O(N)\) peak RAM.
Running Time Benchmark (Section 3.10.2)
Beyond figure reproduction, the project includes a formal replication of the performance benchmark described in Section 3.10.2: Running time. It verifies that the recursive zonal partitioning algorithm scales as \(O(N^{0.6})\).
To execute:
python3 benchmarks/src/benchmark_eq_regions.py --max-d 11 --max-k 22
Technical Setup & Troubleshooting
Reproduction scripts for 3D figures require the PyVista package (pip install 'pyeqsp[pyvista]').
Bitwise Reproducibility
PyEQSP aims for identical numerical results to the original thesis. But users should be aware of two potential sources of variance:
Hardware Rasterization: 3D plots generated via PyVista use GPU hardware. Minor variances (e.g., ~2 pixel differences) can occur between different GPUs or drivers due to non-deterministic anti-aliasing.
Floating-Point Drift: While we use
numpy.longdoublefor critical recursions, extreme depths in high dimensions (\(d > 8\)) may show sub-microscopic differences across different CPU architectures.
Headless Execution
To run reproduction scripts on a server or in CI without a display:
Matplotlib scripts (numerical plots, e.g., fig_3_4_max_diam_s2.py) save PNGs
directly via the Agg backend and do not require a display:
python3 examples/phd-thesis/src/fig_3_4_max_diam_s2.py
3D PyVista scripts (e.g., fig_3_1_partition_s2_33.py) set pv.OFF_SCREEN = True
internally and save screenshots directly; no display or environment variable is required:
python3 examples/phd-thesis/src/fig_3_1_partition_s2_33.py
[!NOTE] The
PYVISTA_OFF_SCREENshell environment variable is not read by theeqspvisualization library. Off-screen mode in 3D scripts is controlled by the Python attributepv.OFF_SCREEN = True, which the thesis scripts set directly.