Why, exactly, do glass and liquids refract light?