Published
Edited
May 25, 2020
3 forks
19 stars
Insert cell
Insert cell
Insert cell
distanceToCenter = (i, j) => {
const centerX = p.margin.l / 2 + p.width / 2 - p.margin.r / 2
const centerY = p.margin.t / 2 + p.height / 2 - p.margin.b / 2
return Math.sqrt((centerX - i) ** 2 + (centerY - j) ** 2)
}
Insert cell
p = {
return {
size: 7,
stepX: 1.5,
stepY: 20,
margin: {t: 100, r: 100, b: 150, l: 100},
width: 594,
height: 841,
}
}
Insert cell
rnd = () => {
return (Math.random() * 2 - 1) * p.size
}
Insert cell
Spline = require('https://bundle.run/svg-catmull-rom-spline@0.0.1')
Insert cell
Rune = require('https://bundle.run/rune.js@1.1.8')
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