code: public void generateCentered(int n, float centering, Callback2d callback) {
          float start = centering * 0.5f;
          float end = 1.0f - centering;
          for (int y = 0; y < n; y++) {
              for (int x = 0; x < n; x++) {
                  float sampleX = ((start + rnd.nextFloat() * end) / n + (float) x / n) * 2.0f - 1.0f;
                  float sampleY = ((start + rnd.nextFloat() * end) / n + (float) y / n) * 2.0f - 1.0f;
                  callback.onNewSample(sampleX, sampleY);
              }
          }
      }
docs: Generate <code>n * n</code> random sample positions in the unit square of <code>x, y = [-1..+1]</code>.
  <p>
  Each sample within its stratum is confined to be within <code>[-centering/2..1-centering]</code> of its stratum.
  
  @param n
  the number of strata in each dimension
  @param centering
  determines how much the random samples in each stratum are confined to be near the center of the
  stratum. Possible values are <code>[0..1]</code>
  @param callback
  will be called for each generated sample position