This simulation illustrates Snell's Law.
Snell's Law states that light, when it passes from one medium to another, obeys the relationship:
n1 sin(θ1) = n2 sin(θ2)
n1 is the index of refraction of medium 1,
n2 is the index of refraction of medium 2,
θ1 is the angle, in medium 1, the light ray makes with the normal,
θ2 is the angle, in medium 2, the light ray makes with the normal.
The normal is the line perpendicular to the interface that passes through the interface at the same location the light does. In this simulation, the normal is a vertical line.