Created
July 12, 2014 16:00
-
-
Save errete/b0ed0756876454c4b2b0 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i, j, gray, ext; | |
PGraphics n50; | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
color[] c={ | |
color(171, 154, 16), | |
color(248, 223, 23), | |
color(185, 173, 73), | |
color(248, 238, 159), | |
color(120, 108, 11) | |
}; | |
void setup() { | |
size(1440, 1440); | |
background(0); | |
noStroke(); | |
n50=createGraphics(90, 90); // raster "50." | |
n50.beginDraw(); | |
n50.background(0); | |
n50.fill(255); | |
n50.textFont(fnt); | |
n50.textAlign(CENTER, TOP); | |
n50.text("50.", 45, 40); | |
n50.endDraw(); | |
strokeCap(PROJECT); | |
for (i=0; i<90; i++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n50.pixels[i+j*n50.width])/16); | |
strokeWeight(round(random(gray))); | |
stroke(c[floor(random(c.length))], 192+round(random(gray*4))+2); | |
ext=round(random(gray)); | |
line(i*16-ext, j*16-ext, i*16+16+ext, j*16+16+ext); | |
} | |
} | |
save("50.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment