Published
Edited
Jun 16, 2020
Insert cell
Insert cell
Insert cell
p5(sketch => {
sketch.setup = function() {
sketch.createCanvas(1000, 1000);
sketch.noLoop();
sketch.pixelDensity(2);
};
sketch.draw = function() {
sketch.background('#F7F7F7');
sketch.noFill();
sketch.stroke('black');
sketch.strokeWeight(0.5);
sketch.beginShape();
for(let i = 0; i < 600; i+=4) {
let x = sketch.width/2 + sketch.cos(i) * sketch.width/2.5;
let y = sketch.height/2 + sketch.sin(i) * sketch.width/2.5;

sketch.vertex(x, y);
}
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