The problem of filling in turtle (tkinter) in self-intersecting polygons.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AndryRe
    New Member
    • May 2024
    • 1

    The problem of filling in turtle (tkinter) in self-intersecting polygons.

    Hello. I'm facing a problem with the Tk library. I teach Python programming to children. We are studying turtle graphics, which uses Tkinter resources.
    I noticed that in python 3.12 the turtle paints self-intersecting polygons using the odd-even algorithm.
    I previously taught python 3.9 to 3.11. These versions used a non-zero filling algorithm for self-intersecting polygons.

    I asked python developers for help, but they couldn't help me. They don't know how to add the old version of the algorithm.

    Can you make it so you can choose fill rules? With the new filling algorithm, it is impossible to correctly paint over a five-pointed star (pentagram).

    Python version 3.12 uses tk 8.6.13.
    And version 3.11 uses tk 8.6.12.

    In the files I have attached screenshots of the results of the work on filling the polygons.

    Fully loaded in python 3.9 - 3.11.
    Partially uploaded to python 3.12.
    Attached Files
Working...