Nicholl–Lee–Nicholl algorithm

Using the Nicholl–Lee–Nicholl algorithm, the area around the clipping window is divided into a number of different areas, depending on the position of the initial point of the line to be clipped.

This initial point should be in three predetermined areas; thus the line may have to be translated and/or rotated to bring it into the desired region.

The line segment may then be re-translated and/or re-rotated to bring it to the original position.

These areas are then designated as L, LT, LB, or TR, depending on the location of the initial point.

If a line starts in the L area and finishes in the LT area then the algorithm concludes that the line should be clipped at xw (max).