0% found this document useful (0 votes)
501 views7 pages

Nicholl-Lee-Nicholl Line Clipping

The document describes the Nicholl-Lee-Nicholl line clipping algorithm. It breaks the clipping region into different subregions based on the locations of the points being clipped and compares slopes to determine which subregion a point falls into.

Uploaded by

akanshalg1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
501 views7 pages

Nicholl-Lee-Nicholl Line Clipping

The document describes the Nicholl-Lee-Nicholl line clipping algorithm. It breaks the clipping region into different subregions based on the locations of the points being clipped and compares slopes to determine which subregion a point falls into.

Uploaded by

akanshalg1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Nicholl-Lee-Nicholl Line Clipping

• generate region codes (Cohen-Suther.) & use trivial


accept and reject
• when trivial case fails further subdivide regions:
• consider p0 in 1 of 3 regions (other cases can be handled
from symmetry)
Corner

p0

Inside
Edge p0
p0
Nicholl-Lee-Nicholl: p1 subcases
• for each possible region (inside,corner,edge) for p0 further subdivide
space into semi-infinite triangles based on possible locations for p1
Inside Case for p0

T(op)

R(ight)
L(eft) p0

B(ottom)
“Edge” case sub-regions for p1
• 4 regions LT

L LR
p0

LB
“Corner” case sub-regions for p1 (subcase
I)
p0

• 5 regions

T
T
TR

LB TB
“Corner” case sub-regions for p1 (subcase
II)

• 5 regions p0

TR

L
L
LR
LB
Determining region of p1
We determine the region of p1 by comparing slopes
of line p0p1 and the line from p0 to the corners of the
clipping window that define the different regions pTR
LT
(L,LT, etc.)
L
p1
For example p0 L LR

p1 is in LR when L
pBR
slope(p0pBR) < slope(p0p1) < slope(p0pTR) LB
and
p1.x < wxmax (determined from standard region outcode)
Nicholl-Lee-Nicholl versus CS & LB
using more regions avoids multiple line-intersection
tests of Cohen-Sutherland (CS)

compared to both CS and Liang-Barsky (LB), NLN


performs fewer comparisons and divisions

however, CS and LB can be applied to 3D clipping.


NLN can’t extend to 3D.

You might also like