Published
Edited
Oct 14, 2020
1 fork
19 stars
Also listed in…
isometric
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function edge(tileA,tileB) {
const [ax,ay,az] = tileA;
const [bx,by,bz] = tileB;
return [(ax+bx)/2, (ay+by)/2, (az+bz)/2];
}
Insert cell
Insert cell
function tiles(edge) {
const [ex,ey,ez] = edge;
const [ax,ay] = [ex+mod2(ex), ey-mod2(ey)];
const [bx,by] = [ex-mod2(ex), ey+mod2(ey)];
return [[ax,ay,-(ax+ay)], [bx,by,-(bx+by)]];
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mod2 = n => Math.abs(n%2)
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