Compute the refraction angle from incidence angle and the two refractive indices using n₁sinθ₁ = n₂sinθ₂, and detect total internal reflection. For geometrical optics and fiber transmission.