POV-Ray : Newsgroups : povray.animations : Shed version 2 : Re: Shed version 2 Server Time
23 Apr 2024 09:03:23 EDT (-0400)
  Re: Shed version 2  
From: Klewlis
Date: 14 Feb 2017 18:40:01
Message: <web.58a391e3e97123ee5f9209890@news.povray.org>
"omniverse" <omn### [at] charternet> wrote:
> clipka <ano### [at] anonymousorg> wrote:
>
> Not sure what you're wanting to do, so this is only a guess:
>
> #if(frame_number>5&frame_number<11)
>     rotate x*(frame_number*10)
> #end
>
> That confines the rotation to those number of frames.
>
If I remember my programming days the & is a Boolean operator.  I searched every
keyword I could think of and found no hint you could construct a test with both
a lower and upper limit.  I ended up with

#if (frame_number>5)
    #if (frame_number<11)
        rotate x*(frame_number*10)
    #end
#end

I don't know if nesting #if tests eventually causes a problem, but it worked.  I
much prefer to use the & to concatenate the two tests.

Where can this information be found in the help file?  I am interested in other
Boolean operators as well.

The coding shown was just an experiment to see if I could work in a lower and
upper limit.  The actual circumstance is to add temporary bracing to the top of
the walls and then stop rendering it once the ceiling joists and rafters are
added.

Thank you
Ken


Post a reply to this message

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