code: public Point3d getCoordinatesFromGridPoint(int gridPoint) {
          int dimCounter = 0;
          Point3d point = new Point3d(0, 0, 0);
          for (int z = 0; z < grid[0][0].length; z++) {
              for (int y = 0; y < grid[0].length; y++) {
                  for (int x = 0; x < grid.length; x++) {
                      if (dimCounter == gridPoint) {
                          point.x = minx + latticeConstant * x;
                          point.y = miny + latticeConstant * y;
                          point.z = minz + latticeConstant * z;
                          return point;
                      }
                      dimCounter++;
                  }
              }
          }
          return point;
      }
docs: Method calculates coordinates from a given grid array position.