What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

How to make point to point curves in JavaScript?


New member
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:
Last edited: