solid array
Posted: August 25th, 2004, 2:29 pm
Hey guys,
im trying to write an expression to create a cubic 3d array made from solids.
I have got this far:
I apply it to each layer, i suspect I need to do something with the index number but im not quite sure what it is.
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]