how gases and particles in the atmosphere interact with light rays