POV-Ray : Newsgroups : povray.animations : Shed version 2 : Re: Shed version 2 Server Time
29 Apr 2024 00:16:06 EDT (-0400)
  Re: Shed version 2  
From: Bald Eagle
Date: 22 Feb 2017 07:45:00
Message: <web.58ad8768e97123eec437ac910@news.povray.org>
"Klewlis" <nomail@nomail> wrote:

> Just before this code, I do: #declare b=0, so each time POV parses the file, b
> is initialized to 0.  During the first 35 frames b=1 because of this.

Yes, I had a little voice telling me I ought to suggest looking at that part,
but it got overridden.   :(

> This actually makes me wonder why this works:
>     #declare a=2;
>
>     #for (i, 1.5, 241.5, 16)
>         #declare a=a+1;
>         #if (frame_number>a)
>             object {Stud
>                 rotate z*90
>                 #if (i<240)
>                     translate <i, 0, 140.375>
>                 #else
>                     translate <i-1.5, 0, 140.375>
>                 #end
>             }
>         #end
>     #end
>


Frame number increases with each frame, and so even if 'a' stays static, frame
number remains greater than a.

(Remember that it's always good practice to use capitalized varible names to
avoid conflicts with 'internal' POV-Ray names.)


Post a reply to this message

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