Thursday, March 3, 2011

What it's not a line?

So here is my non linear translations, Andrew helped me a ton with this one and I almost just wanna give all the credit to him haha but I figured out a lil bit of the math. Thanks Andrew you saved my life :) Rainbows :D

select -all; delete;

float $rot = 360.0/30.0;
string $name;
string $name2;

for ($x=0;$x<15.0;$x++)
{
    for ($y=0;$y<1;$y++)

    {
        $name = `shadingNode -asShader blinn`;
        $name2 = $name + ".color";      
        $ang = $x*$rot;
        $hue = $ang/360.0;

        vector $color = hsv_to_rgb(<<$hue, 1, 1>>);
        setAttr $name2 -type double3 ($color.x) ($color.y) ($color.z);
         polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;
         xform -translation (0.25*$x) 0 1;
        hyperShade -assign $name;

    }
}
;

No comments:

Post a Comment