POV-Ray : Newsgroups : povray.animations : Simple: Camera Position Server Time
18 Apr 2024 19:25:08 EDT (-0400)
  Simple: Camera Position (Message 1 to 4 of 4)  
From: Chrisir
Subject: Simple: Camera Position
Date: 27 Feb 2011 08:45:00
Message: <web.4d6a542c8f7061ba22dbc4580@news.povray.org>
Hello,

I want to figure out a good Camera Position in an animation movie.

The Camera should be moving.

I have one point A in the Middle of the scene (A is fix).

I have one point B, a Ball or Marble going around A (like earth B around the sun
A) in different heights (not like earth around the sun) and different
circumferences.

Question: I want to get the moving Camera Position C; I want it to be outside
B's circle, always looking at B AND at A.

Since B is moving, C should also be moving.

What would be the formula to get

CX=
CY=
CZ=

based on AX,AY,AZ and BX,BY,BZ?

So there's a straight line from A to B to C.

Thanks a lot!

Chrisir


P.S.
It would be cool when there would be a kinf of Damping.
So when the Marble B is doing a abrupt or fast short change, camera kind of
stays calm.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Simple: Camera Position
Date: 27 Feb 2011 14:01:42
Message: <4d6a9f96$1@news.povray.org>
Chrisir wrote:

> What would be the formula to get
> 
> CX=
> CY=
> CZ=
> 
> based on AX,AY,AZ and BX,BY,BZ?
> 
> So there's a straight line from A to B to C.

That's probably not what you actually want, otherwise
the balls would stay unmoving in the image? But if you
have points A and B, then V=B-A will be a vector from
A to B and, e.g. C = A + 2*V will be point such as
you describe (you didn't specify distance).


Post a reply to this message

From: Le Forgeron
Subject: Re: Simple: Camera Position
Date: 27 Feb 2011 14:17:00
Message: <4d6aa32c@news.povray.org>
Le 27/02/2011 14:39, Chrisir nous fit lire :
> So there's a straight line from A to B to C.
> 

Seconded mail from Christian Froeschlin.

Nevertheless:

let's k be the ratio BC/AB.

the relation is (C-B) = k(B-A).
which can be rewritten
C = k(B-A)+B
...
C = (k+1)*B -k*A.

Apply to all coordinates (x,y,z).


> P.S.
> It would be cool when there would be a kinf of Damping.
> So when the Marble B is doing a abrupt or fast short change, camera kind of
> stays calm.
> 
That might be some call for a spline.
For instance, you might want to adjust the previous k dynamically based
on the speed of B.
Assumes the positions of B are in the spline, compute the "speed" by
evaluating the spline at t & t+delta, divide that vector-distance by
delta...

Or you could instead average the spline from t-delta to t+delta (with
enough steps) to have the camera more stable.
For better realism, the camera should not know about the futur, so only
averaging from t-delta to t. (or even t-late)


Post a reply to this message

From: Chrisir
Subject: Re: Simple: Camera Position
Date: 27 Feb 2011 15:35:01
Message: <web.4d6ab4b2ea61e47622dbc4580@news.povray.org>
Thanks a lot!


Post a reply to this message

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