【发布时间】:2020-07-13 10:47:07
【问题描述】:
拜托,我正在尝试制作一个椭圆形画布以围绕一个圆圈旋转。我已经尽力了,但不知道如何。谁能帮我吗。查看代码
from tkinter import *
import time
import math
root=Tk()
width=700
height=600
cn=Canvas(root,width=width,height=width)
cn.pack(expand=True,fill="both")
ball1=cn.create_oval(200,200,500,500)
ball2=cn.create_oval(200,200,300,300,fill="black")
ball3=cn.create_oval(330,330,370,370,fill="black")
l1=cn.create_line(350,180,350,600)
l2=cn.create_line(180,350,600,350)
pos1=cn.coords(ball3)
rect=cn.create_rectangle(100,100,700,600)
root.mainloop()
我想让更大的球沿着圆圈的线移动
【问题讨论】: