Hi,
Sorry I cannot understand the problem clearly, but if your problem is you cannot produce any result out of this code, the reason is you forgot to put a dot in the formula that calculates radius of the balls. It should be changed to this:
real delta = ((3./4.) *(1./(pi* w)))^(1./3);
"1/3"
equals 0, while "1./3"
is 0.333.