prova 4

prova 4

Log in to post a comment.

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);
const angolo = 30; //min=0 max=360 step=1
const lato = 30;//min=0 max=100 step=1
const numeroLati = 12;//min=0 max=100 step=1

// Global code will be evaluated once.
const t = new Turtle();
t.penup();
t.goto(0,0);
t.pendown();

// The walk function will be called until it returns false.
function walk(i) {
    t.forward(lato);
    t.right(135);
    t.forward(lato*2);
    t.right(135);
    t.forward(lato);
    t.left(90);
    t.forward(lato);
    t.right(135);
    t.forward(lato*2)
    t.right(135);
    t.forward(lato)
    t.left(90);
    t.left(45);
    t.forward(5);
    t.right(45);
    
    return i < numeroLati;
}