Skip to content

Instantly share code, notes, and snippets.

@errete
Created March 31, 2014 17:00
Show Gist options
  • Save errete/9896907 to your computer and use it in GitHub Desktop.
Save errete/9896907 to your computer and use it in GitHub Desktop.
int i, j, k, s, gray;
PGraphics n41; // raster "41."
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
color[] c={
color(234, 38, 92), // red
color(5, 130, 204), // blue
color(144, 204, 0), // green
color(254, 183, 0) // orange
};
void setup() {
size(1440, 1440);
background(0);
noFill();
n41=createGraphics(90, 90); // raster "41."
n41.beginDraw();
n41.background(0);
n41.fill(255);
n41.textFont(fnt);
n41.textAlign(CENTER, TOP);
n41.text("41.", 45, 40);
n41.endDraw();
for (i=0; i<90; i++) {
for (k=0; k<4; k++) {
stroke(c[floor(random(c.length))], 127);
strokeWeight(2);
beginShape();
curveVertex(i*16, 0);
for (j=0; j<90; j++) {
gray=round(red(n41.pixels[i+j*n41.width])/16);
curveVertex(i*16+round(random(gray))-32, j*16);
}
curveVertex(i*16, 1440);
endShape();
}
}
save("41.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment