|
|
Hi All
First I want to move the variable mover form 50 to 0 in between clock values of
0 and 5.
Then as the clock values increase from 5 to 10 I want mover to go from 0 to 50.
Then as the clock values increase from 10 to 15 I want mover to go from 50 to
100.
Then as the clock values increase from 15 to 20 I want mover to go from 100 to
50.
I have found the section
3.2.1.2 Internal Animation Loop
For new scenes, we recommend you do not change the Initial_Clock or Final_Clock
from their default 0.0 to 1.0 values. If you want the clock to vary over a
different range than the default 0.0 to 1.0, we recommend you handle this inside
your scene file as follows...
#declare Start = 25.0;
#declare End = 75.0;
#declare My_Clock = Start+(End-Start)*clock;
Then use My_Clock in the scene description. This keeps the critical values 25.0
and 75.0 in your .pov file.
I rename most of these so as not to interfere with pov internal values.
//----start code segment----
#switch(MyClock)
#range(0,5)//centre to full left
#local MinClock= 0;
#local MaxClock= 5;
#local MinMove = 50;
#local MaxMove = 0;
#break
#range(5,10)//full left to center
#local MinClock= 5;
#local MaxClock= 10;
#local MinMove = 0;
#local MaxMove = 50;
#break
#range(10,15)//center to right
#local MinClock= 10;
#local MaxClock= 15;
#local MinMove = 50;
#local MaxMove = 100;
#break
#range(15,20)//right to center
#local MinClock= 15;
#local MaxClock= 20;
#local MinMove = 100;
#local MaxMove = 50;
#break
#else
#error concat("MyClock=",str(MyClock,0,0),".\n")
#end
#local Mover=
(MinMove+(MaxMove-MinMove))*(MyClock/(MinClock+(MinClock-MaxClock)));;
//----end code segment----
I would like to leave the switch statement alone as this is the controlling
element and will allow for further development later. I trying to develop a
single equation to calc the output.
Any help would be appreciated and great fully received. Thank you.
Post a reply to this message
|
|