Published
Edited
Jan 14, 2021
1 star
Insert cell
Insert cell
Insert cell
p5(sketch => {
sketch.setup = function() {
sketch.createCanvas(sketch.windowWidth, sketch.windowHeight);
sketch.noFill();
sketch.noLoop();
};
sketch.draw = function() {
sketch.background('#F0F0F0');
sketch.strokeWeight(2);
sketch.stroke('#3E454F');

let margin = 75;

for (let y = margin; y < sketch.height - margin * 2; y += 5) {
sketch.beginShape();

for (let x = margin; x < sketch.width - margin; x += 1) {
sketch.vertex(
x,
y +
sketch.noise(x / 15) +
sketch.noise(
sketch.map(y, margin, sketch.height - margin, 0.015, 0.0125) * x,
0.001 * y
) *
250 *
sketch.noise(x / 50)
);
}
sketch.endShape();
}
};
})
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