A dot in 10000.
"Inspired" by the One in one million poster from Wait but why : store.waitbutwhy.com…million-poster-24x24
I would have love to make a one million grid, but my screen lacks the resolution. :)
Log in to post a comment.
// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);
const dot = 1; //min = 0, max = 1, step = 1, (white, black)
const size = 90;
const grid = 100;
let radius = 0.7 * size / grid;
// Global code will be evaluated once.
const turtle = new Turtle();
let x = 0;
let y = 0;
const xi = Math.floor(Math.random() * grid);
const yi = Math.floor(Math.random() * grid);
// The walk function will be called until it returns false.
function walk(i) {
posx = x * (2 * size / grid) - size;
posy = y * (2 * size / grid) - size;
if(dot == 1){
turtle.jump(posx, posy - radius);
turtle.seth(0);
turtle.circle(radius);
if(x == xi && y == yi){
for(let j = radius; j > 0 ; j -= 0.1){
turtle.jump(posx, posy - j);
turtle.seth(0);
turtle.circle(j);
}
}
} else {
if(x != xi || y != yi){
turtle.jump(posx, posy - radius);
turtle.seth(0);
turtle.circle(radius);
}
}
if(x++ >= grid){
x = 0;
if(y++ >= grid) return false;
}
return true;
}