Created
August 9, 2014 10:42
-
-
Save errete/5c172d2d8cb1ea5cdf9f to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/53
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; | |
PGraphics n53; // raster "53." | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
void setup() { | |
size(1440, 1440); | |
background(77, 101, 113); | |
n53=createGraphics(90, 90); // raster "53." | |
n53.beginDraw(); | |
n53.background(0); | |
n53.fill(255); | |
n53.textFont(fnt); | |
n53.textAlign(CENTER, TOP); | |
n53.text("53.", 45, 40); | |
n53.endDraw(); | |
noStroke(); | |
fill(238, 227, 205); | |
for (i=0; i<90; i++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n53.pixels[i+j*n53.width])/32); | |
quad( | |
i*16+3, | |
j*16+3, | |
i*16+13, | |
j*16+3-gray, | |
i*16+13, | |
j*16+13-gray, | |
i*16+3, | |
j*16+13 | |
); | |
} | |
} | |
save("53.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment