Skip to content

Instantly share code, notes, and snippets.

@volfegan
Last active March 23, 2020 06:30
Show Gist options
  • Save volfegan/9ba9570183975e92060fd18d6c45bcea to your computer and use it in GitHub Desktop.
Save volfegan/9ba9570183975e92060fd18d6c45bcea to your computer and use it in GitHub Desktop.
Static screen like old TV Twitter size code
//https://twitter.com/VolfeganGeist/status/1241962067109838848
int n, x, y, X, Y, w=720;
void setup() {
size(720, 720);
}
void draw() {
background(0);
loadPixels();
X=0;
Y=0;
for (y=0; y<w; y+=2) {
X+=n;
n=int(noise(X, Y)*255);
if (n<9)continue;
for (x=0; x<w; x++) {
if (random(1)>.7) {
pixels[y*w+x]=color(n);
}
Y+=int(random(n));
}
}
updatePixels();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment