Pulsed walk with randomized turns.
Log in to post a comment.
Canvas.setpenopacity(1);
const turtle = new Turtle();
function walk(i) {
turtle.forward((2+Math.sin(2+Math.sin(i)+i))*(1+Math.round(i/50000)/2));
if (Math.random() >= 0.5) {
if (Math.sin(i*0.03) >= 0.5) {
turtle.right(i%17 ? 45 : 90);
}
else {
turtle.left(i%27 ? 135 : 180);
}
}
return i < 100000;
}