Cosmogrammav2

plotted zodiac s***

Log in to post a comment.

// Global code will be evaluated once.
const turtle = new Turtle();
turtle.degrees(Math.PI * 2);

// The walk function will be called until it returns false.
function walk(i) {
    
    turtle.penup();
    
    const detail = 650.0;
    const angle = (i / detail) * (Math.PI * 2);
    const rOffset = ((Math.random() * 2.0) - 1.0) * 0.35;
    const x = Math.cos(angle) * (35 + rOffset);
    const y = Math.sin(angle) * (35 + rOffset);
    
    turtle.goto(x, y);
    const angleOffset = ((Math.random() * 2.0) - 1.0) * 0.015;
    turtle.setheading(angle + angleOffset);
    
    turtle.pendown();
    const forwardOffset = Math.random() + 0.7; 
    turtle.forward(100 * forwardOffset);
    
    return i < detail;
    
}