Uncut spaghetti


Can you arrange numbers on any of the Platonic solids such that all numbers are green? Any other interesting polyhedrons?


MathPickle made a small mistake. See that green 12, in the picture below? That should be red. The path would go 12, 0, 6, 11, 3, 7, 2, 10, 4, 9, 5, at which point it's obviously going to get stuck.


I wrote 3 programs related to this problem. The 1st (a.py), handles the case where numbers are sequential, from left to right, top to bottom. The 2nd (b.py), handles the case where the numbers labelling each grid cell are specified by the user. The 3rd (c.py), handles arbitrary graphs, which can be used for encoding the connectivity of faces on polyhedra.

I wrote a PaperJS version of the 1st puzzle, using the original rules. That is, without cylindrical or toroidal stitching. I'm hoping to use this to convince Mr Pickle (Gord Hamilton) that he should offer interactives on his site, using PaperJS. The benefit of PaperJS over most options, is that the user can experiment with the program without steps prior. Most options require you to download and install something. PaperJS does not. Another option would be WebGL, but the learning curve is steep, and I doubt working with images and text would be easier in WebGL than it is in PaperJS. I could be wrong. Also, WebGL offers 3D coordinates, and so you'd probably need a lot of helper functions to convert between world and screen coordinates. You might even need to handle transformation matrices yourself, which would make the learning curve even steeper. If I can have a hand in coding PaperJS apps for Mr Pickle, I will. But none of these should be particularly difficult to code, just time consuming.