Avoid deep recursion by tracing rays, which have intensity is greather than threshold + avoid infinite recursion by limiting number of recursive calls