ChatGPT4 - Notebook

Created using GPT4.

Log in to post a comment.

const turtle = new Turtle();
turtle.penup();
turtle.goto(-100, -100);
turtle.pendown();

function drawPattern(i, angle, scaleFactor, iterations) {
    if (i > iterations) return false;

    for (let j = 0; j < 360; j++) {
        turtle.forward(i * scaleFactor);
        turtle.right(angle);
        angle += 0.5;
    }

    return drawPattern(i + 1, angle, scaleFactor, iterations);
}

drawPattern(1, 89, 0.5, 100);