xxxxxxxxxx
22
// (x,t)=>sin(2*x + 3*t + 5)再現
// 参考:https://piterpasma.nl/articles/wobbly
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
const x = noise(frameCount * 0.05) * width;
translate(0,height/2);
test();
}
const test = () => {
const r = 70;
const k = frameCount/10;
for(let i = 0;i<width;i++){
const x = i;
const y = r*sin(0.03*i+k);
circle(x,y,4);
}
}