我有一个小(大)任务要处理,我想知道是否有人能帮我解决这个问题。我找过几次答案,但都没有成功
(http://s24.postimg.org/89r1zmgl1/Untitled.png)<;---椭圆
我想让一个任意数量的圆出现在椭圆上,你可以看到上面的链接。椭圆和圆都是用Tkinter定义的。在
class NetworkFrame:
def __init__(self, master, number_of_people):
DisplayFrame = Canvas(master, bg="white", width=720, height=300)
DisplayFrame.grid(row=0, columnspan=7, column=0, sticky='W', padx=5, pady=5)
DisplayFrame.create_oval(20, 20, 700, 280, width=1)
所以我的想法是-用户输入一个特定的数字(人的数量),它使一定数量的圆圈出现在由椭圆定义的路径上,均匀分布,对称放置。在
理想情况下,这就是我想要的,这样我就可以把它调整成我之前定义的任何形状,但是如果有其他方法可以使它们看起来像是沿着椭圆路径运动,这也是可以接受的。在
感谢您抽出时间!在
如果有人需要这个,我已经设法做到这多亏了凯文发布的链接!在
下面是它的工作原理
相关问题 更多 >
编程相关推荐