POV-Ray / povray

The Persistence of Vision Raytracer: http://www.povray.org/
GNU Affero General Public License v3.0
1.35k stars 282 forks source link

Creating a cyclical animation requires 'clock' to stop short of the target #404

Closed DougBoffey closed 3 years ago

DougBoffey commented 3 years ago

When creating an animation, for example a spinning ball, that is to be animated cyclically, having the clock variable ranging from Initial_Clock to Final_Clock is not the right action, as the first and last frames would be the same, causing a pause in the animation. Instead, clock should range from Initial_Clock to Initial_Clock + (Final_Clock - Initial_Clock) * (Final_Frame - Initial_Frame + 1) / (Final_Frame - Initial_Frame + 2).

Admittedly, there is a hack to get around this issue, and that is to make Final_Frame to be one more than the required final frame, and put the true final frame in Subset_End_Frame, but as I say, it is a hack.

Please consider adding an .INI option, for example Cycles = on;, along with an appropriate command line option.

I am using version 3.7.0.mscv10.win64

DougBoffey commented 3 years ago

Apologies. Hadn't realised box needed filling.

ingoogni commented 3 years ago

Have a look at the ini/command settings:

Cyclic_Animation=bool > Turn cyclic animation on/off +KC > Turn cyclic animation on -KC > Turn cyclic animation off

c-lipka commented 3 years ago

Took the liberty to move your description into the issue report proper.