Skip to content

Instantly share code, notes, and snippets.

@volfegan
Last active May 30, 2021 20:40
Show Gist options
  • Save volfegan/f7d5d0a6d299e6f8f1433fc4b3ae1787 to your computer and use it in GitHub Desktop.
Save volfegan/f7d5d0a6d299e6f8f1433fc4b3ae1787 to your computer and use it in GitHub Desktop.
Procedural converging painting of some shadow+colour abstract art
//reference https://www.dwitter.net/d/22420
float f, k, t, w, X, Y;
void setup() {
size(1280, 720);
colorMode(HSB,360,255,255);
noStroke();
clear();
}
void draw() {
t+=.005;
for (float i=k=360; i>0; i--) {
rect(k*X,k*Y,w=k/t/t,w);
f=i*t;
X=f*f%4;
Y=X*f%2;
fill(1.09*k/(2+((int)X|(int)Y)^((int)X&(int)Y+1))+47*(X%tan(Y)), 12e3/i, 270-pow((X*Y/2), sin(X*X-Y*Y))*255);
}
if (frameCount == 2000) save("abstractArtShadowsInWall.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment