function H = low_pass( height, width, D0, n )

Y = height/2;
X = width/2;
H = zeros(height, width);

% Butterworth low pass filter.
for y=1:height
    for x=1:width
        d = sqrt((y - Y) * (y - Y) + (x - X) * (x - X));
        H(y,x) = d / D0;
        H(y,x) = 1 / (1 + H(y, x) ^ (2 * n));
    end
end

end

