Conditions for Total Internal Reflection