Sha256: 691c5a2793c1721bc8ec8aeb861156e1d40edb445dd66dd33f6ebb94a83b2a86
Contents?: true
Size: 567 Bytes
Versions: 4
Compression:
Stored size: 567 Bytes
Contents
import "projection"; function eckert6(λ, φ) { var k = (1 + π / 2) * Math.sin(φ); for (var i = 0, δ = Infinity; i < 10 && Math.abs(δ) > ε; i++) { φ -= δ = (φ + Math.sin(φ) - k) / (1 + Math.cos(φ)); } k = Math.sqrt(2 + π); return [ λ * (1 + Math.cos(φ)) / k, 2 * φ / k ]; } eckert6.invert = function(x, y) { var j = 1 + π / 2, k = Math.sqrt(j / 2); return [ x * 2 * k / (1 + Math.cos(y *= k)), asin((y + Math.sin(y)) / j) ]; }; (d3.geo.eckert6 = function() { return projection(eckert6); }).raw = eckert6;
Version data entries
4 entries across 4 versions & 1 rubygems