Skip to content

Instantly share code, notes, and snippets.

@takawo
Created April 8, 2021 13:41
Show Gist options
  • Select an option

  • Save takawo/0d976bcb6f7d209851235cb82e8aa978 to your computer and use it in GitHub Desktop.

Select an option

Save takawo/0d976bcb6f7d209851235cb82e8aa978 to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(400, 200);
background(220);
}
function draw() {
for(let i = 0; i < 100; i++){
let x = (frameCount+i/100) % width;
let y = height / 2 + sin(x)*(x*.01%1-.5) * 100;
point(x,y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment