Skip to content

Instantly share code, notes, and snippets.

@errete
Created May 27, 2014 13:25
Show Gist options
  • Save errete/69f38cddb4caaf6cf74b to your computer and use it in GitHub Desktop.
Save errete/69f38cddb4caaf6cf74b to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/46
int i, j, gray;
PGraphics n46; // raster "46."
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
void setup() {
size(1440, 1440);
background(255);
n46=createGraphics(90, 90); // raster "46."
n46.beginDraw();
n46.background(0);
n46.fill(255);
n46.textFont(fnt);
n46.textAlign(CENTER, TOP);
n46.text("46.", 45, 40);
n46.endDraw();
strokeWeight(6);
for(i=0; i<90; i++) {
for(j=0; j<90; j++) {
gray=round(red(n46.pixels[i+j*n46.width])/32);
stroke(
round(234+(20*i/90)),
round(38+(145*j/90)),
round(92-(92*i/90))
);
line(
i*16+gray,
j*16,
i*16+16-gray,
j*16+16
);
}
}
save("46.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment