im trying to write an expression to create a cubic 3d array made from solids.
I have got this far:
Code: Select all
numx = 10;
numy = 10;
numz = 10;
space = 75
posx = Math.floor((index - 1)/numx);
posy= (index - 1)%numy;
posz = Math.floor((index - 1)/numz);
x = posx*space + space/2;
y = posy*space + space/2;
z = posz*space + space/2;
[x,y,z]