function V = ScatPot(region,state)
% Physical potential for time dependent simulations.
global posx posy g num Rf Lf Wf
x = region.x;
y = region.y;

if 1 % Gaussian scatterers
sig = 1/sqrt(2); %0.68;  % NOTE CAREFULLY: this sets scatterer width. The parameter 'sig' is related BUT NOT EQUAL to \sigma from the paper. It's a simple relation, though: sig/sqrt(2) = \sigma. Thus, to get \sigma=1/2, set sig to 1/sqrt(2), and to get \sigma=0.48, set sig to 0.68.
V = 0;
for n=1:num
    x0 = posx(n)-0.5;
    y0 = posy(n)-0.5;
    V = V + g*exp(-((x-x0).^2 + (y-y0).^2)/sig^2);
end
end

