Skip to content

Instantly share code, notes, and snippets.

@ucheng
Last active December 17, 2015 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ucheng/5520133 to your computer and use it in GitHub Desktop.
Save ucheng/5520133 to your computer and use it in GitHub Desktop.
int diam = 10;
float centX, centY;
void setup() {
size(400, 400);
frameRate(24);
smooth();
centX = width/2;
centY = height/2;
stroke(0);
strokeWeight(5);
fill(255,0,0);
background(255,255,0);
}
void draw() {
if (diam <= 400) {
background(180);
strokeWeight(5);
fill(255, 50);
ellipse(centX, centY, diam, diam);
strokeWeight(1);
noFill();
int innerDiam = diam;
while(innerDiam > 10) {
ellipse(centX, centY, innerDiam, innerDiam);
innerDiam -= 10;
}
diam += 10;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment