1
1
1Tima12018-07-04 18:42:17
Python
1Tima1, 2018-07-04 18:42:17

Figure drawing?

there is a code

from tkinter import*
window=Tk()
window.title('Alien')
c=Canvas(window,height=300,width=400)
c.pack()
body=c.create_oval(100,150,300,250,fill='green')
eye=c.create_oval(170,70,250,130,fill='white')

if the body and the eye have the same X centers, then why do the X coordinates differ and how to build a circle according to the coordinates, I just got confused
. X, and there they already connect, but the circle slightly changed the coordinates, it just shifted and became, as it were, not a circle, but an oval with a displaced center

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2018-07-04
@1Tima1

See
i.e. for the circle to be even, you need x2-x1 == y2-y1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question