Published
Edited
Oct 25, 2018
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
logic = p5 => {
var x1, y1, x2, y2;
p5.setup = function() {
p5.createCanvas(800, 600);
x1 = p5.width/2;
y1 = p5.height/2;
x2 = p5.width/1.35;
y2 = p5.height/2;
}
p5.draw = function() {
//p5.background(255);
for (var i = 0; i < 12; i++) {
p5.point(x1, y1)
p5.stroke(0);
p5.strokeWeight(10);
p5.alpha(100 / i);
x1 = p5.width/2 + (p5.sin(p5.frameCount / 15) * 200) + (p5.sin(p5.frameCount / 7.5) * 100);
y1 = p5.height/2 + (p5.cos(p5.frameCount / 15) * 100) + (p5.cos(p5.frameCount / 7.5) * 100);
//x2 = p5.sin(p5.frameCount * 0.1) * -30 + (p5.width - 200);
//y2 = p5.sin(p5.frameCount * 0.1) * 60 + (p5.height/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