Skip to content

Instantly share code, notes, and snippets.

@cdr6934
Created November 28, 2020 21:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdr6934/aedf62c02b429eb8762394df9ccf025f to your computer and use it in GitHub Desktop.
Save cdr6934/aedf62c02b429eb8762394df9ccf025f to your computer and use it in GitHub Desktop.
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