global proc rkoTranslation (int $absolute, float $xMin, float $xMax, float $yMin, float $yMax, float $zMin, float $zMax)

{
string $objects[] = `ls -dagObject -selection`;

if(!size($objects))
{
error ("Hey buddy you screwed up somewhere! Fix It!");
}

//This is a delcared "for" statement that way all of the roations are done within
//one statement instead of writing out all of the transformations.


int $i;
for($i=0; $i<size($objects); $i++);
{
$x=rand($xMin,$xMax);
$y=rand($yMin,$yMax);
$z=rand($zMin,$zMax);
if ($absolute)
move -aboslute $x $y $z $objects[$i];
else
move -relative $x $y $z $objects[$i];


}

print "// Jobs Done. \n";
}


{
//This creates the sphere for duplication
sphere;

//We need to rename the sphere and then duplicate it
//You can change how ever many spheres you want
rename "nurbsSphere1" "ball";
select ball;
duplicate -rr;
for ($i=1; $i<9; ++$i) duplicate -rr -st;
}

rkoTranslation (1, -15.0, 15.0, 0.0, 15.0, -15.0, 15.0)