// LL 2021
Canvas.setpenopacity(-0.25);
const a = 0;       // min=-10 max=10 step=0.01
const b = 0;       // min=-10 max=10 step=0.01
const c = 0;       // min=-10 max=10 step=0.01
const d = 0;       // min=-10 max=10 step=0.01
const it_pow = 20; // min=15 max=22 step=0.1
const turtle = new Turtle(), loop = 2**it_pow;
var x = 0, y = 0, min_x = 0, min_y = 0, max_x = 0, max_y = 0;
const ar = a ? a : ((Math.random() - 0.5) * 20), br = b ? b : ((Math.random() - 0.5) * 20), cr = c ? c : ((Math.random() - 0.5) * 20), dr = d ? d : ((Math.random() - 0.5) * 20);
function walk(i) {
    const nx = Math.sin(ar * y) - Math.cos(br * x), ny = Math.sin(cr * x) - Math.cos(dr * y); x = nx; y = ny;
    if (i < 1000) {
        min_x = Math.min(min_x, x); min_y = Math.min(min_y, y); max_x = Math.max(max_x, x); max_y = Math.max(max_y, y);
    } else if (i == 1000) { x = y = 0; } else {
        const bx = ((x - min_x) / (max_x - min_x) - 0.5) * 190, by = ((y - min_y) / (max_y - min_y) - 0.5) * 190;
        turtle.jump(bx, by); turtle.forward(.1);
    }
    return i < loop*2;
}