<s>
In	O
computer	O
graphics	O
,	O
a	O
line	B-Algorithm
drawing	I-Algorithm
algorithm	I-Algorithm
is	O
an	O
algorithm	O
for	O
approximating	O
a	O
line	O
segment	O
on	O
discrete	O
graphical	O
media	O
,	O
such	O
as	O
pixel-based	O
displays	B-Device
and	O
printers	O
.	O
</s>
<s>
On	O
such	O
media	O
,	O
line	O
drawing	O
requires	O
an	O
approximation	B-Algorithm
(	O
in	O
nontrivial	O
cases	O
)	O
.	O
</s>
<s>
A	O
better	O
representation	O
with	O
multiple	O
color	O
gradations	O
requires	O
an	O
advanced	O
process	O
,	O
spatial	B-Algorithm
anti-aliasing	I-Algorithm
.	O
</s>
<s>
The	O
following	O
is	O
a	O
partial	O
list	O
of	O
line	B-Algorithm
drawing	I-Algorithm
algorithms	I-Algorithm
:	O
</s>
<s>
Digital	B-Algorithm
Differential	I-Algorithm
Analyzer	I-Algorithm
(	O
graphics	O
algorithm	O
)	O
—	O
Similar	O
to	O
the	O
naive	O
line-drawing	O
algorithm	O
,	O
with	O
minor	O
variations	O
.	O
</s>
<s>
Bresenham	B-Algorithm
's	I-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
—	O
optimized	O
to	O
use	O
only	O
additions	O
(	O
i.e.	O
</s>
<s>
Xiaolin	B-Algorithm
Wu	I-Algorithm
's	I-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
—	O
can	O
perform	O
spatial	B-Algorithm
anti-aliasing	I-Algorithm
,	O
appears	O
"	O
ropey	O
"	O
from	O
brightness	O
varying	O
along	O
the	O
length	O
of	O
the	O
line	O
,	O
though	O
this	O
effect	O
may	O
be	O
greatly	O
reduced	O
by	O
pre-compensating	O
the	O
pixel	B-Algorithm
values	O
for	O
the	O
target	O
display	O
's	O
gamma	O
curve	O
,	O
e.g.	O
</s>
<s>
The	O
naive	O
line	B-Algorithm
drawing	I-Algorithm
algorithm	I-Algorithm
is	O
inefficient	O
and	O
thus	O
,	O
slow	O
on	O
a	O
digital	O
computer	O
.	O
</s>
<s>
Algorithms	O
such	O
as	O
Bresenham	B-Algorithm
's	I-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
or	O
Xiaolin	B-Algorithm
Wu	I-Algorithm
's	I-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
are	O
preferred	O
instead	O
.	O
</s>
<s>
The	O
Gupta-Sproll	O
algorithm	O
is	O
based	O
on	O
Bresenham	B-Algorithm
's	I-Algorithm
line	I-Algorithm
algorithm	I-Algorithm
but	O
adds	O
antialiasing	O
.	O
</s>
<s>
The	O
IntensifyPixel(x,y,r )	O
function	O
takes	O
a	O
radial	O
line	O
transformation	O
and	O
sets	O
the	O
intensity	O
of	O
the	O
pixel	B-Algorithm
(	O
x	O
,	O
y	O
)	O
with	O
the	O
value	O
of	O
a	O
cubic	O
polynomial	O
that	O
depends	O
on	O
the	O
pixel	B-Algorithm
's	O
distance	O
r	O
from	O
the	O
line	O
.	O
</s>
