def __next__(self):
try:
g = next(self.guide)
except Exception:
raise StopIteration
pnum = self.pnum
r = 1.0-2.0*random(pnum)
self.noise[:] += r*self.scale
a = random(pnum)*TWOPI
rnd = column_stack((cos(a), sin(a)))
self.path += rnd * reshape(self.noise, (self.pnum,1))
self.interpolated_path = _rnd_interpolate(self.path, self.inum, ordered=ORDERED)
self.i+=1
return g + self.interpolated_path
评论列表
文章目录