Numerical approximation of the physical laws governing scattering in electron beam lithography