POV-Ray : Newsgroups : povray.general : Dumb clock animation question : Re: Dumb clock animation question Server Time: 25 Jun 2019 19:43:45 GMT
  Re: Dumb clock animation question  
From: JimT
Date: 18 Feb 2019 17:40:05
Mike Horvath <mik### [at] gmailcom> wrote:
> On 2/17/2019 7:27 AM, Tor Olav Kristensen wrote:
> > #macro MacroName(StartTime, EndTime)
> >
> >      #local R = (clock - StartTime)/(EndTime - StartTime);
> >      #local S = min(max(0, R), 1);
> >
> >      S
> >
> > #end // macro MacroName
>
>
> Thank you! That's perfect.
>
>
> Mike

I hesitate to try to improve on a TOK solution, but in my animations, a very
early line will be

#declare MyTime = clock;

then I use MyTime wherever I would use clock. This lets me #declare MyTime =
0.6667, for example to go to a position in the animation to test a particular
stage without running the whole animations. You would pass MyTime to the #macro.
This may be obvious, but it is an improvement.


Post a reply to this message

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