POV-Ray : Newsgroups : povray.animations : Using variable camera angle based on a spline in animation : Re: Using variable camera angle based on a spline in animation Server Time
17 May 2024 08:16:08 EDT (-0400)
  Re: Using variable camera angle based on a spline in animation  
From: Charles C
Date: 18 Oct 2007 15:15:55
Message: <4717b0eb@news.povray.org>
RusHHouR wrote:
> Charles C <nos### [at] nospamcom> wrote:
>> Try:
>> angle vinkel(clock).y
>> Charles
> 
> Yay! Rendering just fine! Thanks a lot! :D
> (Umm.. What did we exactly do?)

Wait, did you write this spline or did some spline editor you used write 
this spline? I'm not sure what you know or don't know on splines so 
sorry if I end up over-answering... :-)  Anyway a spline returns a 3D 
vector.  You can specify which specific float value you want out of that 
vector with .x or .y or .z which in this case solves the problem of the 
incorrect type given for 'angle'.

Why .y and not .x or .z?  A spline takes in floats and vectors but 
you're feeding it all floats. The second number on each line of your 
spline would normally be a 3D vector, so I'm assuming that your spline 
the way you have it would effectively expand to:


#declare vinkel = spline {
    natural_spline
     0.00,   <80,80,80>,
     0.10,   <70,70,70>,
     0.30,   <60,60,60>,
     0.60,   <75,75,75>,
     0.75,   <75,75,75>,
     0.85,   <75,75,75>,
     1.00,   <80,80,80>
}

That'd mean that .x .y and .z would all work just as well but maybe it's 
easier (to me) in this case to think of the floats in the left column as 
x-values and the values in the right column as y-values in a 2D graph... 
     Something like that.

 >
 > Anyways, check out bin.anim soon! ;)
 >

Will do!


Charles


Post a reply to this message

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