Skip to content

Instantly share code, notes, and snippets.

@mutterer
Last active March 31, 2020 17:41
Show Gist options
  • Save mutterer/a50d60d7812dfc5ba6ce6f95a5a47037 to your computer and use it in GitHub Desktop.
Save mutterer/a50d60d7812dfc5ba6ce6f95a5a47037 to your computer and use it in GitHub Desktop.
Generative_200330a
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();
}
}
@mutterer
Copy link
Author

output

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