Skip to content

Instantly share code, notes, and snippets.

@volfegan
Last active June 1, 2022 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save volfegan/93fb647d9051bfd40c2fea5015c60d60 to your computer and use it in GitHub Desktop.
Save volfegan/93fb647d9051bfd40c2fea5015c60d60 to your computer and use it in GitHub Desktop.
Moving liquid metal texture with some semi-static spiral structures in between
//remix https://twitter.com/Hau_kun/status/1531248367678144513
float A,t;
void setup() {
size(1280, 720);
noStroke();
}
void draw() {
clear();
t+=.02;
int s = 3;
for (float y=0; y<height; y+=s) {
for (float x=0; x<width; x+=s) {
float R=dist(x, y, width/2, height/2)/9;
color c = color(255*pow(sin(noise(x/40+sin(R*.69), y/40+sin(R)/9, .005*((int)x%(int)(y+1)) - t)*17), 4));
fill(c);
rect(x, y, s, s);
}
}
//saveFrame("frame_######.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment