A vector field of gradient vectors,
, and their norms,
, is calculated
from the scalar field of densities
that were initially read and resampled.
For each array element, excepting only the ones at the boundaries, the gradient is
computed using the central difference approximation :