Thursday, March 3, 2011

Cubed

Here is the cube, why couldn't everything else be this easy???? *sigh*

for($x=0;$x<8;$x++)
{
  for($y=0;$y<8;$y++)
  {
    for($z=0;$z<8;$z++)
     {
       $name=`shadingNode-asShader blinn`;
       $tmp=$name+".color";//blinnShader1.color
              setAttr $tmp -type double3 ($x/7.0) ($y/7.0) ($z/7.0);
       polySphere -ch on -o on -r .03;//ballradius
    xform -translation ($x/7.0) ($y/7.0) ($z/7.0);//balldistance
       hyperShade -assign $name;
     }
  }
}

No comments:

Post a Comment