xxxxxxxxxx
19
let a = 0;
let amplitude = 20;
function setup() {
createCanvas(600, 600);
background(255);
angleMode(DEGREES);
}
function draw() {
for(let i = 0; i < 1550; i++){
a = (a+0.1)%width;
push();
translate(a, amplitude*sin(a)+height/2);
ellipse(0,0,cos(a)*10);
pop();
}
}