Friday, March 11, 2011

IFDM 210 COLOR WHEEL ASSIGNMENT: Re-posted Color Cube code

This is my re-posted color cube code, the first time around through adding all of my photos part of it got deleted, and I couldn't seem to get it into the original post.

Here is the complete code that did not make it through in my original assignment post.

select -all;
doDelete;
int $x;
int $y;
int $z;
string $name;
string $tmp;
for($y=0; $y<8;>
{
for($x=0; $x<8;>
{
for($z=0; $z<8;>
{
$name = `shadingNode -asShader phong`;
$tmp = $name + ".color";

setAttr $tmp -type double3 ($x/7.0) ($y/7.0) ($z/7.0);
$objname = `polySphere -ch on -o on -r .03`;
xform -translation ($x/8.0) ($y/8.0) ($z/8.0);
hyperShade -assign $name;
}
}
};

No comments:

Post a Comment