Skip to content

Instantly share code, notes, and snippets.

@wonderburg7
Last active December 18, 2018 09:25
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 wonderburg7/6fcef7d9498258e922c0ddd68f3bfd83 to your computer and use it in GitHub Desktop.
Save wonderburg7/6fcef7d9498258e922c0ddd68f3bfd83 to your computer and use it in GitHub Desktop.
int x, y;
int numberOfArcs = 20;//int(random(100));
float rotation = - (HALF_PI / random(0, 2)); //(HALF_PI / 3);
int arcSize;
int step = 180;
float start, stop;
int strokeSize = 15;
void setup()
{
size(4000, 4000);
background(128, 173, 160);
stroke(95, 85, 102);
noFill();
ellipseMode(CENTER);
strokeCap(PROJECT);
smooth();
noLoop();
}
void draw()
{
for (int i = 0; i < numberOfArcs; i++) {
strokeWeight(i+20);
arcSize = (step * i); //was 200 + (step..etc
start = rotation * i + random(-4, 4);
stop = rotation * i + TWO_PI - HALF_PI + random(-4, 4);
pushMatrix();
translate(width/2, height/2);
rotate(radians(int(random(360))));
arc(0, 0, arcSize, arcSize, random(0, PI), random(PI, TWO_PI));
popMatrix();
strokeSize+=5;
}
save("arcs.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment