Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Created April 2, 2014 16:53
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 runemadsen/9938198 to your computer and use it in GitHub Desktop.
Save runemadsen/9938198 to your computer and use it in GitHub Desktop.
void setup()
{
size(600, 800);
background(22, 117, 200);
noStroke();
int numCircles = 3;
int y = 0;
while (y < height)
{
pushMatrix();
float circleDiameter = (float) width/ (float) numCircles;
translate(circleDiameter/2, 0);
for (int i = 0; i < numCircles; i++)
{
arc(i * circleDiameter, y, circleDiameter, circleDiameter, 0, PI);
}
numCircles++;
y += circleDiameter/2;
popMatrix();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment