P.S. If anyone can think of a better way of writing that
OR MORE IMPORTANTLY, a better "smoothing" algorithm, please post it, even if it's just an idea.
As it is, that works well, but it has flaws. For example, if there is an even number of columns, the middle column (widthwise)...