from sprites import * pai = '3.14159265358979323846264338327950288 ' screen = Screen() screen.bgcolor('black') screen.setup(600,600) t = Sprite('blank') t.color('cyan') radius = 200 frames = [] t.bk(radius);t.left(90) ft = ('宋体',38,'normal') for i in range(len(pai)): t.write(pai[i],angle=90-i * 360/len(pai),font=ft) t.circle(-radius,360/len(pai)) frames.append(screen.save()) t.wait(0.1) for index,frame in enumerate(frames): frame.save(f'绕pai/{index}.png') screen.mainloop()
李兴球
李兴球的博客是Python创意编程原创博客
要发表评论,您必须先登录。
发表评论