Created
January 19, 2014 20:29
-
-
Save errete/8510583 to your computer and use it in GitHub Desktop.
processing.org code for the cover of http://8tracks.com/danielrt/36
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; // loops | |
int pos[]= new int[2]; // last point of curve | |
color c[]={ // https://kuler.adobe.com/Delacroix-color-theme-3382641/ | |
color(26, 56, 56), | |
color(63, 122, 81), | |
color(130, 163, 82), | |
color(209, 192, 98), | |
color(254, 190, 88), | |
}; | |
PGraphics n36; // raster "36." | |
int gray; // color of current pixel | |
PFont fnt=createFont("HelveticaNeue-Bold", 54); | |
void setup() { | |
size(1440, 1440); | |
background(255); | |
n36=createGraphics(90, 90); // raster "36." | |
n36.beginDraw(); | |
n36.background(0); | |
n36.fill(255); | |
n36.textFont(fnt); | |
n36.textAlign(CENTER, TOP); | |
n36.text("36.", 45, 26); | |
n36.endDraw(); | |
strokeWeight(6); | |
noFill(); | |
for (i=0; i<90; i++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n36.pixels[i+j*n36.width])/6); | |
stroke(c[(floor(random(4)))], 192); | |
pos[0]=i*16; | |
pos[1]=j*16; | |
beginShape(); | |
curveVertex(pos[0], pos[1]); | |
for (k=0; k<gray+6; k++) { | |
pos[0]+=round(random(16))-8; | |
pos[1]+=round(random(16))-8; | |
curveVertex(pos[0], pos[1]); | |
} | |
endShape(); | |
} | |
} | |
// uncomment the next line to save | |
// save("portada_36.png"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment