Published
Edited
Apr 3, 2019
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable B0 = [[0.05, 20], [0.25 ,360], [0.75, 460], [0.95, 20]].map(([x, y]) => [x * Math.min(640, width), y])
Insert cell
Insert cell
function lerp([x0, y0], [x1, y1], t) {
const s = 1 - t;
return [x0 * s + x1 * t, y0 * s + y1 * t];
}
Insert cell
Insert cell
B1 = [lerp(B0[0], B0[1], t), lerp(B0[1], B0[2], t), lerp(B0[2], B0[3], t)]
Insert cell
Insert cell
Insert cell
B2 = [lerp(B1[0], B1[1], t), lerp(B1[1], B1[2], t)]
Insert cell
Insert cell
Insert cell
B3 = [lerp(B2[0], B2[1], t)]
Insert cell
Insert cell
Insert cell
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