very cool but very slow
Log in to post a comment.
// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(-0.05);
// Global code will be evaluated once.
const turtle = new Turtle();
turtle.pendown();
// The walk function will be called until it returns false.
function walk(i) {
x=-100
y=-100
while(x<100){
y=-100
while(y<100){
zx=x+(Math.random()*2-1)
zy=y+(Math.random()*2-1)
zx=zx/70
zy=zy/70
zx0=zx
zy0=zy
a=0
c=0
while(a<i+1){
if((zx*zx)+(zy*zy)>4){break;}
zxt=(zx*zx)-(zy*zy)+zx0
zy=2*(zx*zy)+zy0
zx=zxt
a++
}
zx=zx*70
zy=zy*70
turtle.jump(zy,zx+20)
turtle.circle(0.1)
y++
}
x++
}
return i < 128;
}