|
![](/i/fill.gif) |
"The_FD" <nomail@nomail> wrote:
> I am building an animation in which the color of an object will vary with time.
> Here is how the color is given to the object (I removed the object from the
> code to make this message shorter):
> #declare i=1;
> #while (i<imax)
> pigment {
....
> }
> #declare i=i+1;
> #end
Are you aware that this will give you imax "pigment" statements? This usually
doesn't make any sense at all.
For animations, you should do something with the clock value or frame number.
Note that your SDL code should *always* generate the scene stuff for *one*
single frame, parameterized by either the clock value or frame number. It will
be parsed over and over again, once for each frame, with different values for
these parameters.
To read from a .csv file, use the "#fopen", "#read" and "#fclose" statements. To
read into an array, set up the array first (specifying the expected max number
of entries), then #read in a loop. See the online doc for details, including
how to detect end-of-file in case you are not sure in advance how many entries
you will actually have.
Post a reply to this message
|
![](/i/fill.gif) |