About three weeks ago, I asked for help getting going with a platonic truncation project, and @Guzman_Tierno responded generously, helping me debug and teaching me some solid geometry.
My colleague Sophia suggested that, by concentrating on faces, the code could evolve from a 3-D calculation to a 2-D calculation. This was a complete rewrite, but it did not disappoint. The images are all now sharp, I believe it’s much faster, and I’ve included two double truncations, shown below.
All of this must’ve been done 1000 times before, likely even in Desmos. I would welcome references and critiques.
Awesome work!
When you asked about truncations in the other thread I was assuming that you wanted to create polyhedra by using inequalities just for fun, instead of using triangles which is the standard way.
So I didn’t tell you that I also made I graph with many polyhedra:
you can move the sliders f_figura and n
you can also click to select faces, vertices or edges:
I really like your work: there’s plenty of options and the dynamic truncations are really nice.
Maybe you could add a slider that lets the user choose the polyhedron he wants to see …
so you move the slider and you see the various polyhedra.
Or you could add some two-options sliders at the beginning of the code to turn on and off each polyhedron.
Thanks! I just added five (dynamic) cantellations. I hardcoded the edge vectors for the D12/D20. I need to learn to generate them. I guess I could look at your code…
I have been obsessing about this project. Kind of nice, but also kind of bad. Obviously, I won’t have complete or perfect code, but I feel like I’m learning a lot. Thanks again!
You did an exceptional work! I love it!
It may come in handy to many teachers.
I will use it in my lessons.
The only aspect I would improve, as I told you, is the ease of use.
The user may get scared by the many options so having a slider that simply shows what’s available would be nice. Once the user sees the polyhedra … he may start trying the other options.
If I have time I’ll try to add such a slider to your wonderful job.
I totally agree that the user interface needs a lot of work. I’ve been focusing on functionality and learning geometry myself. I studied your code a bit last week and saw how you implemented everything. I’ve done some UI stuff like that before, and I will get to it. I especially like how you had blank lines to push the “back office computation” off the screen.
Yes, visualization. After we construct & fold nets in Polypad, I ask the students to close their eyes and imagine chopping off a vertex, and imagine what shape is revealed, like a triangle or square pentagon. Then increase the truncation until all faces are regular polygons. Construct/fold shapes in PolyPad. Then increase it even more until all faces are polygons again. Construct/fold. For all these shapes, construct a table of faces, edges, and inverses, as well as images of the net and the folded solid from PolyPad or Desmos, and look for patterns of relationships between F, E, and V, leading to Eulers’ criterion for planar graphs and polyhedra. Dual polyhedra such as the cube and the octahedron truncate to the same shape, a cubeoctahedron, which can then be truncated again. In addition to discovering Euler’s formula, features can be calculated using the combinatorial technique of multi-counting and adjusting for the overcounting factor. It is also possible to edge-truncate a polyhedron, but I don’t know how to implement that yet. I just learned about cantillation, the simultaneous truncation of edges and vertices. Actually, I stumbled into it by accident while making this code. Fun! Suggestions, corrections, and any ideas are always welcome.
I’m just learning solid geometry as I go along, and for me, that’s the fun part. For example, constructing all of the vectors from minimal descriptions. As @Guzman_Tierno pointed out, this could be greatly improved by simplifying the user interface. I hope to have time for that in the next few weeks.