POV-Ray : Newsgroups : povray.animations : Shed version 2 Server Time: 20 Nov 2019 09:52:21 GMT
  Shed version 2 (Message 24 to 33 of 33)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Stephen
Subject: Re: Shed version 2
Date: 14 Feb 2017 13:35:19
Message: <58a30797$1@news.povray.org>
On 2/14/2017 12:23 PM, Thomas de Groot wrote:
> On 14-2-2017 8:51, Stephen wrote:

>> Well you can keep Geert Wilders. We have enough trouble makers of our
>> own. ;-)
>>
>> BTW Good luck on the ides of March. I just noticed the date of your
>> Elections.
>> You never know, You and the French may join us in "The Common Market"
>> Ver 2.0 :-)
>>
>>
>
> I don't know what is going to happen. It is time for a strategic vote
> but even then, Mr. W. will probably win... but not to form any
> government as no coalition will be possible with his 'party'. (His, is
> not a party s.s. by the way, as he is the only and unique member of the
> PVV. Interesting isn't it?)
>
> Otherwise, following better economical perspectives, Europe is no longer
> really an issue for these elections. The negative consequences for a
> Nexit are too strong and few are really interested. It is now all about
> 'identity' and mosques...
>

That is what they said here. <Gulp!>


-- 

Regards
     Stephen


Post a reply to this message

From: Klewlis
Subject: Re: Shed version 2
Date: 14 Feb 2017 23: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

From: dick balaska
Subject: Re: Shed version 2
Date: 15 Feb 2017 00:08:48
Message: <58a39c10@news.povray.org>
Am 2017-02-14 18:36, also sprach Klewlis:
> Where can this information be found in the help file?  I am interested in other
> Boolean operators as well.

http://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_1_5_3

-- 
dik


Post a reply to this message

From: Thomas de Groot
Subject: Re: Shed version 2
Date: 15 Feb 2017 07:53:26
Message: <58a408f6@news.povray.org>
On 14-2-2017 14:35, Stephen wrote:
> On 2/14/2017 12:23 PM, Thomas de Groot wrote:
>> On 14-2-2017 8:51, Stephen wrote:
>
>>> Well you can keep Geert Wilders. We have enough trouble makers of our
>>> own. ;-)
>>>
>>> BTW Good luck on the ides of March. I just noticed the date of your
>>> Elections.
>>> You never know, You and the French may join us in "The Common Market"
>>> Ver 2.0 :-)
>>>
>>>
>>
>> I don't know what is going to happen. It is time for a strategic vote
>> but even then, Mr. W. will probably win... but not to form any
>> government as no coalition will be possible with his 'party'. (His, is
>> not a party s.s. by the way, as he is the only and unique member of the
>> PVV. Interesting isn't it?)
>>
>> Otherwise, following better economical perspectives, Europe is no longer
>> really an issue for these elections. The negative consequences for a
>> Nexit are too strong and few are really interested. It is now all about
>> 'identity' and mosques...
>>
>
> That is what they said here. <Gulp!>
>
>

Yes, I know... :-[ However, I think that the NL situation is a bit 
different.

[we are definitely going ot here]

-- 
Thomas


Post a reply to this message

From: Klewlis
Subject: Re: Shed version 2
Date: 19 Feb 2017 14:45:01
Message: <web.58a9ae03e97123ee5f9209890@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> So 0 to 0.1 will be Clock1, which goes from Clock*10 = 0 to Clock*10 = 1
> Then the next range block gets rendered from 0.11 to 0.2
> (Clock-0.1)*10 = 0 to (Clock-0.1)*10 = 1
>
> Just an idea - I honestly haven't played with Chris Colefax's ClockMod macros,
> so I can't say if that's any easier / better.

#switch (frame_number)
    #range (1, 35)
        #declare b=b+1;
        object { SunLight
            rotate x*(b/2)
        }
    #break
    #range (36, 60)
        object { SunLight
            rotate x*(b/2)
        }
    #break
    #range (61, 282)
        #declare b=b+1;
        object { SunLight
            rotate x*(b/2)
        }
    #break
#end

Do you see anything wrong with this code?  It doesn't appear to be working. The
idea is that the shadows movement gives the perception of time passing, but no
movement during camera transitions.  I also tried it without the #break at the
end of each range.  POV-Ray isn't issuing any complaints about the code.


Post a reply to this message

From: Klewlis
Subject: Re: Shed version 2
Date: 19 Feb 2017 15:35:01
Message: <web.58a9b9fee97123ee5f9209890@news.povray.org>
"Klewlis" <nomail@nomail> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> >
> > So 0 to 0.1 will be Clock1, which goes from Clock*10 = 0 to Clock*10 = 1
> > Then the next range block gets rendered from 0.11 to 0.2
> > (Clock-0.1)*10 = 0 to (Clock-0.1)*10 = 1
> >
> > Just an idea - I honestly haven't played with Chris Colefax's ClockMod macros,
> > so I can't say if that's any easier / better.
>
> #switch (frame_number)
>     #range (1, 35)
>         #declare b=b+1;
>         object { SunLight
>             rotate x*(b/2)
>         }
>     #break
>     #range (36, 60)
>         object { SunLight
>             rotate x*(b/2)
>         }
>     #break
>     #range (61, 282)
>         #declare b=b+1;
>         object { SunLight
>             rotate x*(b/2)
>         }
>     #break
> #end
>
> Do you see anything wrong with this code?  It doesn't appear to be working. The
> idea is that the shadows movement gives the perception of time passing, but no
> movement during camera transitions.  I also tried it without the #break at the
> end of each range.  POV-Ray isn't issuing any complaints about the code.

OK, I suspect the problem is in the fact that I am running the animation from an
..ini file.  This would be the same problem I had with the #while command.

Ken


Post a reply to this message

From: Bald Eagle
Subject: Re: Shed version 2
Date: 21 Feb 2017 17:55:00
Message: <web.58ac7e88e97123eec437ac910@news.povray.org>
"Klewlis" <nomail@nomail> wrote:

> OK, I suspect the problem is in the fact that I am running the animation from an
> ..ini file.  This would be the same problem I had with the #while command.

I would not have guessed that would be a / the problem

from the docs:
frame_number

If you rather want to define the action in POV-Ray animated scenes depending
upon the integer frame numbers, this identifier can be used. It reads the number
of the frame currently being rendered.

#if(frame_number=1)
  //stuff for first image or frame
#end
#if(frame_number=2)
  //stuff for second image or frame
#end
#if(frame_number=n)
  //stuff for n th image or frame
#end

My Torus animation in pbi animations was done, but using the clock value.

have a look at this and see if it helps:
http://news.povray.org/povray.bugreports/thread/%3C4f64d135$1@news.povray.org%3E/

Also, when I have problems like you're having, I find it useful to make
extensive use of the debug stream and make absolutely sure that the value I
THINK Pov-Ray is using are the actual values that it's working with.

I might even go so far as to work with a "fake" animation scene file that
doesn't do anything - or at least very little, and render it with a very small
image size to speed up debugging.
You might even consider putting your debug values as text objects in the scene -
it helps a lot when odd, unexpected things happen - all the data is right there
in the image frame.

I'm at work right now and don't have a copy of my torus animation file handy  :(

I'll see if I can remember to make a copy tonight.


Post a reply to this message

From: Klewlis
Subject: Re: Shed version 2
Date: 22 Feb 2017 00:10:01
Message: <web.58acd5bfe97123ee5f9209890@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Klewlis" <nomail@nomail> wrote:
>
> > OK, I suspect the problem is in the fact that I am running the animation from an
> > ..ini file.  This would be the same problem I had with the #while command.
>
> I would not have guessed that would be a / the problem
>

Actually, the problem is not in the Switch/Range.  The problem is in the other
coding I used.

#switch (frame_number)
    #range (1, 35)
        #declare b=b+1;
        object { SunLight
            rotate x*(b/2)
        }
    #break
    #range (36, 60)
        object { SunLight
            rotate x*(b/2)
        }
    #break
    #range (61, 282)
        #declare b=b+1;
        object { SunLight
            rotate x*(b/2)
        }
    #break
#end

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.

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

(I am not complaining, I am glad it works.)  It seems that each time the file is
parsed, "i" would be initialized to 1.5, but instead it is incremented by 16.

Thank you;
Ken


Post a reply to this message

From: Bald Eagle
Subject: Re: Shed version 2
Date: 22 Feb 2017 12: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

From: clipka
Subject: Re: Shed version 2
Date: 22 Feb 2017 16:39:14
Message: <58adbeb2$1@news.povray.org>
Am 22.02.2017 um 01:05 schrieb Klewlis:

> 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
> 
> (I am not complaining, I am glad it works.)  It seems that each time the file is
> parsed, "i" would be initialized to 1.5, but instead it is incremented by 16.

As a matter of fact, /both/ happens in each frame; the latter even
multiple times.

So in frame #1 you get:

    frame_number = 1
    a = 2
    i = 1.5
        a = 3
        test if frame_number(=1) > a(=3) -> no
    i = 17.5
        a = 4
        test if frame_number(=1) > a(=4) -> no
    i = 33.5
        a = 5
        test if frame_number(=1) > a(=5) -> no
    i = 49.5
        a = 6
        test if frame_number(=1) > a(=6) -> no
    ...etc...

Then, in frame #2, you get:

    frame_number = 2
    a = 2
    i = 1.5
        a = 3
        test if frame_number(=2) > a(=3) -> no
    i = 17.5
        a = 4
        test if frame_number(=2) > a(=4) -> no
    i = 33.5
        a = 5
        test if frame_number(=2) > a(=5) -> no
    i = 49.5
        a = 6
        test if frame_number(=2) > a(=6) -> no
    ...etc...

Later, in frame #3, you get:

    frame_number = 3
    a = 2
    i = 1.5
        a = 3
        test if frame_number(=3) > a(=3) -> no
    i = 17.5
        a = 4
        test if frame_number(=3) > a(=4) -> no
    i = 33.5
        a = 5
        test if frame_number(=3) > a(=5) -> no
    i = 49.5
        a = 6
        test if frame_number(=3) > a(=6) -> no
    ...etc...

At last, in frame #4, you get:

    frame_number = 4
    a = 2
    i = 1.5
        a = 3
        test if frame_number(=4) > a(=3) -> yes
            insert a Stud at i=1.5
    i = 17.5
        a = 4
        test if frame_number(=4) > a(=4) -> no
    i = 33.5
        a = 5
        test if frame_number(=4) > a(=5) -> no
    i = 49.5
        a = 6
        test if frame_number(=4) > a(=6) -> no
    ...etc...

In frame #5, you get:

    frame_number = 5
    a = 2
    i = 1.5
        a = 3
        test if frame_number(=5) > a(=3) -> yes
            insert a Stud at i=1.5
    i = 17.5
        a = 4
        test if frame_number(=5) > a(=4) -> yes
            insert a Stud at i=17.5
    i = 33.5
        a = 5
        test if frame_number(=5) > a(=5) -> no
    i = 49.5
        a = 6
        test if frame_number(=5) > a(=6) -> no
    ...etc...

... and so forth.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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