Created
February 11, 2014 17:06
-
-
Save errete/8939226 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/38
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 n38; // raster "38." | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
int[][] c={ // colors | |
{254, 183, 0}, // orange | |
{5, 130, 204} // blue | |
}; | |
void setup() { | |
size(1440, 1440); | |
background(255); | |
strokeWeight(1); | |
n38=createGraphics(90, 90); // raster "38." | |
n38.beginDraw(); | |
n38.background(0); | |
n38.fill(255); | |
n38.textFont(fnt); | |
n38.textAlign(CENTER, TOP); | |
n38.text("38.", 45, 40); | |
n38.endDraw(); | |
noFill(); | |
for (j=0; j<90; j++) { | |
beginShape(); | |
for (i=0; i<90; i++) { | |
gray=round(red(n38.pixels[i+j*n38.width])/16); | |
stroke( | |
c[0][0]+(c[1][0]-c[0][0])/180*(i+j), | |
c[0][1]+(c[1][1]-c[0][1])/180*(i+j), | |
c[0][2]+(c[1][2]-c[0][2])/180*(i+j) | |
); | |
curveVertex(i*16-round(random(gray)), j*16+4-round(random(gray))); | |
curveVertex(i*16+8+round(random(gray)), j*16+(i%2)*8+round(random(gray))); | |
} | |
endShape(); | |
} | |
save("38.png"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment