Sunday, February 27, 2011

Journal Post 6

The spheres now get smaller in each ring as they near the center. I've been trying to also decrease the space between the rings so they're not so spread out near the center, but I'm going to give up on that for now. I want to get the colors to work first, then if I have time I'll work on the spacing some more.

The hsv to rgb code has been giving me some trouble. I feel that I need to declare it as a vector variable, but I can't figure out how to do that.

float $rad = .01;

for ($j = 1; $j <>

{

for ($i = 1; $i <>

{

$ball = `shadingNode -asShader lambert`;

$color = $ball + ".color";

vector $vect;

hsv_to_rgb <<$i, $j, .5>>;

//setAttr $color -type double3 ($vect.x) ($vect.y) ($vect.z);

$objname = `polySphere -ch on -o on -r $rad`;

xform -translation ($j/8.0) 0 0;

move 0 0 0 $ball.scalePivot $ball.rotatePivot;

xform -ro 0 ($i*10) 0;

hyperShade -assign $ball;

}

$rad = $rad + .01;

}


No comments:

Post a Comment