geoPolyhedralMurphey = function() {
const raw = d3.geoAzimuthalEqualAreaRaw;
function clipPole(lambda, phi) {
let pole = abs(phi) - 1 * lambda ** 2 - 0.78;
if (pole > 0) phi -= sign(phi) * pole;
return raw(lambda, phi);
}
clipPole.invert = raw.invert;
function faceProjection(face) {
return d3.geoProjection(clipPole).rotate([-face.site[0], -face.site[1]]);
}
return d3
.geoPolyhedralVoronoi()
.parents([-1, 0, 0, 1, 0, 4, 4, 5])
.angle(30)
.polygons(polygons)
.faceProjection(faceProjection)
.fitExtent([[0, 0], [width, width / 2]], { type: "Sphere" })
.rotate([35, 0])
.precision(0.1);
}