Modifying rotation by distribution
int gridW = 14;
int gridH = 14;
int border = 70;
int stepX = 50;
int stepY = 50;
int graphicSize = 25;
void setup()
{
size(800, 800);
noStroke();
fill(0);
background(255);
rectMode(CENTER);
float rotation = 0;
translate(border, border);
for (int i=0; i < gridH; i++)
{
for (int j = 0; j < gridW; j++)
{
rotation++;
pushMatrix();
translate(j * stepX, i * stepY);
rotate(radians(rotation));
rect(0, 0, graphicSize, graphicSize);
popMatrix();
}
}
}
Related content
Modifying distribution along width and height
Modifying distribution along width and height
Modifying scale with distribution
Modifying scale with distribution
p5.js Tiling and Repetition
p5.js Tiling and Repetition
(Extra) Curve Reactor
(Extra) Curve Reactor
Coordinates (en)
Coordinates (en)
p5.js Particle System
p5.js Particle System