I need a function that returns the 3D-coordinates of all points on cubic lattice.
If I had for example 5x5x5 lattice with a width of 30 (some unit), then the x values can be 0, 7.5, 15, 22.5, 30. Likewise for y and z. So I make a list with these positions and want to create all the possible position vectors. How can I do this as efficiently as a possible? Obvioulsy I could do something like this:
one_direction = [0, 10, 20, 30, 40]
positions = []
for i in one_direction:
for j in one_direction:
for k in one_direction:
positions.append(np.array([i, j, k]))
Is there a better way using Numpy?