Skip to content

Instantly share code, notes, and snippets.

@errete
Created November 23, 2014 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save errete/59bb6fa44c9c31338de7 to your computer and use it in GitHub Desktop.
Save errete/59bb6fa44c9c31338de7 to your computer and use it in GitHub Desktop.
int i, j, k, gray;
int[][] t=new int[2][90];
PGraphics n57;
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54);
void setup() {
size(1440, 1440);
background(25, 52, 65);
n57=createGraphics(90, 90);
n57.beginDraw();
n57.background(255);
n57.fill(0);
n57.textFont(fnt);
n57.textAlign(CENTER, TOP);
n57.text("57.", 45, 20); //40
n57.endDraw();
stroke(145, 170, 157);
for (i=0; i<90; i++) {
for (j=0; j<90; j++) {
gray=round(red(n57.pixels[i+j*n57.width])/42);
line(
i*16+4*((i+j)%2)+((i+j)%2)*gray,
j*16+4*((i+j+1)%2)+((i+j+1)%2)*gray,
i*16+28*((i+j)%2)-((i+j)%2)*gray,
j*16+28*((i+j+1)%2)-((i+j+1)%2)*gray
);
}
}
save("57.png");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment