Published
Edited
Aug 30, 2021
1 fork
Insert cell
Insert cell
Insert cell
function makeArt() {
const height = width * 0.8;
const q5 = new Q5();
q5.createCanvas(width, height);
q5.background(chance.pickone(colors));
q5.randomSeed();
q5.noFill();
q5.stroke(chance.pickone(colors));
for (let i = 0; i < 1000; i++) {
q5.circle(width / 2, height / 2 + i * 1.9, 5.4 * i);
}
const el = html`${q5.canvas}`;
el.value = q5;

q5.strokeWeight(1);
return el;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
palettes
Insert cell
colors = {
const paletteName = chance.pickone(Object.keys(palettes));
return chance.pickone(palettes[paletteName]);
}
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