private void calcRowSizes(int[] rows, int size, int iterations, int mod)
    {
        zeroArray(rows, size);

        for(int index = 0; index < size; index++)
        {
            if(index == 0 || index == size -1)
            {
                rows[index] = iterations;
            }
            else
            {
                rows[index] = 2 * iterations;
            }
        }

        for(int index = 0; index < size && mod > 0; index++, mod--)
        {
            rows[index] += 1;
        }

        if(mod > 0)
        {
            for(int index = size-2; index > 0 && mod > 0; index--, mod--)
            {
                rows[index] += 1;
            }
        }
    }