|
|
Noah A wrote:
>
> i'm using a while statment to make a bunch of "things" as they rise on
> the y access i'd like them to incease certain colors. how would i use an
> array to do this?
An array is one possible solution but it would probably be easier to
eimple use the value of the while loop to increment the colors.
#declare a = 0;
#while (a < 10 )
sphere {<0,a,0>, 1
pigment { rgb <a*0.1, a*0.1, a*0.1> }
}
}
#declare a = a + 1;
#end
The above example will change each rgb value by 0.1 for each sphere it
produces. There are tricks to using this approach and the example I gave
is a very basic one. If you really want to change the colors using an array
you will still need to write out each color you want to store in the array
before passing it into the while loop. This could be a very tedious task
but it is possible if you really want to do it. If my while loop example
is not what you want let me know and I will work out an array solution for
you.
--
Ken Tyler
See my 700+ Povray and 3D Rendering and Raytracing Links at:
http://home.pacbell.net/tylereng/index.html
Post a reply to this message
|
|