Scale-Dependent Sampling
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Jun 7, 2013
This example animates a map projection zooming in and out, demonstrating scale-dependent sampling. As the equirectangular projection scales from 145 to 4,640, the graticule and sphere outline remain smooth, while the red equator line is resampled; its resampled points are drawn as circles, showing how point density changes with map scale. The animation uses D3 v3’s `d3.geo.path`, `d3.geo.graticule`, and `d3.interpolate` to tween the projection's scale and translation, rendering to a Canvas via a buffered path context that extracts the resampled coordinates.
AI-generated descriptiongpl-3.0 Licensed