Created
February 10, 2019 11:53
-
-
Save dackdel/faf8e48fb6b86fe7799fbb100f6eccc1 to your computer and use it in GitHub Desktop.
processing sketch on generative circles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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