(function() {
  d3.geo.rotate = function(z, y, x) {
    if (!(x = +x || 0) && !(y = +y || 0) && !(z = +z || 0)) {
      return identity;
    }

    var m = matrix(y, x),
        zAngle = z,
        radians = Math.PI / 180;

    function rotate(coordinates) {
      var λ = coordinates[0] * radians + zAngle,
          φ = coordinates[1] * radians,
          cosφ = Math.cos(φ),
          x = Math.cos(λ) * cosφ,
          y = Math.sin(λ) * cosφ,
          z = Math.sin(φ),
          mx = m[0],
          my = m[1],
          mz = m[2];
      mx = x * mx[0] + y * mx[1] + z * mx[2];
      my = x * my[0] + y * my[1] + z * my[2];
      mz = x * mz[0] + y * mz[1] + z * mz[2];
      return [
        Math.atan2(my, mx) / radians,
        Math.asin(mz) / radians
      ];
    }

    return rotate;
  };

  function matrix(y, x) {
    var cy = Math.cos(y *= radians),
        sy = Math.sin(y),
        cx = Math.cos(x *= radians),
        sx = Math.sin(x);
    return [
      [ cy,       0,      -sy],
      [-sx * sy, cx, -sx * cy],
      [ cx * sy, sx,  cx * cy]
    ];
  }

  function identity(λ, φ) { return [λ, φ]; }
})();

@@ -7,16 +7,48 @@
 ion() %7B%0A
+  var radians = Math.PI / 180;%0A%0A
   d3.geo
@@ -73,24 +73,24 @@
 (z, y, x) %7B%0A
-
     if (!(x 
@@ -217,41 +217,8 @@
  = z
-,%0A        radians = Math.PI / 180
 ;%0A%0A 
@@ -763,24 +763,24 @@
   %5D;%0A    %7D%0A%0A
-
     return r
@@ -792,16 +792,567 @@
 ;%0A  %7D;%0A%0A
+  rotate.invert = function(coordinates) %7B%0A    var %CE%BB = coordinates%5B0%5D * d3_geo_radians,%0A        %CF%86 = coordinates%5B1%5D * d3_geo_radians,%0A        cos%CF%86 = Math.cos(%CF%86),%0A        x = Math.cos(%CE%BB) * cos%CF%86,%0A        y = Math.sin(%CE%BB) * cos%CF%86,%0A        z = Math.sin(%CF%86),%0A        mx = m%5B0%5D,%0A        my = m%5B1%5D,%0A        mz = m%5B2%5D,%0A        rx = x * mx%5B0%5D + y * my%5B0%5D + z * mz%5B0%5D,%0A        ry = x * mx%5B1%5D + y * my%5B1%5D + z * mz%5B1%5D,%0A        rz = x * mx%5B2%5D + y * my%5B2%5D + z * mz%5B2%5D;%0A    return %5B%0A      Math.atan2(ry, rx) / radians - zAngle,%0A      Math.asin(rz) / radians%0A    %5D;%0A  %7D;%0A%0A
   functi

Add rotate.invert.