Skip to content

Instantly share code, notes, and snippets.

@dackdel
Created February 10, 2019 11:53
Show Gist options
  • Save dackdel/faf8e48fb6b86fe7799fbb100f6eccc1 to your computer and use it in GitHub Desktop.
Save dackdel/faf8e48fb6b86fe7799fbb100f6eccc1 to your computer and use it in GitHub Desktop.
processing sketch on generative circles
void setup() {
size(800, 800);
background(#eeeeee);
}
void draw() {
background(random(255), random(255), random(255));
translate(width/2, height/2);
for (int n=0; n<30; n++) {
stroke(random(255), random(255), random(255));
for (int a=0; a<360; a+=1) {
float x = random(50, 150);
float xx = random(150, 350);
pushMatrix();
rotate(radians(a));
strokeCap(CORNER);
strokeWeight(4);
line(x, 0, xx, 0);
popMatrix();
}
}
}
void keyPressed() {
redraw();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment