radius, steps, start, delta;
createCanvas(windowWidth, windowHeight);
radius = Math.min(width, height) / 8;
x: floor(width / delta.x),
y: floor(height / delta.y)
steps.x = Math.max(steps.x, steps.y);
steps.x = steps.x + 7 - steps.x % 6;
steps.y = max(steps.y, steps.x);
steps.y = steps.y + 3 - steps.y % 4;
x: width / 2 - steps.x / 2 * delta.x - delta.x / 2,
y: height / 2 - steps.y / 2 * delta.y - delta.y / 2
if (frameCount % 20 == 0) {
n = noise(p.x * noiseScale, p.y * noiseScale, ang * noiseScale);
if (p.x > width || p.x < 0 || p.y > height || p.y < 0) {
p.x = 0.4 * width + random(0.2 * width);
p.y = 0.4 * height + random(0.2 * height);
translate(start.x, start.y);
for (var k = 0; k < steps.y; k++) {
translate(delta.x / 2 * (1 - (k % 2)), delta.y);
for (var j = 0; j < steps.x; j++) {
stroke((n * 720) % 360, 40, 100);
line(last.x - width / 2, last.y - height / 2, p.x - width / 2, p.y - height / 2);
translate(-delta.x * steps.x - delta.x / 2 * (1 - (k % 2)), 0);
function escherRotate(k, j, direction) {
rotate(direction * 2 * PI / 3);
rotate(direction * 2 * PI / 3);
rotate(direction * 4 * PI / 3);