Ribbon Sketch

Based on the animated version on Dwitter: dwitter.net/d/13690 (Dancing Ribbon)

Log in to post a comment.

// Forked from "Vector formation object on torus" by rodrigosiqueira
// https://turtletoy.net/turtle/e35cdc88c1

// Forked from "The Rössler Attractor" by rodrigosiqueira
// https://turtletoy.net/turtle/c82f5e2af3

// Forked from "The Aizawa Attractor " by rodrigosiqueira
// https://turtletoy.net/turtle/946579f115

// Forked from "Lorenz XZ" by evilotto
// https://turtletoy.net/turtle/30f29b215b

// 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.penup();

function project() {
  turtle.goto(110*x/z, 170*y/z);
}

turtle.goto(0,15);
turtle.pendown();

C=Math.cos
S=Math.sin
t=0.5

// The walk function will be called until it returns false.
function walk(i) {

    x = 4*C(U=i/6)+C(1e5/U);
    y = (2+S(U*2+3))*S(U*2-3.2)-1
    z = S(U*3+t)-7

    if (i>1){
      project();
    }
    return i < 3000
}