Inspired by Logan Willmott on twitter: twitter.com/__lw/status/1105897541206335488
I think Logan is interpolating angle values over a grid instead of using sin/cos, but I can't prove it.
I wonder if I could use a plasma generator, then the value at each cell would be the angle....
Log in to post a comment.
Canvas.setpenopacity(1);
// Global code will be evaluated once.
const turtle = new Turtle();
turtle.penup();
turtle.goto(-50,-20);
turtle.pendown();
const width=195;
const height=195;
const cubesPerSide=40;
const cubeSpacing=width/(cubesPerSide);
const cubeSize=width/(cubesPerSide*0.95);
const minX=-(width)/2 ;
const minY=-(height)/2;
// The walk function will be called until it returns false.
function walk(i) {
for(let y=0;y<cubesPerSide;++y) {
for(x=0;x<cubesPerSide;++x) {
turtle.penup();
turtle.goto(minX+x*cubeSpacing+cubeSpacing/2,minY+y*cubeSpacing+cubeSpacing/2);
// play with these numbers to get new effects! DO IIIIIIT~~~!
turtle.setheading(
Math.sin(1.1*x/cubesPerSide)*150
+Math.cos(12.5*(x+y)/cubesPerSide)*25);
turtle.forward(cubeSize/2); turtle.right(90);
turtle.pendown();
turtle.forward(cubeSize/2); turtle.right(90);
turtle.forward(cubeSize); turtle.right(90);
turtle.forward(cubeSize); turtle.right(90);
turtle.forward(cubeSize); turtle.right(90);
turtle.forward(cubeSize/2);
}
}
return false;
}