Viewing a saved revision (read-only)
0a2a1ead557a43d6a3c55e6c60a6d39a
Spinning Globe with capitals
A spinning globe displays capital cities as proportional points, with land, water, graticules, the equator, and the prime meridian rendered in gradient colors that shift with the rotating orthographic projection. Using d3-geo’s `geoPath` and `geoOrthographic`, the animation advances longitude each frame via `requestAnimationFrame`, while city radius scales with square-rooted population data from a reduced world cities CSV. Overlaid graticule lines and country borders are clipped to the globe’s visible hemisphere, producing a stylized, night-side gradient effect.
AI-generated descriptionA spinning globe with capital cities.
Initially, I just wanted to change the rotation, add a graticule and the equator. Then I realized that those lines are clipping as expected, so tried to add the capital cities too in the same manner.
See also:
- d3-geo: projection.rotate
- Wikipedia: Aircraft principal axes
- MDN: Window.requestAnimationFrame()
- d3-geo, path - Documents the "Sphere" type used for the outline
- orthographic projection with clipping