Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Circlular Wealth
float n,r, div,margin;
int iter;
color a, b;
void setup()
{
size(1000,1000);
background(255);
n = 6;
r = 5;
a = getColor();
b = getColor();
margin = 50;
div = (height-100) / n;
noFill();
}
void draw() {
for(int i = 0; i < width-margin; i++)
{
for (int j = 0; j < height-margin; j++)
{
//lerpColor(a, b, iter / 10)
stroke(getColor());
circle(margin+i*div,margin+j*div,r);
}
}
r += 20;
iter++;
}
int colors[] = {#057EBF, #DBB304, #E1E7ED, #04140C};
int rcol() {
return colors[int(random(colors.length))];
}
int getColor() {
return getColor(random(colors.length));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment