As seen on paulbourke.net/fractals/fracintro/
Variations:
- Strange attractors (variation)
- Strange attractors (variation)
- Strange attractors (variation)
Log in to post a comment.
// LL 2021 const a = 0.4; // min=0 max=10 step=0.01 const b = 1; // min=0 max=10 step=0.01 const c = 0; // min=0 max=1 step=0.01 const it_pow = 19; // min=15 max=25 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; function walk(i) { const nx = y - Math.sign(x) * Math.abs(b * x - c) ** 0.5, ny = a - x; x = nx; y = ny; const px = Math.cos(-.8) * x - Math.sin(-.8) * y; const py = Math.sin(-.8) * x + Math.cos(-.8) * y; if (i < loop) { min_x = Math.min(min_x, px); min_y = Math.min(min_y, py); max_x = Math.max(max_x, px); max_y = Math.max(max_y, py); } else if (i < loop * 1.01) { x = 0; y = 0; } else { const bx = ((px - min_x) / (max_x - min_x) - 0.5) * 190; const by = ((py - min_y) / (max_y - min_y) - 0.5) * 190; turtle.jump(bx, by); turtle.goto(bx+0.1, by); } return i < loop*2; }