Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Code Block
int gridW = 12;
int gridH = 12;
int border = 60;
int stepX = 60;
int stepY = 60;
float sizeModifier = 1.05;
int graphicSize = 30;


void setup()
{
  size(800, 800);
  noStroke();
  fill(0);
  background(255);
  rectMode(CENTER);
  float graphicSizeScaled = graphicSize;
  translate(border, border);
  for (int i=0; i < gridH; i++)
  {
    for (int j = 0; j < gridW; j++)
    {
      rect(j * stepX, i * stepY, graphicSizeScaled, graphicSizeScaled);
    }
    graphicSizeScaled *= sizeModifier;
  }
}