Merry christmas ................................................................................................................................................................................................................................................................................................................................................
Log in to post a comment.
// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);
// Global code will be evaluated once.
const t = new Turtle();
t.penup();
t.goto(0,50);
t.left(90)
t.pendown();
function dreieck(ff) {
t.right(90)
t.forward(ff);
t.left(135)
t.forward(ff*Math.sqrt(2))
t.left(135)
t.forward(ff)
t.right(90)
t.forward(ff)
t.right(135)
t.forward(ff*Math.sqrt(2))
t.left(45)
}
function baum(x, y) {
var to = 21
t.penup();
t.goto(x, y);
t.pendown();
t.forward(12)
dreieck(to)
t.backward(to)
dreieck(35)
t.backward(15)
dreieck(30);
t.backward(10)
dreieck(25)
t.backward(6)
dreieck(20)
}
// The walk function will be called until it returns false.
function walk(i) {
var f =2;
baum((i-11)*f, 50);
return i<=22;
}