Created
November 28, 2020 21:53
-
-
Save cdr6934/aedf62c02b429eb8762394df9ccf025f to your computer and use it in GitHub Desktop.
Circlular Wealth
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
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