Get the latest tech news

Flag drawing with Turtle


28 Dec 2018 Yep, drawing the Flag of Wales using Turtle :P One of the first units I ever took at UWA was CITS1200 - Java programming. There was this fairly basic lab task involving drawing flags using a limited set of drawing commands.

If I recall correctly, you were only allowed to use drawLine, so you had to implement your own methods to draw more complex shapes like circles or arcs. I don’t think I bothered much with the exercise itself because no marks were on the line, but I did have an idea - what if we could write a parser to interpret an SVG as a bunch of Turtle drawing commands? Flag of the Western European Union A few modifications required on this one - avoiding elliptical arcs, plus because fill rules aren’t supported, an additional path had to be added to ‘hollow out’ the O.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Turtle

Turtle