neolateral

programming, drawing, photograpy etc.

Articles tagged with dragoncurve

PicoTurtle released

This week I built the first release of PicoTurtle - a turtle program built on REST/HTTP APIs, allowing programs written in potentially any programming language to draw turtle graphics with it. The desktop editor is built using electron. Download it at PicoTurtle Homepage.

I'll make follow-up posts about how the program works, but here's a dragon curve drawn using picoturtle...

And here's the code... (based on the entry on dragon curve in wikipedia at https://en.wikipedia.org/wiki/Dragon_curve#Code)

from picoturtle import *
create_turtle()

### Your code goes here ###

def dragonCurve(order, length):
    right(order * 45)
    dragonCurveRecursive(order, length, 1 …