Bresenham code in regular Python and numpy.
Adapted from
http://www.cb.uu.se/~cris/blog/index.php/archives/400