Algorithmically generating neon layers on pixel grid
- by user190929
In an attempt at a screensaver I am making, I am a fan of neo-like graphics, which, of course, look great against a black background. As I understand it, neon, graphically speaking, is essentially a gradient of a color, brightest in the center, and gets darker proceeding outward. Although, more accurate is similar, but separating it into tubes and glow. The tubes are mostly white, while the glow is where most of the color is seen. Well... the tubes could also be a light variant of the color, you could say. The glow is darker.
Anyhow, my question is, how could you generate such things given an initial pattern of pixels that would be the tubes? For example, let's say I want to make a neon 'H'. I, via the libraries, can attain the rectangles of pixels which represent it, but I want to make it look neonized. How could I algorithmically achieve such an effect given a base tube shape and base color?
EDIT: ok, I mistated that. Got a bit distracted. My purpose for this was similar to a neon effect, but not. Sorry about that. What I am looking for is something like this:
Start with a pattern of pixels:
[!][!][!][!][!][!][!][!]
[!][!][O][!][!][!][!][!]
[!][!][O][O][!][!][!][!]
[!][!][!][!][O][!][!][!]
[!][!][!][!][!][!][!][!]
How to I find the U pixels?
[!][E][E][E][!][!][!][!]
[!][E][O][E][E][!][!][!]
[!][E][O][O][E][E][!][!]
[!][E][E][E][O][E][!][!]
[!][!][!][E][E][E][!][!]
Sorry if that looks bad.