Created
July 25, 2014 12:18
-
-
Save errete/d10340230cd8808dfa34 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/52
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; | |
int[] d=new int[3]; | |
float[] disp=new float[2]; | |
PGraphics n52; | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
void setup() { | |
size(1440, 1440); | |
background(223, 224, 175); | |
n52=createGraphics(90, 90); // raster "52." | |
n52.beginDraw(); | |
n52.background(0); | |
n52.fill(255); | |
n52.textFont(fnt); | |
n52.textAlign(CENTER, TOP); | |
n52.text("52.", 45, 40); | |
n52.endDraw(); | |
for (i=0; i<90; i++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n52.pixels[i+j*n52.width])/16); | |
d[0]=8-round(random(16)); // x-axis | |
d[1]=8-round(random(16)); // y-axis | |
d[2]=1+round(random(gray)/4); // z-axis | |
stroke(56, 50, 69, 64+round(random(gray)*8)); | |
strokeWeight(8+round(random(gray)/2)); | |
line( | |
i*16+d[0], | |
j*16+d[1], | |
i*16+d[0]+16*(i-45)/45*d[2], | |
j*16+d[1]+16*(j-45)/45*d[2] | |
); | |
} | |
} | |
save("52.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment