for(float x = 0; x < dimX; x += d) {
for(float y = 0; y < dimY; y += d) {
coords[coordIndex++] = new Point3f(x * cSizeX, y * cSizeY, getZ(x, y));
coords[coordIndex++] = new Point3f((x+d) * cSizeX, y * cSizeY, getZ(x+d, y));
coords[coordIndex++] = new Point3f(x * cSizeX, (y+d) * cSizeY, getZ(x, y+d));
coords[coordIndex++] = new Point3f(x * cSizeX, (y+d) * cSizeY, getZ(x, y+d));
coords[coordIndex++] = new Point3f((x+d) * cSizeX, y * cSizeY, getZ(x+d, y));
coords[coordIndex++] = new Point3f((x+d) * cSizeX,(y+d) * cSizeY, getZ(x+d, y+d));
texCoords[texIndex++] = new TexCoord2f((x / sizeX ) * repeatCount, (y / sizeY) * repeatCount);
texCoords[texIndex++] = new TexCoord2f((x / sizeX + d) * repeatCount, (y / sizeY) * repeatCount);
texCoords[texIndex++] = new TexCoord2f((x / sizeX ) * repeatCount, (y / sizeY + d) * repeatCount);