def Gen_RandLine(length, dims=2):
 lineData = np.empty((dims, length))
 lineData[:, 0] = np.random.rand(dims)
 for index in range(1, length):
  step = ((np.random.rand(dims) - 0.5) * 0.1)
  lineData[:, index] = (lineData[:, (index - 1)] + step)
 return lineData

def Gen_RandLine ( length , dims = 2 ) : lineData = np . empty ( ( dims , length ) ) lineData [ : , 0 ] = np . random . rand ( dims ) for index in range ( 1 , length ) : step = ( ( np . random . rand ( dims ) - 0.5 ) * 0.1 ) lineData [ : , index ] = ( lineData [ : , ( index - 1 ) ] + step ) return lineData
create a line using a random walk algorithm length is the number of points for the line .