|
|
"Georg Olesen" <vib### [at] hotmailcom> wrote in
news:web.420b52fd9cf29933a278c9190@news.povray.org:
I'm making an animation of several frames. I would like to be able
pass a variable from one frame to the next. Is there any way of doing
this? In advance thanx Georg Olesen
In fact the solution depends on what type of variable you need.
If it's evolution is dependant on the frame number, you can use the
"clock" variable (e.g : rotate clock*360*x for a complete rotation
around x-axis in the entire animation).
If your variable is predictable for each frame, i.e you know how to
compute it for each single frame, you can do so. Initiating a
random-numbers stream and taking as many of them as the frame number
gives you a "coherent" situation (as long as random numbers can be
qualified that way) throughout the animation.
If you cannot know what was your variable's value on the frame before,
then you can use a temporary file : write the variable in the file at
the end of the script, read the variable from the file at the beginning.
On first frame, initialise with whatever you need.
Does one of these methods match your need ?
Regis.
Post a reply to this message
|
|