Sunday, July 19, 2015

Papercraft Pluto, and a papercraft planet pattern generator

Several years ago a friend of mine asked me to make a program for mapping a globe onto a twenty-sided die.  I wrote a simple Python script, some basic coordinate remapping and image processing with a simple GUI wrapped around it.  The script takes an image that's a flat projected map of a planet, builds a virtual icosahedron around it, projects the image of each part of a globe onto the faces of the icosahedron, and then arranged them on an output image along with fold lines and glue tabs where needed.

Other than sending it to the friend who requested it I didn't do anything else with the software until the recent flyby of Pluto by the New Horizons probe.  Seeing the images coming down I thought I'd try to make a papercraft globe of Pluto, once good surface maps were available.  The 20-sided shape that my script generated was a crude approximation of a globe, so I reworked it to generate an 80-sided geodesic that better approximates a sphere.

You can download the finished Python script here.  You will need Python 2.7.8 to run it, and you will also have to install the Python Image Library.  The program should be fairly self-explanatory.  There are buttons to load the source file, and save the finished destination file.  You can adjust the scale - by default it makes the output file have about the same DPI as the image file, but you may want to scale it up if working from a low-resolution image.  You can turn the glue tabs off if you wish, and set the color for the fold lines and cut lines.


There are also three sliders which are used to optionally rotate the pattern relative to the globe.  This is helpful if you want to arrange it so that some feature of the globe isn't on a cut line or vertex.

I'm still waiting for a good global map of Pluto to use.  So far the best I've found was unofficial and incomplete, but I was able to use it to make this:





(you can download the pattern to make your own here)  Once better imagery has been downloaded and released I'll put together a better globe.  But you don't need to wait, you can download the script and make your own.

7/29/2015 update:  I found a better surface map here and used it to make a higher resolution papercraft model.