POV-Ray : Newsgroups : povray.general : Dumb clock animation question : Re: Dumb clock animation question Server Time
25 Apr 2024 02:57:18 EDT (-0400)
  Re: Dumb clock animation question  
From: Mike Horvath
Date: 19 Feb 2019 00:15:33
Message: <5c6b90f5@news.povray.org>
On 2/18/2019 12:38 PM, JimT wrote:
> 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.
> 
> 


I'll keep that in mind, thanks! What I usually do is set the clock value 
using the +K switch if I need to. I get confused by all the INI settings 
sometimes too.


Mike


Post a reply to this message

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