% Beam with uniform distribution function u = uniform(r, w0, r_max, P) u = P / (pi*r_max^2); end