Last active
March 31, 2020 17:41
-
-
Save mutterer/a50d60d7812dfc5ba6ce6f95a5a47037 to your computer and use it in GitHub Desktop.
Generative_200330a
This file contains hidden or 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
| int[] c = {#247ba0, #70c1b3, #b2dbbf, #f3ffbd, #ff1654}; | |
| int s, shape; | |
| size(600, 600); | |
| background(192); | |
| for (int x = 60; x<width; x+=120) { | |
| for (int y = 60; y<height; y+=120) { | |
| pushMatrix(); | |
| translate(x, y); | |
| int col=int(random(3)); | |
| for (int i = 100; i>20; i=i-s*5) { | |
| col++; | |
| s = 2*int(random(2)+1); | |
| strokeWeight(s); | |
| fill(c[col%c.length]); | |
| shape = int(random(2)); | |
| if (shape==1) circle(0, 0, i); | |
| else { | |
| rectMode(CENTER); | |
| rect(0, 0, i, i); | |
| } | |
| } | |
| fill(255); | |
| circle(0, 0, 15+random(3)); | |
| popMatrix(); | |
| } | |
| } |
Author
mutterer
commented
Mar 30, 2020

Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment