Created
January 11, 2015 05:20
-
-
Save jkwok91/82fec65a3ead9e54960e to your computer and use it in GitHub Desktop.
imitating ben's rust sketch
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
/* | |
unicode drawings | |
*/ | |
void setup() { | |
size(400, 400); | |
} | |
String[] unicodez = { | |
" ", " ", "▩", "█", "█" | |
}; | |
void draw() { | |
background(255); | |
for (int i = 0; i <= width; i+=15) { | |
for (int j = 15; j <= height; j+=15) { | |
float n = noise(i*mouseX,j*mouseY); | |
int mapped = (int)(map(n*width, 0, width, 0, 5)); | |
fill(0); | |
text(unicodez[mapped], i, j); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment