A three-dimensional simulation of transmitted light through planetary atmospheres using Monte-Carlo methods