// wip state, by @zproc based on https://forum.processing.org/topic/challenge-processing-variations-of-10-print-chr-205-5-rnd-1-goto-10#25080000001836245
PImage img;
int d, n = 62;
PFont font;
void setup()
{
size(620, 620);
font = loadFont("C64Pro-Style-48.vlw");
d = width/n;
textFont(font, int(width/n));
img = loadImage("http://farm8.staticflickr.com/7246/7549868388_5c8eefa1a5_z.jpg");
img.resize(n, n);
}
void draw()
{
loadPixels();
for(int x = 0; x < n; x++)
for(int y = 0; y < n; y++)
{
float val = (img.pixels[y*n+x] &255 );
for(int dx = 0; dx < d; dx++)
for(int dy = 0; dy < d; dy++)
{
int z = val % (2) < 1 ? 255 / d : 255 / d;
if ( val > 2 * abs(z - 45)+ 2 )
{
fill(color(val));
text("*", x*d , y*d );
}
else
{
fill(color(val));
text("_", x*d , y*d );
}
}
}
//updatePixels();
}