Skip to content

Instantly share code, notes, and snippets.

@becojo
Last active August 5, 2019 23:34
Show Gist options
  • Save becojo/8a16a01233fd40c5ad9dfecc68585fd4 to your computer and use it in GitHub Desktop.
Save becojo/8a16a01233fd40c5ad9dfecc68585fd4 to your computer and use it in GitHub Desktop.
void setup() {
size(500, 500);
stroke(0);
noStroke();
}
void draw() {
background(#3C5E84);
float r = frameCount / 33.0;
translate(width / 2, height / 2);
for(float i = 0; i < PI; i+= 0.01) {
float x = sin(r + i) * 150;
float amp = -sin(((x + 150) / 300) * PI * 5);
fill(lerpColor(#F7CB71, #DE627C, i / PI));
ellipse(x, sin(i) * amp * 100, 60, 60);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment