The modified equation: boxIncr = boxSize / (sqrt(numPoints) - 1)
Reason: The updated equation can distribute the points evenly in the box as an sqrt(numpoints) by sqrt(numpoints) matrix.
Example: Assuming the boxdiameter is set as 12, and numpoints is set as 16. In order to match up the box dimension and distribute the 16 points evenly in the box, the box increment is 4 rather than 3 (the old formula), which means that we distribute the points at 0,4,8,12 on the x axis. The y axis follows the same rule here.
**Note: The first index of the C++ program is 0.
Thus, to have a reasonable setting of boxSize and numPoints, these three settings are recommended to use/test:
The modified equation: boxIncr = boxSize / (sqrt(numPoints) - 1)
Reason: The updated equation can distribute the points evenly in the box as an sqrt(numpoints) by sqrt(numpoints) matrix.
Example: Assuming the boxdiameter is set as 12, and numpoints is set as 16. In order to match up the box dimension and distribute the 16 points evenly in the box, the box increment is 4 rather than 3 (the old formula), which means that we distribute the points at 0,4,8,12 on the x axis. The y axis follows the same rule here.
**Note: The first index of the C++ program is 0.
Thus, to have a reasonable setting of boxSize and numPoints, these three settings are recommended to use/test: