TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Flag drawing with Turtle

39 pointsby grokx4 months ago

6 comments

harywilke4 months ago
Two fun flag facts. The red dot on the flag of Japan was off center by 1/100 towards the pole before 1999. The naval flag of France is not of equal proportions. the proportion are; blue 30, white 33, and red 37
jll294 months ago
Yes turtle graphics are very educational, I taught it (via PyTurtle) to 11-year-olds, who picked it up easily (&quot;draw a house, then translate into instructions for the little turtle&quot;).<p>BTW, there is no &quot;Western European Union&quot; any more, just one European Union, so the now simplified flag can leave out the white ugly letters in the middle.
lores4 months ago
I&#x27;m in awe that in 2024 the first introduction to programming can be a turtle in Python, just like it was in 1982 when someone came to my primary school to show everyone a turtle in Logo.
userbinator4 months ago
<i>Filling on self-intersection is probably broken</i><p>That&#x27;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.<p>Even different OS&#x27; graphics stacks disagree: <a href="https:&#x2F;&#x2F;bugs.python.org&#x2F;issue39392" rel="nofollow">https:&#x2F;&#x2F;bugs.python.org&#x2F;issue39392</a><p>Unfortunately there&#x27;s a lack of US flag in the examples, but the Wales one makes up for it in complexity.
jony12664 months ago
this is unbelievably cool... I remember turtle was the first thing I learned when learning python and it was super hard to make stuff that looked genuinely good. writing a tool to parse svgs into turtle code is a great strat
rossant4 months ago
(2018)