fractalkitty looking for math? fractalkitty.com

100 days of code

weaving_Day22

#animation#home

function setup() {
  createCanvas(windowWidth, windowHeight);
  noStroke();
}

function draw() {
  background(0)
  for (let i=0;i<40;i++){
    fill(255)
    if ( i%2 == 0){
      fill(150,220,220)
    }
    rect(5+25*i,0,20,width)
  }
  t = frameCount*3;
  for(let k=0;k<15;k++){
  for(let j=0;j<10;j++){
    fill(180,160,200)
    rect(0,5+k*50,t,20)
    fill(115,145,200)
    rect(0,30+k*50,t,20)
    fill(255)
    for(let i=0;i<20;i++){
      fill(150,220,220)
      rect(5+50*i,5+k*50,20,20);
      fill(255)
      rect(30+50*i,30+k*50,20,20);
    }
  }
  }
  if (frameCount*3 > width){
    frameCount = 0;
  }

}