ASCII World Cup
Richard writes to tell us that the web is bringing you the next step up from watching those world cup matches in high-def. As the self-proclaimed "best, most ridiculous, most redundant graphical implementation of ASCII", ascii-wm.net brings you the 2006 World Cup live via your telnet window.
Good luck connecting to it.
I tried earlier during match time only to be told it'd maxed out on connections.
Whats needed is a replay of a previous match.
I guess I'll just keep playing Text Mode First Person Shooters while I wait
Even people that believe in pre-destiny look both ways before crossing the street.
I thought there was only one Goatse asshole...
This is an incredibly easy way to do it:
Select a mono-space font, like Courier. This makes things infinitely easier.
Figure out the size of a character in pixels, in the font size you're going to render at.
The next thing you do is to make an array of every single ASCII character that you want to use, and order it based on intensity of the characters in the font you're going to render in. (Start with space, period, little-o, capital-X, to make things easy for yourself.)
Figure out your display area, say 1280x1024.
Figure out your display area in characters (divide your display area by your character size), this is your ACTUAL resolution.
You might want to make a 2D-array of characters to store an intermediate version of your output image in textual form, at that ACTUAL resolution (probably something like 80x80, or so.)
Produce a greyscale image, with window/level, pan, zoom, etc. at your ACTUAL resolution. Subsampling works, but resampling works better. Doesn't really matter if you do 8-bit, 16-bit, etc. You might as well do everything unsigned, since you don't care about absolute values (like negatives), just the relative intensities.
Map the intensities onto your ASCII table. In my trivial example (four possible output characters), you'd shift everything right 6 bits for 8-bit input, or 14 bits for 16-bit input. Do your table look-up. Either render that character immediately, or put it into an array of characters to be rendered later...
Pretty simple, no? It worked much better than I thought it would - especially if you allow the user to pan, zoom, window/level - that really "sells" the ASCII renderings. This isn't doing anything to try to match ASCII characters against the actual contours in your image, like the visual difference between | and - is ignored, but at a gross level, it works quite nicely.
Education is the silver bullet.
but not as fun as Deep ASCII ;)