def poly_noise(self, origin, max_size=[128,24], max_verticies=10):
vert_count = np.random.randint(3,max_verticies)
verts = np.matmul(np.ones([vert_count+1, 1]), [origin] )
verts[1:vert_count, 0] = origin[ 0] + np.random.randint(0, max_size[0], vert_count -1)
verts[1:vert_count, 1] = origin[ 1] + np.random.randint(0, max_size[1], vert_count -1)
return polygon(verts[:,1], verts[:,0], (self.view_res[1], self.view_res[0]) )
#converts coordinates into images with curves on them
评论列表
文章目录