Published
Edited
Sep 26, 2018
1 star
Insert cell
Insert cell
LOTUS = map(geoLotus().rotate([165, 0]), { svg: true })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more