POV-Ray : Newsgroups : povray.newusers : Rotation then Translation inside an animation : Re: Rotation then Translation inside an animation Server Time
13 May 2024 22:16:06 EDT (-0400)
  Re: Rotation then Translation inside an animation  
From: scott
Date: 1 Apr 2014 10:28:14
Message: <533accfe@news.povray.org>
> I'd like to have a rotation in a fixed amount of time. But I'm not sure how to
> do this without the fps.
> Is it possible?

I always use "clock" to be the number of seconds in the animation, so in 
your example I would put:

Initial_Clock=0
Final_Clock=5
Initial_Frame=1
Final_Frame=150

If you then decide you want to render at 60fps you only need to change 
Final_Frame. I try to avoid using anything based on the frame_number or 
fps unless really needed.

In your scene you can then write:

  #if (clock < 2.5)
    rotate< 0, clock*360, 0 >
  #else
    #declare previousClock = 2.5;
    rotate < 0, previousClock*360, 0 >
    translate < (clock-2.5)*5, 0, 0 >
  #end

I also changed the translate distance to (clock-2.5)*5, otherwise you'll 
get a jump at 2.5 seconds.


Post a reply to this message

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