<s>
Clipping	B-Algorithm
,	O
in	O
the	O
context	O
of	O
computer	O
graphics	O
,	O
is	O
a	O
method	O
to	O
selectively	O
enable	O
or	O
disable	O
rendering	O
operations	O
within	O
a	O
defined	O
region	B-Algorithm
of	I-Algorithm
interest	I-Algorithm
.	O
</s>
<s>
Mathematically	O
,	O
clipping	B-Algorithm
can	O
be	O
described	O
using	O
the	O
terminology	O
of	O
constructive	O
geometry	O
.	O
</s>
<s>
A	O
rendering	O
algorithm	O
only	O
draws	O
pixels	B-Algorithm
in	O
the	O
intersection	B-Algorithm
between	O
the	O
clip	O
region	O
and	O
the	O
scene	O
model	O
.	O
</s>
<s>
Lines	O
and	O
surfaces	O
outside	O
the	O
view	B-General_Concept
volume	I-General_Concept
(	O
aka	O
.	O
</s>
<s>
A	O
well-chosen	O
clip	O
allows	O
the	O
renderer	O
to	O
save	O
time	O
and	O
energy	O
by	O
skipping	O
calculations	O
related	O
to	O
pixels	B-Algorithm
that	O
the	O
user	O
cannot	O
see	O
.	O
</s>
<s>
Pixels	B-Algorithm
that	O
will	O
be	O
drawn	O
are	O
said	O
to	O
be	O
within	O
the	O
clip	O
region	O
.	O
</s>
<s>
Pixels	B-Algorithm
that	O
will	O
not	O
be	O
drawn	O
are	O
outside	O
the	O
clip	O
region	O
.	O
</s>
<s>
More	O
informally	O
,	O
pixels	B-Algorithm
that	O
will	O
not	O
be	O
drawn	O
are	O
said	O
to	O
be	O
"	O
clipped.	O
"	O
</s>
<s>
In	O
two-dimensional	O
graphics	O
,	O
a	O
clip	O
region	O
may	O
be	O
defined	O
so	O
that	O
pixels	B-Algorithm
are	O
only	O
drawn	O
within	O
the	O
boundaries	O
of	O
a	O
window	O
or	O
frame	O
.	O
</s>
<s>
Clip	O
regions	O
can	O
also	O
be	O
used	O
to	O
selectively	O
control	O
pixel	B-Algorithm
rendering	O
for	O
aesthetic	O
or	O
artistic	O
purposes	O
.	O
</s>
<s>
As	O
the	O
user	O
zooms	O
and	O
scrolls	O
to	O
view	O
a	O
smaller	O
portion	O
of	O
the	O
image	O
,	O
the	O
application	O
can	O
set	O
a	O
clip	O
boundary	O
so	O
that	O
pixels	B-Algorithm
outside	O
the	O
viewport	O
are	O
not	O
rendered	O
.	O
</s>
<s>
In	O
addition	O
,	O
GUI	O
widgets	O
,	O
overlays	O
,	O
and	O
other	O
windows	B-Application
or	I-Application
frames	I-Application
may	O
obscure	O
some	O
pixels	B-Algorithm
from	O
the	O
original	O
image	O
.	O
</s>
<s>
Application	O
software	O
can	O
take	O
advantage	O
of	O
this	O
clip	O
information	O
to	O
save	O
computation	O
time	O
,	O
energy	O
,	O
and	O
memory	O
,	O
avoiding	O
work	O
related	O
to	O
pixels	B-Algorithm
that	O
are	O
n't	O
visible	O
.	O
</s>
<s>
In	O
three-dimensional	O
graphics	O
,	O
the	O
terminology	O
of	O
clipping	B-Algorithm
can	O
be	O
used	O
to	O
describe	O
many	O
related	O
features	O
.	O
</s>
<s>
Typically	O
,	O
"	O
clipping	B-Algorithm
"	O
refers	O
to	O
operations	O
in	O
the	O
plane	O
that	O
work	O
with	O
rectangular	O
shapes	O
,	O
and	O
"	O
culling	B-Algorithm
"	O
refers	O
to	O
more	O
general	O
methods	O
to	O
selectively	O
process	O
scene	O
model	O
elements	O
.	O
</s>
<s>
In	O
complicated	O
scene	O
models	O
,	O
individual	O
elements	O
may	O
be	O
selectively	O
disabled	O
(	O
clipped	O
)	O
for	O
reasons	O
including	O
visibility	O
within	O
the	O
viewport	O
(	O
frustum	B-Algorithm
culling	I-Algorithm
)	O
;	O
orientation	O
(	O
backface	B-Algorithm
culling	I-Algorithm
)	O
,	O
obscuration	O
by	O
other	O
scene	O
or	O
model	O
elements	O
(	O
occlusion	O
culling	B-Algorithm
,	O
depth	O
-	O
or	O
"	O
z	O
"	O
clipping	B-Algorithm
)	O
.	O
</s>
<s>
Sophisticated	O
algorithms	O
exist	O
to	O
efficiently	O
detect	O
and	O
perform	O
such	O
clipping	B-Algorithm
.	O
</s>
<s>
Many	O
optimized	O
clipping	B-Algorithm
methods	O
rely	O
on	O
specific	O
hardware	O
acceleration	O
logic	O
provided	O
by	O
a	O
graphics	B-Architecture
processing	I-Architecture
unit	I-Architecture
(	O
GPU	B-Architecture
)	O
.	O
</s>
<s>
The	O
concept	O
of	O
clipping	B-Algorithm
can	O
be	O
extended	O
to	O
higher	O
dimensionality	O
using	O
methods	O
of	O
abstract	O
algebraic	O
geometry	O
.	O
</s>
<s>
Beyond	O
projection	O
of	O
vertices	O
&	O
2D	O
clipping	B-Algorithm
,	O
near	O
clipping	B-Algorithm
is	O
required	O
to	O
correctly	O
rasterise	O
3D	O
primitives	O
;	O
this	O
is	O
because	O
vertices	O
may	O
have	O
been	O
projected	O
behind	O
the	O
eye	O
.	O
</s>
<s>
Near	O
clipping	B-Algorithm
ensures	O
that	O
all	O
the	O
vertices	O
used	O
have	O
valid	O
2D	O
coordinates	O
.	O
</s>
<s>
Together	O
with	O
far-clipping	O
it	O
also	O
helps	O
prevent	O
overflow	O
of	O
depth-buffer	O
values	O
.	O
</s>
<s>
Some	O
early	O
texture	O
mapping	O
hardware	O
(	O
using	O
forward	O
texture	O
mapping	O
)	O
in	O
video	O
games	O
suffered	O
from	O
complications	O
associated	O
with	O
near	O
clipping	B-Algorithm
and	O
UV	O
coordinates	O
.	O
</s>
<s>
This	O
viewport	O
is	O
defined	O
by	O
the	O
geometry	O
of	O
the	O
viewing	B-General_Concept
frustum	I-General_Concept
,	O
and	O
parameterizes	O
the	O
field	O
of	O
view	O
.	O
</s>
<s>
Z-clipping	O
,	O
or	O
depth	O
clipping	B-Algorithm
,	O
refers	O
to	O
techniques	O
that	O
selectively	O
render	O
certain	O
scene	O
objects	O
based	O
on	O
their	O
depth	O
relative	O
to	O
the	O
screen	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
medical	B-Application
imaging	I-Application
application	O
could	O
use	O
this	O
technique	O
to	O
render	O
the	O
organs	O
inside	O
a	O
human	O
body	O
.	O
</s>
<s>
A	O
video	O
game	O
programmer	O
can	O
use	O
clipping	B-Algorithm
information	O
to	O
accelerate	O
game	O
logic	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
tall	O
wall	O
or	O
building	O
that	O
occludes	O
other	O
game	O
entities	O
can	O
save	O
GPU	B-Architecture
time	O
that	O
would	O
otherwise	O
be	O
spent	O
transforming	O
and	O
texturing	O
items	O
in	O
the	O
rear	O
areas	O
of	O
the	O
scene	O
;	O
and	O
a	O
tightly	O
integrated	O
software	O
program	O
can	O
use	O
this	O
same	O
information	O
to	O
save	O
CPU	O
time	O
by	O
optimizing	O
out	O
game	O
logic	O
for	O
objects	O
that	O
are	O
n't	O
seen	O
by	O
the	O
player	O
.	O
</s>
<s>
Line	B-Algorithm
clipping	I-Algorithm
algorithms	O
:	O
</s>
<s>
Polygon	O
clipping	B-Algorithm
algorithms	O
:	O
</s>
