Published
Edited
Aug 3, 2020
1 fork
Insert cell
Insert cell
Insert cell
sketch = p => {
const h = 600
p.setup = () => {
p.createCanvas(width, h)
p.background(13,15,5)
};
p.draw = () => {
p.translate(p.random(50, width), h / 2 + p.random(-10, 10));

const v = p5.Vector.random2D().mult(p.random(50, h/2))

p.stroke(222,61,131, 22)
p.strokeWeight(4)
p.line(0, 0, v.x, v.y)
}
}

Insert cell
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