function angle = th_r(theta, n1, n2) angle = asin(n1 / n2 * sin(theta)); end