Skip to content(if available)orjump to list(if available)

Flag drawing with Turtle

Flag drawing with Turtle

1 comments

·January 20, 2025

userbinator

Filling on self-intersection is probably broken

That's always an edge-case (literally); having written various vector graphics converters over the years, the fundamentals are usually straightforward (although in this case converting between Cartesian absolute and polar relative coordinates can also introduce numerical precision issues), but depending on things like fill rule compatibility, these tricky cases tend to result in a lot of code dedicated to handling them correctly.

Even different OS' graphics stacks disagree: https://bugs.python.org/issue39392

Unfortunately there's a lack of US flag in the examples, but the Wales one makes up for it in complexity.