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/5520072 to your computer and use it in GitHub Desktop.
Save ucheng/5520072 to your computer and use it in GitHub Desktop.
A circle drawn using frame loop
int diam = 10;
void setup() {
size(400, 400);
frameRate(24);
noStroke();
fill(255,0,0);
background(255,255,0);
}
void draw() {
if (diam <= 400) {
background(180);
ellipse(width/2, height/2, diam, diam);
diam += 10;
}
if (diam > 400) {
background(180);
diam = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment