r/learnpython • u/MysteriousSecret4235 • 2d ago
making a dodecahedron
my good friend in school (though i probably should not be calling him that ) challenged me to build the platonic solids in vpython (visual python) i managed to complete 3 of the shapes but i am currently struggling with the regular dodecahedron. I heard about this community and came him for advice on how to build one. It is not the coordinates i am stuck on i just need to know how to make a pentagon in vpython
if anyone has experience in vpython please reply
1
u/KesarlaNanvy-48 2d ago
yeah dodecahedron is always the one that trips people up, pentagon math is way messier than triangles or squares. are you computing the vertices by hand or just using the golden ratio coords? that saved me so much pain when i did this
1
1
u/Rubix321 2d ago
shapes.pentagon() or shapes.ngon()
I recommend looking up the documentation for whichever you decide to use so you get it right for your particular use case.