Springy Star

A star with springs (I don't exactly know myself)

Log in to post a comment.

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(0.5);

// Global code will be evaluated once.
const turtle = new Turtle();
turtle.penup();
turtle.goto(0,0);
turtle.pendown();

function pausecomp(millis)
{
    var date = new Date();
    var curDate = null;
    do { curDate = new Date(); }
    while(curDate-date < millis);
}

// The walk function will be called until it returns false.
function walk(i) {
    turtle.forward(i*0.4);
    turtle.left(150);
    //turtle.right (146)
   turtle.circle(3)
    pausecomp(10)
    return i < 500;
}