POV-Ray : Newsgroups : povray.general : Clock intervals : Re: Clock intervals Server Time
24 Apr 2024 18:52:18 EDT (-0400)
  Re: Clock intervals  
From: Le Forgeron
Date: 17 Jul 2018 23:24:40
Message: <5b4eb2f8$1@news.povray.org>
Le 17/07/2018 à 23:36, Mike Horvath a écrit :
> I want to be able to tie a variable to the clock value, but only for
> certain portions.
> 
> For example, the variable should be equal to 0 before the clock is 0.3,
> and equal to one after the clock is equal to 0.6. In between 0.3 and 0.6
> the clock should interpolate from 0 to 1.
> 
> How would I do this using a macro? Thanks.
> 
> 
> Mike

I saw the answers with macro, and you asked for macro, but you could
have used a linear spline instead.

#declare Spline = spline { linear_spline
  0, 0,
  0.3, 0,
  0.6, 1,
  1, 1
};

#declare Variable = Spline(clock).x ;


Post a reply to this message

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