// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(-.3);
// 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 r = ((.1 / (1 - Math.random())) * Math.SQRT2 * 80) + 20;
let t = Math.random() * 2 * Math.PI;
turtle.penup();
turtle.jump(Math.cos(t) * r, Math.sin(t) * r);
turtle.seth(t + (Math.PI / 2));
turtle.forward(10);
turtle.left(Math.PI);
turtle.pendown();
turtle.forward(20);
return i < 5000;
}

Share this turtle

Direct link

https://turtletoy.net/turtle/e6727b8fd6

Embed turtle

Export turtle as animated GIF

Duration:

s

Frames / second:

fps

Options:

Warning: depending on the total number of frames, the export can take several minutes!