How to simulate atmospheric scattering using a Mie model