Log in to post a comment.
// You can find the Turtle API reference here: https://turtletoy.net/syntax Canvas.setpenopacity(1); // Global code will be evaluated once. const turtle = new Turtle(); turtle.radians(); // The walk function will be called until it returns false. function walk(i) { let size = 1; let start = -Math.PI / 14.5; let s = (Math.PI * (i / 200)) + start; turtle.jump((Math.sin(s) * (i + size)) + 4, (Math.cos(s) * (i + size)) + 9); let side = Math.sqrt(Math.pow(1.5 * (i + size), 2) + Math.pow(i+size, 2)); for(let o = 0; o < 6; o+=2) { turtle.seth(Math.sin(Math.PI / 6) - s + Math.PI + (Math.PI * o/3)); turtle.circle(side, Math.PI /3); } return i < 80; }