Skip to content

Instantly share code, notes, and snippets.

@XiaohanYa
Created April 1, 2017 17:34
Show Gist options
  • Save XiaohanYa/36713976d19d8bb1b6998f2c282d84a0 to your computer and use it in GitHub Desktop.
Save XiaohanYa/36713976d19d8bb1b6998f2c282d84a0 to your computer and use it in GitHub Desktop.
function setup() {
createCanvas(500, 600);
background(0);
}
function draw() {
background(0, 10);
push();
translate(width / 2, height / 2);
for (var a = 0; a < 360; a += 73) {
rotate(0.01 * frameCount);
fill(255);
noStroke();
var freq = sin(0.01 * frameCount);
var amp = sin(frameCount) * 200;
var dia = sin(freq) * amp;
ellipse(0, 0, dia * random(0.6, 0.8), dia);
}
pop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment