Skip to content

Instantly share code, notes, and snippets.

@errete
Created June 10, 2014 14:54
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/81c35308cbc66fc30b95 to your computer and use it in GitHub Desktop.
Save errete/81c35308cbc66fc30b95 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/48
int i, j, k, gray;
float x, y;
PGraphics n48; // raster "48."
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
void setup() {
size(1440, 1440);
background(0);
noFill();
n48=createGraphics(90, 90); // raster "48."
n48.beginDraw();
n48.background(0);
n48.fill(255);
n48.textFont(fnt);
n48.textAlign(CENTER, TOP);
n48.text("48.", 45, 40);
n48.endDraw();
strokeWeight(1);
stroke(255, 64);
noFill();
for (i=0; i<90; i++) {
x=3-random(6);
y=3-random(6);
beginShape();
curveVertex(0, i*16);
for (k=0; k<8; k++) {
for (j=0; j<90; j++) {
gray=round(red(n48.pixels[j+i*n48.width])/16);
curveVertex(j*16+round(k*x*gray/8), i*16+round(k*y*gray/8));
}
}
curveVertex(1440, i*16);
endShape();
}
save("48.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment