Assigns each grid point to a Morse-Smale cell based on gradient flow.
Examples
if (FALSE) { # \dontrun{
grid <- create.grid(30)
f <- function(x, y) sin(3*x) * cos(3*y)
f.grid <- evaluate.function.on.grid(f, grid)
cells <- compute.morse.smale.cells(f.grid)
image(cells)
} # }