POV-Ray : Newsgroups : povray.animations : Using variable camera angle based on a spline in animation Server Time
2 May 2024 14:34:17 EDT (-0400)
  Using variable camera angle based on a spline in animation (Message 1 to 5 of 5)  
From: RusHHouR
Subject: Using variable camera angle based on a spline in animation
Date: 18 Oct 2007 03:25:00
Message: <web.4717092ad763296647d3ae5e0@news.povray.org>
Hi!

Tried using this setting for camera angle, that varies a bit in the
animation:


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

camera {
  location  kamera(clock)
  look_at   looks(clock)
  right     x*640/360
  angle vinkel(clock)
}

But POV-Ray warns about a "float expected but color or vector expression
found". Any ideas on how I could get the camera to accept these values
would be greatly appreciated!

//Rush


Post a reply to this message

From: Charles C
Subject: Re: Using variable camera angle based on a spline in animation
Date: 18 Oct 2007 03:58:04
Message: <4717120c@news.povray.org>
Try:
angle vinkel(clock).y
Charles


Post a reply to this message

From: RusHHouR
Subject: Re: Using variable camera angle based on a spline in animation
Date: 18 Oct 2007 04:30:02
Message: <web.47171946391d03747d3ae5e0@news.povray.org>
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?)

Anyways, check out bin.anim soon! ;)


Post a reply to this message

From: Charles C
Subject: Re: Using variable camera angle based on a spline in animation
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

From: RusHHouR
Subject: Re: Using variable camera angle based on a spline in animation
Date: 19 Oct 2007 14:20:01
Message: <web.4718f4ef391d03747d3ae5e0@news.povray.org>
Ah, I see!

Well at least I think I see, and Im happy with that. =)
It was the "." that had me confused, or rather it's function. But if it
works, it works. And it did.

Link to animation posted at:
http://news.povray.org/povray.binaries.animations/thread/%3Cweb.4718f31675c5d9a447d3ae5e0%40news.povray.org%3E/

;)

Thanks again!


Post a reply to this message

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