Elyg
11/3/2017 - 3:47 PM

Brick wall pattern

Run Over: DETAIL Creates a brick wall point pattern

vector scale = chv("scale");
int rows = chi("rows");
int columns = chi("columns");

for(int i=0; i<rows; i++)
{
  for(int j=0; j<columns; j++)
  {
    float offset = j%2 ? 1 : 0;
    offset *=chf("offset");
    int pt = addpoint(geoself(), (set(offset,0,0)+set(i,j,0))*scale);
    addpointattrib(geoself(), "scale", set(1,1,1));
    setpointattrib(geoself(), "scale", pt, scale);
  }
}