raytracing with absorbtion and isotropic scattering, boundary handling routine