POV-Ray : Newsgroups : povray.general : Clock intervals : Re: Clock intervals Server Time
20 Apr 2024 05:49:37 EDT (-0400)
  Re: Clock intervals  
From: clipka
Date: 18 Jul 2018 18:58:38
Message: <5b4fc61e$1@news.povray.org>
Am 19.07.2018 um 00:39 schrieb Bald Eagle:
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> 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 ;
> 
> Jerome:
> This is VERY nice and elegant.
> I figured it could be done with a spline, but I don't often use them and just
> wanted to help solve the problem with a quick answer - but this is much better!

I agree. The spline-based approach also has the added benefit that it
can be used to smoothly speed up and slow down some movement, by using
non-linear splines.


Post a reply to this message

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