The final problem to be solved is represented by the cusp points, the case in which the three-point scheme doesn't provide a satisfactory solution because it tends to decrease in an unnatural way the sharpness of the wavefronts. In this case, we reduce the three-point scheme to a two-point one by assuming that one of the exterior points (either A or C, Figure 4) is merged with the point in the middle (B).
Figure 4 Cusp points. A, B and C are the three points on the current wavefront. Point O is the previous point on the ray going through B. The angle CBA is smaller than the angle OBA, and therefore B is a cusp point. If the angle CBA is closer to 90 degrees than the angle OBA, then C is merged with B; otherwise, A is merged with B. The three-point scheme becomes a two-point scheme without any change in the program.