Skip to content

Instantly share code, notes, and snippets.

@errete
Created July 1, 2014 11:32
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 errete/feab9f7dda2b84d1c388 to your computer and use it in GitHub Desktop.
Save errete/feab9f7dda2b84d1c388 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/49
int i, j, x, y, gray, r;
PGraphics n49;
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
void setup() {
size(1440, 1440);
n49=createGraphics(90, 90);
n49.beginDraw();
n49.background(0);
n49.fill(255);
n49.textFont(fnt);
n49.textAlign(CENTER, TOP);
n49.text("49.", 45, 40);
n49.endDraw();
background(73, 67, 67);
strokeCap(PROJECT);
for(i=0; i<90; i++) {
for(j=0; j<90; j++) {
gray=round(red(n49.pixels[i+j*n49.width])/16);
if (gray>0) {
r=round(random(16));
stroke(244, 244, 240, r*12);
strokeWeight(round(random(r)/1.2));
line(
i*16+8+r,
j*16-r,
i*16-8-r,
j*16+16+r
);
}
}
}
save("49.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment