def _point_along_a_line(x0, y0, x1, y1, d):
 (dx, dy) = ((x0 - x1), (y0 - y1))
 ff = (d / (((dx * dx) + (dy * dy)) ** 0.5))
 (x2, y2) = ((x0 - (ff * dx)), (y0 - (ff * dy)))
 return (x2, y2)

def _point_along_a_line ( x0 , y0 , x1 , y1 , d ) : ( dx , dy ) = ( ( x0 - x1 ) , ( y0 - y1 ) ) ff = ( d / ( ( ( dx * dx ) + ( dy * dy ) ) ** 0.5 ) ) ( x2 , y2 ) = ( ( x0 - ( ff * dx ) ) , ( y0 - ( ff * dy ) ) ) return ( x2 , y2 )
find a point along a line connecting -- whose distance from is d .