Published
Edited
Jun 5, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
random = {
const inst = rnd.createRandom(seed);
return inst;
}
Insert cell
Insert cell
Insert cell
rows = 15
Insert cell
cellSize = size / rows
Insert cell
data = math
.linspace(rows, true)
.map((v) =>
math.linspace(rows, true).map((u) => {
const theta = random.noise2D(u, v, 1 / 3);
return {
angle: Math.PI * 2 * theta,
uv: [u, v]
};
})
)
.flat()
Insert cell
width
Insert cell
aspectRatio = 640 / 400
Insert cell
height = Math.floor(width / aspectRatio)
Insert cell
maxSize = Math.min(height,width)
Insert cell
margin = maxSize / 5
Insert cell
size = maxSize - 2 * margin
Insert cell
marginX = (width - size) / 2
Insert cell
marginY = (height - size) / 2
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