**Nicholl Lee Nicholl Line Clipping**

Nicholl Lee Nicholl Line Clipping is the important topic of the Computer Graphics. Moreover, It is the Important subject of the Computer Science.

By creating more regions around the clip window the Nicholl Lee Nicholl Line Clipping algorithm avoids multiple clipping of an individual line segment.

In Cohen-Sutherland line clipping sometimes multiple calculations of the intersection point of a line done before actual window boundary intersection or line completely rejected.

These multiple intersection calculations are avoided in NLN line clipping procedure.

NLN line clipping performs the fewer comparisons and divisions so it more efficient.

But NLN line clipping cannot extend for three dimensions while Cohen-Sutherland and Liang-Barsky algorithm can be easily extended for three dimensions.

The forgiven line we find the first point falls in which region out of nine regions shown in the figure below but three regions shown in the figure by putting the point only considered. And if a point falls in other regions than we transfer that point in one of the three regions.

- Three possible positions for a line endpoint p1 in the NLN line-clipping algorithm.
- We can also extend this procedure to all nine regions.
- Regions named in such a way that name. In which region p2 falls is gives the window edge which intersects the line.
- For example, region LT says that line needs to clip at left and top boundary.
- Moreover, For finding that in which region line đ
_{đ}đ_{đ}falls we compare the slope of the line to the slope of the boundaries:

For example, p1 is in the edge region and for checking whether p2 is in region LT we use the following equation.

- After checking slope condition we need to check whether it crossing zero, one or two edges.
- This can do by comparing coordinates of đ
_{2}with coordinates of window boundary. - For left and right boundary we compare coordinates and for top and bottom boundary we compare
- If a line does not fall within any defined region than clip entire line.
- Otherwise, calculate intersection.
- After finding region we calculate intersection point using the parametric equation which are:
- đ = đ
_{đ }+ (đ_{đ }â đ_{đ})đ - đ = đ
_{đ }+ (đ_{đ }â đ_{đ})đ

##### For left or right boundary, đ„ = đ„_{đ} đđ đ„_{đ} respectively, with đą = (đ„_{đ/đ} â đ„1)/ (đ„2 â đ„1). So that can obtain from the parametric equation as below: Nicholl Lee Nicholl Line Clipping

Keep the portion which is inside and clips the rest.

**Related Terms**

Computer Graphics, Cohen-Sutherland Line Clipping, Coordinate Transformation, Clipping Operations

## Leave a Reply