Algorithm help
VanL
vlindberg at verio.net
Tue Jan 28 13:45:19 EST 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.
VanL
More information about the Python-list
mailing list