def interpolate_path(list_of_xys):
x = list_of_xys[0]
y = list_of_xys[1]
#print x, y
#x = np.array([0,1,2,3,4,5,6,7,6,5,4,3,2,1,0])
#y = np.array([0,1,2,3,4,4,5,6,7,8,7,8,9,9,9])
tck, u = interpolate.splprep([x, y], s = 0.03)
unew = np.arange(0,9,0.03)
#print unew
interpolated_path = interpolate.splev(unew, tck, ext = 1)
return interpolated_path
#a = interpolate_path(array)
#plot_path(array, a)
get_smooth_path.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录