Sha256: eb2e913f03f0be2290ce5bb28335de1337154152fd5eeb5601924e55092af0e9

Contents?: true

Size: 631 Bytes

Versions: 4

Compression:

Stored size: 631 Bytes

Contents

function mtFlatPolarParabolic(λ, φ) {
  var sqrt6 = Math.sqrt(6),
      sqrt7 = Math.sqrt(7),
      θ = Math.asin(7 * Math.sin(φ) / (3 * sqrt6));
  return [
    sqrt6 * λ * (2 * Math.cos(2 * θ / 3) - 1) / sqrt7,
    9 * Math.sin(θ / 3) / sqrt7
  ];
}

mtFlatPolarParabolic.invert = function(x, y) {
  var sqrt6 = Math.sqrt(6),
      sqrt7 = Math.sqrt(7),
      θ = 3 * asin(y * sqrt7 / 9);
  return [
    x * sqrt7 / (sqrt6 * (2 * Math.cos(2 * θ / 3) - 1)),
    asin(Math.sin(θ) * 3 * sqrt6 / 7)
  ];
};

(d3.geo.mtFlatPolarParabolic = function() { return projection(mtFlatPolarParabolic); }).raw = mtFlatPolarParabolic;

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
d3js-plugins-rails-0.0.4 vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js
d3js-plugins-rails-0.0.3 vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js
d3js-plugins-rails-0.0.2 vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js
d3js-plugins-rails-0.0.1 vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js