Tkinter - The Reuleaux Triangle - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Tkinter - The Reuleaux Triangle (/thread-30134.html) |
Tkinter - The Reuleaux Triangle - andrewapk - Oct-06-2020 Hello everyone, I need help drawing a Reuleaux Triangle using 3 create_arc method. Unfortunately, it is not a perfect circle, meaning the midpoint will be longer than a regular radius on a circle. The Reuleaux triangle looks like this: Using 3 create_arc commands, how would I create this in Tkinter Python? Thanks! RE: Tkinter - The Reuleaux Triangle - deanhystad - Oct-06-2020 Actually it is a perfect circle. Three perfect circles centered at the three vertices. Remember when using the create_arc() function you specify a bounding rectangle and the center of the rectangle is the center of your arc. Since all your arcs are circular and centered on a vertex, that should give you the bounding rectangle for each arc. That leaves setting the start and extent angles. I know the drawing is supposed to be drawn using three arcs (how do you get the chord?), but I drew a triangle first to help get my bearings. Then I drew a circle centered over a vertex and sized to touch the other two vertices. Then I played around with start and extent until I understood how they work. After that it was easy to do the other two arcs and then remove the triangle. |