Fermats Principle And Snells Law