code: private static double polarTriangleArea(double tan1, double lng1, double tan2, double lng2) {
          double deltaLng = lng1 - lng2;
          double t = tan1 * tan2;
          return 2 * atan2(t * sin(deltaLng), 1 + t * cos(deltaLng));
      }
docs: Returns the signed area of a triangle which has North Pole as a vertex.
  Formula derived from "Area of a spherical triangle given two edges and the included angle"
  as per "Spherical Trigonometry" by Todhunter, page 71, section 103, point 2.
  See http://books.google.com/books?id=3uBHAAAAIAAJ&pg=PA71
  The arguments named "tan" are tan((pi/2 - latitude)/2).