Python has tkinter, and tkinter has canvas. In tkinter, you can turn 2 connected lines into a curve, so you can turn a rectangle into an oval of the same size.
However, in HTML JavaScript, you need to put curve points 1 by 1 to make a curve, meaning the oval will be larger than the rectangle.
How do I achieve the same like in tkinter? If possible, what formula should I use to achieve such?
Here are the rough sketches I have in case you don't understand:
![noname.png noname.png](https://htmlforums.net/data/attachments/0/604-4687addccc0fb233152d20a5c015d074.jpg)
![noname2.png noname2.png](https://htmlforums.net/data/attachments/0/605-c62f6f56ce5cee957b764a0f119d2282.jpg)
However, in HTML JavaScript, you need to put curve points 1 by 1 to make a curve, meaning the oval will be larger than the rectangle.
How do I achieve the same like in tkinter? If possible, what formula should I use to achieve such?
Here are the rough sketches I have in case you don't understand:
![noname.png noname.png](https://htmlforums.net/data/attachments/0/604-4687addccc0fb233152d20a5c015d074.jpg)
![noname2.png noname2.png](https://htmlforums.net/data/attachments/0/605-c62f6f56ce5cee957b764a0f119d2282.jpg)
Last edited: