Map Toy

Map Toy is a small web application to experiment with projections of the world's geography on a plane map.

What are projections?

The surface of Earth is a sphere, approximatively. It is not possible to draw it on a flat surface at scale: some lengths will be more stretched than others, it is not avoidable.

But it is possible to preserve some features of the spherical geography on maps.

Projections are ways to draw a map, ways to compute where each place in the world should be placed. There are several different projections because there are several different features we may want to show faithfully, and it is not possible to keep all of them on the same map.

Note that most projections have a small central area where all features are approximately preserved. Therefore, we do not bother about details of projections when looking at maps for a limited region. But maps of the whole world or a significant part of it will be distorted some way.

The orthogonal projection

The orthogonal projection shows half the Earth from very far, say from the Moon with good cloud-piercing binoculars. The map appears as a circular disc.

The center of the map will show features almost undistorted while areas close to the border are viewed sideways and are therefore flattened, and the other side of the Earth is not visible at all.

People will sometimes draw the map for each half on the Earth side by side.

Conformal projections

Conformal projections are projections that have the property of preserving the shape of small areas: they will appear the way they would at the center of an orthogonal projection.

The price for this property is that small areas far from each other will be shown at very different scales. This is the reason why, on the world map we all have in mind, the Mercator projection, Greenland appears huge compared to the Arabian Peninsula, even though it is smaller, roughly the same area as Saudi Arabia.

Cylindrical projections

Cylindrical projections are projections that can be imagined in two steps. First, puncture the surface of Earth at the poles, or any pair of opposite points, and enlarge the holes and stretch the surface to make it a cylinder. Then, slice the cylinder vertically to flatten it.

Horizontally, cylindrical projections work like a Pac-Man arena: if you go out on the right, you come back on the left. Interactive maps will allow to scroll horizontally without hitting a border.

Distances along any parallel are on scale, but the scale is not the same on all parallels: it goes to infinity close to the poles and decreases to a minimum on the equator.

The polar projection

The polar projection is realized by imagining the Earth is hollow and transparent and its landscape is tinted, and shining a light from a point on its surface to project the tint on a screen. The screen is usually perpendicular to the radius to the projector, to keep everything symmetrical around that axis.

The polar projection is conformal, it preserves the shape of small areas. Parts close to the projector are hugely enlarged. An area that encloses the projector will appear inverted, going to infinity with its exterior appearing as a hole; it is because when you are on the north pole, Antarctica is in all directions.

How this toy works

Operation

Click on the barely visible pencil on the top-right corner. Edit the description of the map(s). Click on the arrow button (or press shift-enter).

See the examples for the syntax and features.

It is possible to change the resolution of the map with the canvas(width, height) function.

It is possible to draw several maps on the same canvas, and to draw several canvas in a single description.

Coordinate system

Examples

// Polar projection centered on Paris
map({ proj : "polar", center : "48.8567 N 2.3522 e", up : "N" });
// Northern and Southern hemisphers
map({
  proj : "orthogonal",
  center : [ 0, 0, 1 ],
  up : [ -1, 0, 0 ],
  w : "50%",
});
map({
  proj : "orthogonal",
  center : [ 0, 0, -1 ],
  up : [ -1, 0, 0 ],
  x : "50%",
});
map({ proj : "orthogonal", center : [ 1, 0, 0 ], up : [ 0, 0, 1 ] });
// Negaustralia (using furthest point from the coastline)
map({ proj : "polar", center : "23.03 N 47.83 W", up : "N", radius : 15 });

TODO

Author

© 2021 Nicolas George

Total or partial copies allowed provided the source is written and the meaning not betrayed.