[Matrix-SIG] Re: Example Code: Bresenham Line Algorithm

Andrew P. Mullhaupt amullhau at nospam.ix.netcom.com
Sun Jul 11 23:34:49 EDT 1999


Travis Oliphant <Oliphant.Travis at mayo.edu> wrote in message
news:Pine.LNX.4.10.9907112154520.15581-100000 at us2.mayo.edu...
>
> I'm not sure what the Bresenham Line Algorithm does.

Bresenham's algorithm is a fast way to sequentially decide which pixels to
set in order to represent a line or ellipse on a rectangular grid.

> I could evaluate whether or not I'd like to include
> it in the package that I'm developing (Multipack),

I'd be surprised if Multipack was the right place for a Bresenham
implementation. Maybe PIL, or a more likely, a graphics device driver is
where you find these line and ellipse drawing things.

There is at least one alternative algorithm to Bresenham, which on some
architectures is significantly faster for sufficiently large display sizes.
My brother Patrick and I developed one a few years back, but found the
display size required to outperform Bresenham was too large given the
architectures of the time.

Later,
Andrew Mullhaupt






More information about the Python-list mailing list