Created
June 10, 2014 14:54
-
-
Save errete/81c35308cbc66fc30b95 to your computer and use it in GitHub Desktop.
Processing.org code for the cover of http://8tracks.com/danielrt/48
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, k, gray; | |
float x, y; | |
PGraphics n48; // raster "48." | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
void setup() { | |
size(1440, 1440); | |
background(0); | |
noFill(); | |
n48=createGraphics(90, 90); // raster "48." | |
n48.beginDraw(); | |
n48.background(0); | |
n48.fill(255); | |
n48.textFont(fnt); | |
n48.textAlign(CENTER, TOP); | |
n48.text("48.", 45, 40); | |
n48.endDraw(); | |
strokeWeight(1); | |
stroke(255, 64); | |
noFill(); | |
for (i=0; i<90; i++) { | |
x=3-random(6); | |
y=3-random(6); | |
beginShape(); | |
curveVertex(0, i*16); | |
for (k=0; k<8; k++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n48.pixels[j+i*n48.width])/16); | |
curveVertex(j*16+round(k*x*gray/8), i*16+round(k*y*gray/8)); | |
} | |
} | |
curveVertex(1440, i*16); | |
endShape(); | |
} | |
save("48.png"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment