polyhedra_cut_locus
Calculation of the cut locus on surfaces of polyhedra
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.1%) to scientific vocabulary
Repository
Calculation of the cut locus on surfaces of polyhedra
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
[//]: <> (hello)
Polyhedra Cut Locus Calculation
Visualize cut loci of the 2-d surfaces of polyhedra
Tested with Python 3.8.10 on Ubuntu (versions 20.04, 22.04, and 24.04) and on Windows 11
[//]: <> (python cut_locus.py -s tetra --legend --font 14 --display-dims 7.5 5.5) [//]: <> (python unfolding.py -s cube --legend --font 11 --display-dims 6.5 5.5) [//]: <> (python unfolding.py -s octa --voronoi --legend --font 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)
bash
cd <name of folder>
pip3 install -e .
* Option 2: Clone Repository, then install the python package (assumes Git is installed)
bash
git clone https://github.com/pranavraj575/polyhedra_cut_locus
pip3 install -e polyhedra_cut_locus
Installation Test
Run cut_locus.py from terminal/command prompt in the polyhedracutlocus folder
(move to correct folder with cd <name of folder>)
Example:
bash
python3 cut_locus.py --shape tetrahedron --center-pt --legend
To see the possible arguments, run the following:
bash
python3 cut_locus.py -h
Note: try replacing python3 with python if you get error "Python was not found"
Cut Locus:
Run cut_locus.py from terminal/command prompt in the polyhedracutlocus folder
(move to correct folder with cd <name of folder>)
Example:
bash
python3 cut_locus.py --shape tetrahedron --center-pt --legend
Path Unfolding:
Run unfolding.py from terminal/command prompt in the polyhedracutlocus folder
Example:
bash
python3 unfolding.py --shape cube
Voronoi Star Unfolding:
Same as path unfolding, with the additional argument --voronoi-star
Example:
bash
python3 unfolding.py --shape octahedron --voronoi-star
Implemented shapes:
Tetrahedron:
bash python3 cut_locus.py --shape tetrahedron python3 unfolding.py --shape tetrahedron --voronoi-star[\]: <> (python cutlocus.py -s tetra --source 3 --point -.5 -0.86602540378 --save images/tetrahedron/tetralocusthree.png --display-dims 9 6 --legend --no-show --font 14) [\]: <> (python unfolding.py -s tetra --source 0 --point .5 0.86602540378 --label-unwrapping --save images/tetrahedron/initialvoronoistar.png --display-dims 6.5 5.5 --font 20 --voronoi-star --ignore-points --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/tetrahedron/tetralocusthree.png" width=420 /> <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/tetrahedron/initialvoronoi_star.png" width=420 />Cube:
bash python3 cut_locus.py --shape cube[\]: <> (python cutlocus.py --shape cube --point .8 .2 --source 2 --legend --display-dims 7 5.5 --save images/cube/democutlocus.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/cube/democut_locus.png" width=690 />Octahedron:
bash python3 cut_locus.py --shape octahedron[\]: <> (python cutlocus.py -s octa --source 6 --point 0.45 .5 --display-dims 12 6 --font 14 --save images\octahedron\unlabeledlocustau1.png --legend --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/octahedron/unlabeledlocus_tau1.png" width=690 />Dodecahedron:
bash python3 cut_locus.py --shape dodecahedron --click python3 unfolding.py --shape dodecahedron --click --voronoi-star[\]: <> (python cutlocus.py -s dodeca --source 11 --point 0 0 --display-dims 12 10 --font 17 --save images/dodecahedron/dodecalocuszero.png --no-show) [\]: <> (python unfolding.py -s dodeca --source 0 --point 0 0 --display-dims 11 10 --font 17 --voronoi-star --save images/dodecahedron/dodecastarzero.png --ignore-points --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/dodecahedron/dodecalocuszero.png" width=420 /> <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/dodecahedron/dodecastar_zero.png" width=420 />Icosahedron:
bash python3 cut_locus.py --shape icosahedron --click python3 unfolding.py --shape icosahedron --click --voronoi-star[\]: <> (python cutlocus.py -s icosa --source 17 --point 0 0 --display-dims 15 10 --font 17 --save images/icosahedron/icosalocuszero.png --no-show) [\]: <> (python unfolding.py -s icosa --source 0 --point 0 0 --display-dims 12 10 --font 17 --voronoi-star --save images/icosahedron/icosastarzero.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/icosahedron/icosalocuszero.png" width=420 /> <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/icosahedron/icosastar_zero.png" width=420 />Prism:
replace
<n>with the n-gon you want (3<=n)bash python3 cut_locus.py --shape prism --n <n>[\]: <> (python cutlocus.py --shape prism --n 5 --legend --source 5 --point -.2 .69 --display-dims 9 6 --save images/displayimages/pentagonalprism.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/pentagonal_prism.png" width=690 />Antiprism:
replace
<n>with the n-gon you want (2<=n)bash python3 cut_locus.py --shape antiprism --n <n>[\]: <> (python cutlocus.py --shape antiprism --n 5 --legend --source 0 --point -1.3 1.5 --display-dims 10 8 --save images/displayimages/pentagonalantiprism.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/pentagonal_antiprism.png" width=690 />Pyramid:
replace
<n>with the n-gon you want (3<=n<=5)bash python3 cut_locus.py --shape pyramid --n <n>[\]: <> (python cutlocus.py --shape pyramid --n 5 --legend --source 0 --point -.69 .420 --display-dims 12 5 --save images/displayimages/pentagonalpyramid.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/pentagonal_pyramid.png" width=690 />Elongated Pyramid:
replace
<n>with the n-gon you want (2<=n<=5)bash python3 cut_locus.py --shape longpyramid --n <n>[\]: <> (python cutlocus.py --shape longpyramid --n 5 --legend --source 0 --point .4 -.1 --display-dims 8 5 --save images/displayimages/elongatedpentagonalpyramid.png --no-show)
Bipyramid:
replace
<n>with the n-gon you want (2<=n<=5)bash python3 cut_locus.py --shape bipyramid --n <n>[\]: <> (python cutlocus.py --shape bipyramid --n 5 --legend --source 0 --point .5 -.8 --display-dims 12 5 --save images/displayimages/pentagonalbipyramid.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/pentagonal_bipyramid.png" width=690 />Elongated Bipyramid:
replace
<n>with the n-gon you want (3<=n<=5)bash python3 cut_locus.py --shape longbipyramid --n <n>[\]: <> (python cutlocus.py --shape longbipyramid --n 4 --legend --source 0 --point .5 -.8 --display-dims 7 5 --save images/displayimages/elongatedoctahedron.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/elongated_octahedron.png" width=690 />Torus:
bash python3 cut_locus.py --shape torus[\]: <> (python cutlocus.py --shape torus --point .69 .420 --source 00 --display-dims 5.5 5.5 --save images/2torus/sample.png --no-show) <img src="https://github.com/pranavraj575/polyhedracut_locus/blob/main/images/2torus/sample.png" width=690 />Mirror (two n-gons glued to each other):
replace
<n>with the n-gon you want (3<=n)bash python3 cut_locus.py --shape mirror --n <n>[\]: <> (python cutlocus.py --shape mirror --legend -n 6 --point .5 .5 --source 0 --display-dims 8 4 --save images/displayimages/hexagonalmirror.png --no-show) <img src="https://github.com/pranavraj575/polyhedracutlocus/blob/main/images/displayimages/hexagonal_mirror.png" width=690 />
Owner
- Login: pranavraj575
- Kind: user
- Repositories: 1
- Profile: https://github.com/pranavraj575
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Rajbhandari" given-names: "Pranav" orcid: "https://orcid.org/0009-0004-4933-5204" title: "Polyhedra Cut Locus" version: 4.20.69 date-released: 2023-12-05 url: "https://github.com/pranavraj575/polyhedra_cut_locus"
GitHub Events
Total
- Push event: 22
Last Year
- Push event: 22
Dependencies
- matplotlib *
- numpy *
- scipy *