Skip to content

Instantly share code, notes, and snippets.

@errete
Created April 23, 2014 18:19
Show Gist options
  • Save errete/11226861 to your computer and use it in GitHub Desktop.
Save errete/11226861 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/43
int i, j, gray, b;
PGraphics n43; // raster "43."
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
void setup() {
size(1440, 1440);
background(0);
n43=createGraphics(90, 90); // raster "43."
n43.beginDraw();
n43.background(0);
n43.fill(255);
n43.textFont(fnt);
n43.textAlign(CENTER, TOP);
n43.text("43.", 45, 40);
n43.endDraw();
strokeWeight(1);
for(i=0; i<90; i++) {
for(j=0; j<90; j++) {
gray=round(red(n43.pixels[i+j*n43.width])/8);
b=round(random(gray*7));
fill(b);
stroke(255-b);
rect(
i*16+round(random(gray))-16,
j*16+round(random(gray))-16,
16,
16
);
}
}
save("43.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment