POV-Ray : Newsgroups : povray.binaries.animations : Strange birds : Re: Strange birds Server Time
1 Jul 2024 04:30:12 EDT (-0400)
  Re: Strange birds  
From: Mike Williams
Date: 23 Sep 2006 09:09:49
Message: <$lB8GFAv$SFFFwDw@econym.demon.co.uk>
Wasn't it Tim Nikias who wrote:
>RusHHouR wrote:
>> I use a spline to make them fly around in a certain kind of circular
>> pattern.
>> 
>> But, they only fly one lap... Im missing something here, how can I make them
>> loop the spline again and again? Thankful for help!
>> 
>
>> translate (batpath1(clock*12))}
>
>A spline only accepts values between 0 (beginning of spline) and 1 (end 
>of spline). If you want it to repeat the path, the value has to start at 
>0 again. This could be done like this:
>
>#declare BatMover = clock*12;
>#while (BatMover >= 1) #declare BatMover = BatMover-1; #end
>
>and later use
>translate (batpath1(BatMover))

perhaps more elegant to use mod()

translate (batpath1(mod(clock*12),1))

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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