A ray of light enters a half-cylinder through the curved side, perpendicular to the surface so that it does not refract. The ray does
refract when leaving the prism. You can vary the index of refraction of the prism
from 1 up to 2.5; the index of refraction
of the surroundings is assumed equal to 1. You can also vary the angle of incidence
from 0° up to 90°. The angle of refraction
is determined by Snell's law:
, then the ray undergoes total internal reflection.