The Mercator projection is available as d3.geo.mercator.
This example is the second of three in the Path Transitions tutorial; see the previous example for context.
The desired pairing of numbers for path interpolation is like this:
M x0, y0 L x1, y1 L x2, y2 L x3, y3 L xR, y4
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
M xl, y0 L x0, y1 L x1, y2 L x2, y3 L x3, y4
Where xl
is some negative value off the left side, and xr
is some positive value off the right side. This way, the first point ⟨x0,y0⟩ is interpolated to ⟨xl,y0⟩; meaning, the x-coordinate is interpolated rather than the y-coordinate, and so the path appears to slide off to the left. Likewise, the incoming point ⟨xr,y4⟩ is interpolated to ⟨x3,y4⟩.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n This file system is case- > tmp; echo -n in >> TMP; echo sensitive >> tmp; cat tmp; rm tmp; rm TMP 2> /dev/null |