title: Programatically fill a nxn matrix with a gaussian filter in C++
body: <p>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. </p>
  
  <p>To clarify, an example 3x3 Gaussian filter matrix would be:</p>
  
  <p><code>[1, 2, 1]</code><br>
  <code>[2, 4, 2]</code>  / 16.0<br>
  <code>[1, 2, 1]</code></p>