I need to fill an nXn matrix with a Gaussian filter programatically. I've been trying to work this out for a graphics project, but i'm a little stuck.
To clarify, an example 3x3 Gaussian filter matrix would be:
[1, 2, 1]
[2, 4, 2]
/ 16.0
[1, 2, 1]