POV-Ray : Newsgroups : povray.animations : Camera moving with different splines Server Time: 2 Sep 2014 13:56:23 GMT
  Camera moving with different splines (Message 1 to 4 of 4)  
From: bone bone
Subject: Camera moving with different splines
Date: 2 Jul 2011 08:20:00
Message: <web.4e0ed42f291ab155950d31950@news.povray.org>
i try to make a moving camera that moves as a declared spline and then stops for
a while to go on with an onter spline. if i do more coordinates at the same
point in one spline the camera moves a bit around that point but does not stand
still. so i try to do with "while":

#while (clock > 6 )
    #while (clock < 9 )
        box { <-.1,0,-.1>, <.1, .01, .1>translate <-.7,0,-.7>}
    #end
    #else box { <-.1,0,-.1>, <.1, .01, .1>translate Spline_1(clock)}
#end

but that one does not work. i also used just one while with:

#while (clock > 6 && <9)

but that did not work either.

does somebody know how to make it run?


Post a reply to this message

From: Roman Reiner
Subject: Re: Camera moving with different splines
Date: 2 Jul 2011 10:20:01
Message: <web.4e0eef9de9570ddefc603fe0@news.povray.org>
"bone_bone" <bone_bone [at] webde> wrote:
> so i try to do with "while":

You're misusing #while. A while-loop repeatedly executes the code inside it
while (hence the name) the condition is true. What you are looking for is
#if/#else e.g.

#if(clock<6)
  // <6
#else
  #if (clock>9)
    // >9
  #else
    // >6 and <9
  #end
#end


Post a reply to this message

From: bone bone
Subject: Re: Camera moving with different splines
Date: 2 Jul 2011 10:40:02
Message: <web.4e0ef45fe9570dd950d31950@news.povray.org>
i found another way. now i use cases and that works fine for me! :)


#ifndef (cam)
    #if ( clock <= 6 )
        #declare cam =1;
    #else
        #if ( clock > 9 )
            #declare cam = 3;
        #else
            #declare cam = 2;
        #end
    #end

#end


#switch (cam)
        #case(1)
            XXX
        #break

        #case(2)
            XXX
        #break

        #case(3)
            XXX
        #break
#end


Post a reply to this message

From: bone bone
Subject: Re: Camera moving with different splines
Date: 2 Jul 2011 10:40:02
Message: <web.4e0ef4e3e9570dd950d31950@news.povray.org>
"Roman Reiner" <limdaepl [at] gmxde> wrote:
> "bone_bone" <bone_bone [at] webde> wrote:
> > so i try to do with "while":
>
> You're misusing #while. A while-loop repeatedly executes the code inside it
> while (hence the name) the condition is true. What you are looking for is
> #if/#else e.g.
>
> #if(clock<6)
>   // <6
> #else
>   #if (clock>9)
>     // >9
>   #else
>     // >6 and <9
>   #end
> #end


thank you! i haven't seen you message but thats what i have done now, too! ;)


Post a reply to this message

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