Algorithm help

VanL vlindberg at
Tue Jan 28 19:45:19 CET 2003

Andrew Henshaw wrote:

> If your coordinates can describe arbitrarily-angled line segments, then
> I would look at the Bresenham line algorithm.  Given your statement of the
> problem, however, I would suspect that your maze has only vertical and 
> horizontal walls.  In that case, I'd just check coordinate pairs and step
> through the axis that changes.

Thank you!  I didn't know about this algorithm but it was 
exactly what I needed.


More information about the Python-list mailing list