Skip to content

Instantly share code, notes, and snippets.

@curran
Last active October 1, 2017 11:52
Show Gist options
  • Save curran/98dbd33499237ffeec2af8e5737ccec1 to your computer and use it in GitHub Desktop.
Save curran/98dbd33499237ffeec2af8e5737ccec1 to your computer and use it in GitHub Desktop.
Flat Earth Map
license: mit

A globe that spins, using the "Flat Earth" projection, which is also called the Azimuthal Equidistant projection. Uses world-110m from TOPOJSON World Atlas. Inspired by This Is a Globe.

I'm actually really intrigued that there are a bunch of people convinced the Earth is flat. Have you heard of this #FlatEarth "movement"? This is the map projection they believe is True. There's a wall of ice at the edge and beyond that it's just ice all the way.

forked from curran's block: Spinning Globe

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/topojson.v1.min.js"></script>
</head>
<body style="margin: 0">
<svg width="960" height="500"></svg>
<script>
const path = d3.select('svg').append('path');
const projection = d3.geoAzimuthalEquidistant();
const geoPath = d3.geoPath().projection(projection);
d3.json('world-110m.json', (error, world) => {
const land = topojson.feature(world, world.objects.land);
d3.timer(t => {
projection.rotate([t * 0.005, Math.sin(t * 0.00005) * 45 -90]);
path.attr('d', geoPath(land));
});
});
</script>
</body>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment