Created
May 27, 2014 13:25
-
-
Save errete/69f38cddb4caaf6cf74b to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/46
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 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