My first turtle design to create a random vortex... hope you like it, too :-)
Log in to post a comment.
// small amount of imperfection
linearimperfection = 0.9
axialimperfection = 0.5
// level of detail
lod = 20
// random?
random = 1;
ran = 0.3;
angle = 30.1 // [0..100]
// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(2);
// Global code will be evaluated once.
const turtle = new Turtle();
turtle.up()
turtle.right(0)
turtle.setx(0)
turtle.sety(0)
turtle.down()
past = 0
now = 1
function walk(n) {
turtle.forward(n/lod+Math.random()*linearimperfection)
turtle.right(angle+Math.random()*axialimperfection)
if(random){
if(Math.random()<ran) {
turtle.up()
} else {
turtle.down()
}
}
return n < (1000*lod);
}