Public
Edited
Nov 24, 2023
Fork of Iron filings
1 star
Insert cell
Insert cell
Insert cell
forceField = (x, y) => ({
x: (x - w / 2) / ((x - w / 2) ** 2 + (y - h / 4) ** 2),
y: (y - h / 4) / ((x - w / 2) ** 2 + (y - h / 4) ** 2)
})
Insert cell
gridStep = 20
Insert cell
drawStreamPlot()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
module = (v) => (v.x ** 2 + v.y ** 2) ** 0.5
Insert cell
removeDuplicates = (l) => {
return l.reduce((p, c, i, a) => {
if (c?.cell !== a[i - 1]?.cell) {
p.push(c);
}
return p;
}, []);
}
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