[SciPy-User] Bresenham algorithm?

Xavier Gnata xavier.gnata at gmail.com
Sun Sep 20 14:38:27 EDT 2009


Zachary Pincus wrote:
>> Does scipy provide the Bresenham algorithm ?
>>     
>
> Not that I know of... but would it be acceptable to interpolate  
> values? Then you could just calculate floating-point x,y points evenly  
> spaced along the line segment, and use scipy.ndimage.map_coordinates  
> to sample the image (with spline interpolation of any desired order)  
> at those points.
>
> In some cases, this is probably an acceptable solution... in others,  
> not so much.
>
> Zach
>
>   

Oh yes it is.
I just wanted to know if this trivial algo (floats->int or Bresenham) 
has been implemented in scipy.
Whatever is fast is fine in my use case ;)

Xavier



More information about the SciPy-User mailing list