# NOT RUN {
# Flow
f = function(x) {c(-x[1]*(x[1]^2 - 1.1), -x[2]*(x[2]^2 - 1))}
# Sampling points
xs <- seq(-1.5, 1.5, length.out = 10)
ys <- seq(-1.5, 1.5, length.out = 15)
# Approximated potential
Vs <- approxPot2D(f, xs, ys, mode = 'horizontal')
# }
Run the code above in your browser using DataLab