If I have a 3D cube of a given dimension, say 50x50x50, and I want to split it into smaller cubes of 5x5x5, i.e. splitting it by 10 at each edge, how can I appropriately place the smaller cubes position in the vector in such a manner that the vector index correctly represents the location of the smaller cube?
I only know of a similar example with a 2D square: if we have x=8 and y=10 square and want to divide it to 1x1, the position may be calculated as x*y + y.