The Scintillating Grid #illusion
en.wikipedia.org/wik…lating_grid_illusion
Log in to post a comment.
let lineWidth = 3; //min=1, max=10, step=.5 // You can find the Turtle API reference here: https://turtletoy.net/syntax Canvas.setpenopacity(-.5); // Global code will be evaluated once. const turtle = new Turtle(); turtle.setheading(90); var hlw = lineWidth / 2; var max = Math.sqrt(2 * hlw * hlw); // The walk function will be called until it returns false. function walk(i) { for(var j = 0; j < lineWidth; j += .2) { turtle.jump(-100,-95 + j + (i * 17)); turtle.goto(100, -95 + j + (i * 17)); turtle.jump(-95 + j + (i * 17), -100); turtle.goto(-95 + j + (i * 17), 100); } for(var j = -95; j < 100; j += 17) { for(var k = 0; k < max; k += .1) { turtle.jump(j + hlw + k, -95 + (i * 17) + hlw); turtle.circle(k); } } return i < 11; }