Visualize cut loci of the 2-d surfaces of polyhedra (paper available on arxiv)
Tested with Python 3.8.10 on Ubuntu (versions 20.04, 22.04, and 24.04) and on Windows 11
-
Interactive Cut Locus Visualization:
-
Path Unfolding Visualization:
-
Voronoi Star Unfolding Visualization:
| TABLE OF CONTENTS | |
| Installation Instructions | instructions for how to set up code |
| Installation Test | test example (tetrahedron cut locus) |
| Cut Locus | instructions for running interactive cut locus visualization |
| Path Unfolding | instructions for running interactive path unfolding visualization |
| Implemented Shapes | list of implemented polyhedra and examples of their cut loci |
| Implement New Shapes | instructions to implement new shapes |
Installation (assuming Python is installed)
-
Option 1: Download zip, then extract all
run the following in terminal/command prompt to install Python package:
(replace
<name of folder>with path of folder you extracted it to)cd <name of folder> pip3 install -e .
-
Option 2: Clone Repository, then install the python package (assumes Git is installed)
git clone https://github.com/pranavraj575/polyhedra_cut_locus pip3 install -e polyhedra_cut_locus
Run cut_locus.py from terminal/command prompt in the polyhedra_cut_locus folder
(move to correct folder with cd <name of folder>)
Example:
python3 cut_locus.py --shape tetrahedron --center-pt --legend To see the possible arguments, run the following:
python3 cut_locus.py -hNote: try replacing python3 with python if you get error "Python was not found"
Run cut_locus.py from terminal/command prompt in the polyhedra_cut_locus folder
(move to correct folder with cd <name of folder>)
Example:
python3 cut_locus.py --shape tetrahedron --center-pt --legend Run unfolding.py from terminal/command prompt in the polyhedra_cut_locus folder
Example:
python3 unfolding.py --shape cubeSame as path unfolding, with the additional argument --voronoi-star
Example:
python3 unfolding.py --shape octahedron --voronoi-starPlatonic Solids
Includes all of the platonic solids.
-
Tetrahedron:
python3 cut_locus.py --shape tetrahedron python3 unfolding.py --shape tetrahedron --voronoi-star
-
Cube:
python3 cut_locus.py --shape cube
-
Octahedron:
python3 cut_locus.py --shape octahedron
-
Dodecahedron:
python3 cut_locus.py --shape dodecahedron --click python3 unfolding.py --shape dodecahedron --click --voronoi-star
-
Icosahedron:
python3 cut_locus.py --shape icosahedron --click python3 unfolding.py --shape icosahedron --click --voronoi-star
Archimedean Solids
Includes some of the archimedean solids.
Polyhedra Families
-
Prism:
replace
<n>with the n-gon you want (3<=n)python3 cut_locus.py --shape prism --n <n>
-
Antiprism:
replace
<n>with the n-gon you want (2<=n)python3 cut_locus.py --shape antiprism --n <n>
-
Pyramid:
replace
<n>with the n-gon you want (3<=n<=5)python3 cut_locus.py --shape pyramid --n <n>
-
Elongated Pyramid:
replace
<n>with the n-gon you want (2<=n<=5)python3 cut_locus.py --shape longpyramid --n <n>
-
Bipyramid:
replace
<n>with the n-gon you want (2<=n<=5)python3 cut_locus.py --shape bipyramid --n <n>
-
Elongated Bipyramid:
replace
<n>with the n-gon you want (3<=n<=5)python3 cut_locus.py --shape longbipyramid --n <n>
Non-Polyhedra
Includes some non-polyhedra. The cut locus algorithm is not guaranteed to be correct for these implementations (though it seems to still work).




















