Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save volfegan/dce465be7f93055cb09edb197ecde034 to your computer and use it in GitHub Desktop.
Save volfegan/dce465be7f93055cb09edb197ecde034 to your computer and use it in GitHub Desktop.
Generates an abstract paint of 2 colorful tangent circles
//based from https://www.dwitter.net/d/22303
float f, k,q, t, w, X, Y;
void setup() {
size(1280, 720);
noStroke();
clear();
}
void draw() {
t+=.01;
for (float i=1024,k=i/2; i>0; i--) {
rect(k+X*cos(Y), k+X*sin(Y), w=i/pow(2,t), w);
f=i*t;
X=f*f%4098;
Y=X*f%17.7;
fill(q=i*sin(sin(X/k+sin(Y)))/2,int(X/4)&int(q),i*sin(q/X-Y)/2,128);
}
if (frameCount == 1000) save("abstractArtDichotomyOfCirclesPainting.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment