# How to Generate World Map for Minimal Distortion? [closed]

My problem is as follows:

I'm trying to write a program to generate a world map for an RPG that I GM. How should I go about converting spherical geometry to a flat map? Should I subdivide the sphere into hundreds of triangles or hexagons and then build off of that?

Basically, what kind of geometry should I use to map from a sphere to a flat surface in such a way that all original properties except curvature are preserved (including distance and area)?

• Map projections. Long story short, it's not possible to make one flat map which preserves both distances and areas. The Universal Transverse Mercator system gets close, but the price is that instead of one map you have 60. I cannot help but wonder: why do you think that if such a map projection existed it wouldn't be in widespread use? Commented Apr 15, 2018 at 22:33
• You want to represent the sphere on a plane. This is called a map projection. (Don't let the word "projection" mislead you: most map projections, including the widely known Mercator and plate carrée, are not actually constructed by projecting the points from the sphere onto a plane.) Commented Apr 15, 2018 at 22:43
• xkcd.com/977 Commented Apr 15, 2018 at 23:01
• You basically asked to teach you cartography. This is a whole area of study, way too broad and real life issue. Commented Apr 16, 2018 at 6:25
• If it is a fantasy world, you could take the path of making the planet be a planar solid instead of a sphere. Put some mountain ridges along the edges of an icosahedron to disguise the fold in the landscape.
– SRM
Commented Apr 16, 2018 at 11:04

Icosahedral map

Icosahedron is a polyhedron with 20 triangular faces. Icosahedral maps are often used for RPG. You may easily convert your icosahedron into a sphere. The landmasses won't be too distorded.

When you flatten your map, it will look like figure (a) ;

You can compare the globe (b) and the icosahedron (c). The distortion is not too big.

If you don't want to have your continents cut in half when you flatten the map, you can move the triangles. The Dymaxion map is a good example of what you can obtain with this method ; The continents shapes and proportions are fairly respected.

The biggest inconvenience is that your map may have a weird shape, and you'll have to cut the oceans. But there is no perfect solution. If you want to preserve areas and distances, this is one of the best options.

• Marked as answer. I wanted an answer about a specific tile-able technique that works well reliably. This fits perfectly. Thanks for your answer. Commented Apr 20, 2018 at 22:52

If I understand your question correctly, it's not so much that you want an accurate projection per se; it's that you want to have a character (char) anywhere on a globe looking like he's the centre of his map, and you want to be able to generate an accurate distance measurement between that char and another char.

If that's the case, then AlexP's comment is actually the 'right' answer. The Universal Transverse Mercator projection method is actually how all online maps (Apple, Bing, Google OpenStreetMaps, etc.) work. For them, you want to tile the map anyway; you don't want a phone (for instance) downloading an entire global map everytime they add a new housing development in Bringyabarraback or pave a street in Weardafarkarwee territory. You only want the relevant map tiles to download, and that means map tiles for where you are and where you're going on a just in time basis.

In terms of accuracy, these maps are VERY accurate translations of the sphere because they switch to a new tile whenever you get to within the point of any meaningful error creeping in. So, if you have multiple chars on a 'map', you just put them on the relevant tile, and as they move off it you download the adjacent tile and keep going.

Determining distances is a little more difficult, BUT because your tiles are coherent on the boundaries, you just put up the tiles between point A and point B, measure the straight line distance between the two, AND THE ANGLE, and the measuring the distance is simple trigonometry. This approach is surprisingly accurate and will do what you want it to within reasonable tolerances. (I'm not sure how accurate a distance calculation you need, but the fact that you're talking map projection types means you either need VERY accurate or you've over-cooked the problem, no offense.)

All things considered, as AlexP suggests this is sufficient an approach for pretty much every GPS based navigation system on the planet. I'd seriously suggest you start your search there and if it's not accurate enough, revisit your requirements to figure out why you need better accuracy than that.