geoLotus = function() {
const face1 = {
face: [[-135, 89.9], [-89.9, cut], [-180, cut]],
project: d3
.geoBonne()
.parallel(parallel3)
.rotate([121, 0]),
children: []
};
const face2 = {
face: [[135, 89.9], [180, cut], [89.9, cut]],
project: d3
.geoBonne()
.parallel(parallel3)
.rotate([-121, 0]),
children: []
};
const face3 = {
face: [[0, 89.9], [89.9, cut], [-89.9, cut]],
project: d3
.geoBonne()
.parallel(parallel3)
.rotate([0, 0]),
children: []
};
const face0 = {
face: [[-180, cut], [-89.9, cut], [89.9, cut], [180, cut]],
project: d3.geoConicConformal().parallels([parallel1, parallel2]),
children: [face1, face2, face3]
};
function facefind(lambda, phi) {
lambda *= degrees;
phi *= degrees;
if (phi < cut) return face0;
else if (-180 <= lambda && lambda <= -89.9) return face1;
else if (180 >= lambda && lambda >= 89.9) return face2;
else return face3;
}
return d3
.geoPolyhedral(face0, facefind)
.precision(0.1)
.preclip(preclip);
}