Rotate Grid Shape

PHOTO EMBED

Mon Apr 05 2021 15:24:07 GMT+0000 (Coordinated Universal Time)

Saved by @andreaperato #processing #javascript

int tile = width/20;
int half = tile/2;
float size = tile/2; 

translate(tile/2, tile/2);


  for (int y=0; y<height; y+=tile) {
    for (int x=0; x<width; x+=tile) {
      pushMatrix();
      translate (x, y);
      rotate(degrees(angle));
      rect(0, 0, size, size);
      //line(x-half, y-half, x+half, y+half);
      popMatrix();
    }
  }

content_copyCOPY

Rotate each shape independently

https://www.youtube.com/watch?v=Y1D-0whVBac&ab_channel=thedotisblackcreativecoding