PDA

View Full Version : GIMP Script: Mercator to Dodecahedron



saulgoode
01-31-2011, 01:04 PM
Though it may not be particularly useful, I have written a script for GIMP (http://chiselapp.com/user/saulgoode/repository/script-fu/wiki?name=sg-projection-to-dodecahedron) which will map an Mercator projection to a result than can be printed, cut, and folded into a dodecahedral "globe".

The mapping is not perfect, since the faces of the "globe" are flat, but it generally achieves the result I wanted. Note that the original projection should have a 1:1 width-to-height aspect ratio. The actual width of the original does not matter other than larger projections will result in sharper results (the following image used an original projection that was only 320x320 pixels).

http://flashingtwelve.brickfilms.com/GIMP/Images/dodeca-globe.png

Jaxilon
01-31-2011, 02:27 PM
That's pretty cool. Imagine a bunch of these hanging in my office.

Redrobes
01-31-2011, 07:22 PM
Oh that could be ever so useful. The sample you provide looks like the original image was of low res cos its blurring badly on the globe. Can it handle large initial images to prevent that. We have loads of people here who make world maps which are about 4K in size and I am sure would like to see them as a globe.

I will rep you for this great work.

RobA
01-31-2011, 07:48 PM
Thanks for popping in a posting SG!

-Rob A>

Hai-Etlik
01-31-2011, 09:36 PM
Equirectangular mercator? Those are two different projections.

saulgoode
01-31-2011, 11:26 PM
Oh that could be ever so useful. The sample you provide looks like the original image was of low res cos its blurring badly on the globe. Can it handle large initial images to prevent that. We have loads of people here who make world maps which are about 4K in size and I am sure would like to see them as a globe.
I was able to create a globe (http://flashingtwelve.brickfilms.com/GIMP/Images/world-dodecahedron.jpg) from this NASA image (http://veimages.gsfc.nasa.gov/7100/world.topo.bathy.200401.3x5400x2700.jpg) (rescaled to 2700x2700) on my puny 1.8 GHz single-core computer with 1 gigabyte of RAM (GIMP used about 400 Mb during processing) with little problem other than it taking about 20 minutes. I could re-structure the code to require less RAM but there is little I can do about the speed since the lion's share of the time is spent by the GIMP's mapping plug-in (written in C). Most modern processors should be about five or ten times faster than mine.


Equirectangular mercator? Those are two different projections.

I appreciate your correction and I have updated the script's name (see original post for links). Please let me know if my terminology is still off or I exhibit any other misconceptions.

I am not very knowledgable about cartography and mainly wrote this script as an excercise to learn how to invoke GIMP's "Map Object" plug-in from a script. The plug-in interface has 49 different parameters which are all but undocumented (I wasted a good portion of a Saturday because I failed to realize that the reference axes were not [1,0,0] and [0,1,0] but [0,1,0] and [0,0,-1]).

cantab
07-09-2011, 10:25 PM
Just one comment: the dodecahedron is a great choice for a globe. However, with pentagonal faces there have to be many gaps in the flat map. An icosahedron can be used to make some interesting flat maps, http://www.progonos.com/furuti/MapProj/Normal/ProjPoly/projPoly3.html#IcosahedralMaps So if you did want to take the plugin further, adding icosahedral options may be an idea.