The amount and direction that a light ray bends when it enters a new medium depend on the