Created
November 10, 2014 15:12
-
-
Save errete/8907ea2531a79282e596 to your computer and use it in GitHub Desktop.
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 n56; | |
PFont fnt=createFont("HelveticaNeueLTStd-Bd", 54); | |
void setup() { | |
size(1440, 1440); | |
background(255); | |
n56=createGraphics(90, 90); // raster "56." | |
n56.beginDraw(); | |
n56.background(0); | |
n56.fill(255); | |
n56.textFont(fnt); | |
n56.textAlign(CENTER, TOP); | |
n56.text("56.", 45, 40); | |
n56.endDraw(); | |
for (i=0; i<90; i++) { | |
for (j=0; j<90; j++) { | |
gray=round(red(n56.pixels[i+j*n56.width])/16); | |
stroke( | |
118-107/16*gray, | |
166-123/16*gray, | |
125-61/16*gray | |
); | |
line( | |
i*16+cos(TWO_PI/90*i)*16, | |
j*16+sin(TWO_PI/90*j)*16, | |
i*16+cos(TWO_PI/90*j)*gray, | |
j*16+sin(TWO_PI/90*i)*gray | |
); | |
} | |
} | |
save("56.png"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment