Hello,
Say I have a cube withe side d.
I would like to generate a 3D cubic SHELL of the above mentioned cube with the side size of (2*n+1)*d.
Looking for a code that generates the coordinates of the centers of these cubes.
A simple 3 level loop (like the pseudo code below) will generate a full structure.
I am interested only in the outer shell.
Any ideas?
Thank you
Say I have a cube withe side d.
I would like to generate a 3D cubic SHELL of the above mentioned cube with the side size of (2*n+1)*d.
Looking for a code that generates the coordinates of the centers of these cubes.
A simple 3 level loop (like the pseudo code below) will generate a full structure.
I am interested only in the outer shell.
VBA Code:
for ix=-n to n
for iy=-n to n
for iz=-n to n
x0=ix*d
y0=iy*d
z0=iz*d
create cube(x0,y0,z0,d)
next iz
next iy
next ix
Any ideas?
Thank you