Condition For Total Internal Reflection