POV-Ray : Newsgroups : povray.newusers : trying to animate with the color_map : Re: trying to animate with the color_map Server Time
28 Jul 2024 12:29:55 EDT (-0400)
  Re: trying to animate with the color_map  
From: clipka
Date: 19 Mar 2009 12:40:00
Message: <web.49c2747ee1f54028f708085d0@news.povray.org>
"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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.