Okay so I'd like to make a circle move in an elliptical pattern with a button in tkinter. I previously made it move back and forth 10px at a time but I have no idea how to make it go in an ellipse
My back and forth code looks like this:
from Tkinter import *
def ball(gd, hb):
global x1, y1
x1, y1 = x1+gd, y1+hb
can1.coords(oval1,x1, y1, x1+30, y1+30)
def move():
global direction
if x1 + 30 == 250:
direction = -1
elif x1 == 0:
direction = 1
ball(direction*10, 0)
x1 , y1, direction = 0, 125, 1
root = Tk()
can1 = Canvas(root,height = 250, width =250, bg = 'black')
oval1= can1.create_oval(x1,y1,x1+30,y1+30, width=2, fill='orange')
can1.pack()
Button(root, text ='Move Ball', command = move).pack()
root.mainloop()
Any ideas would help me, I just need to be pointed in the right direction