Sha256: 449dd00321f65455c460795e86247d010c20c6bfd42ca8b0234e48e9bd1c5a15
Contents?: true
Size: 717 Bytes
Versions: 2
Compression:
Stored size: 717 Bytes
Contents
import "projection"; function ginzburg8(λ, φ) { var λ2 = λ * λ, φ2 = φ * φ; return [ λ * (1 - .162388 * φ2) * (.87 - .000952426 * λ2 * λ2), φ * (1 + φ2 / 12) ]; } ginzburg8.invert = function(x, y) { var λ = x, φ = y, i = 50, δ; do { var φ2 = φ * φ; φ -= δ = (φ * (1 + φ2 / 12) - y) / (1 + φ2 / 4); } while (Math.abs(δ) > ε && --i > 0); i = 50; x /= 1 - .162388 * φ2; do { var λ4 = (λ4 = λ * λ) * λ4; λ -= δ = (λ * (.87 - .000952426 * λ4) - x) / (.87 - .00476213 * λ4); } while (Math.abs(δ) > ε && --i > 0); return [λ, φ]; }; (d3.geo.ginzburg8 = function() { return projection(ginzburg8); }).raw = ginzburg8;
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
d3js-plugins-rails-0.0.8 | vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg8.js |
d3js-plugins-rails-0.0.7 | vendor/assets/javascripts/d3/plugins/geo/projection/ginzburg8.js |