POV-Ray : Newsgroups : povray.animations : Moving the camera in a circle Server Time
23 Nov 2024 22:09:41 EST (-0500)
  Moving the camera in a circle (Message 1 to 9 of 9)  
From: Manawydan
Subject: Moving the camera in a circle
Date: 21 Jun 2004 11:52:02
Message: <web.40d4fb386c3e36cdbade90180@news.povray.org>
Hi,

I'm just getting to grips with animation (just small steps so I get used to
the basics first) but one thing I'm having trouble with is the mathematics
side of it.

All I want to do is move a camera in a circle, starting at 0, 0, -13, to
-12, 0, 0, to 0, 0, 13, to 12, 0, 0 then back to the beginning over a
period of 36 frames, constantly looking at 0, 0, 0.  However, I just can't
work out how that would be done.

I've searched for an answer on here but, to be honest, I'm a bit confused at
the formulas that I've seen.  Can anyone give me an idea what it should
look like and can explain it to an idiot?

Thanks in advance!


Post a reply to this message

From: Warp
Subject: Re: Moving the camera in a circle
Date: 21 Jun 2004 13:56:23
Message: <40d72147@news.povray.org>
Manawydan <pov### [at] webeyefreeservecouk> wrote:
> All I want to do is move a camera in a circle, starting at 0, 0, -13, to
> -12, 0, 0, to 0, 0, 13, to 12, 0, 0 then back to the beginning

  That isn't a circle, is it? ;)

  I won't try to explain the theoretical background behind the sin() and
cos() functions, but I'm sure you'll figure out how they work with this
example:

// This assumes 'clock' gets values between 0 and 1 (as is the default):
#declare Angle = clock*2*pi;
#declare CameraLocation = <-12*sin(Angle), 0, -13*cos(Angle)>;

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Mike Williams
Subject: Re: Moving the camera in a circle
Date: 21 Jun 2004 21:01:07
Message: <DB6c+AAD$31AFwDn@econym.demon.co.uk>
Wasn't it Manawydan who wrote:
>Hi,
>
>I'm just getting to grips with animation (just small steps so I get used to
>the basics first) but one thing I'm having trouble with is the mathematics
>side of it.
>
>All I want to do is move a camera in a circle, starting at 0, 0, -13, to
>-12, 0, 0, to 0, 0, 13, to 12, 0, 0 then back to the beginning over a
>period of 36 frames, constantly looking at 0, 0, 0.  However, I just can't
>work out how that would be done.
>
>I've searched for an answer on here but, to be honest, I'm a bit confused at
>the formulas that I've seen.  Can anyone give me an idea what it should
>look like and can explain it to an idiot?
>
>Thanks in advance!
>

There's a section in the documentation called "How do I move the camera
in a circular path?. Section 2.4.1.3 in Pov 3.6. Section 9.1.1.3 in POv
3.5.

In particular, if you look at "the mathematical way" it goes on to
explain how to adapt this method to move the camera in an elliptical
path, which seems to be what you are actually trying to do.


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Rune
Subject: Re: Moving the camera in a circle
Date: 22 Jun 2004 10:37:34
Message: <40d8442e@news.povray.org>
Warp wrote:
> Manawydan wrote:
>> All I want to do is move a camera in a circle,
>> starting at 0, 0, -13, to -12, 0, 0,
>> to 0, 0, 13, to 12, 0, 0 then back to the beginning

> // This assumes 'clock' gets values between 0 and 1
> (as is the default): #declare Angle = clock*2*pi;
> #declare CameraLocation = <-12*sin(Angle), 0, -13*cos(Angle)>;

An alternative method:

#declare CameraLocation = vrotate(-z,360*y*clock)*<12,0,13>;

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Apr 27**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Manawydan
Subject: Re: Moving the camera in a circle
Date: 24 Jun 2004 20:02:11
Message: <cjVy4lG8r22AFwL6@dont.spam.me>
Hi Mike Williams, you wrote:

>There's a section in the documentation called "How do I move the camera
>in a circular path?. Section 2.4.1.3 in Pov 3.6. Section 9.1.1.3 in POv
>3.5.

Sorry, I should have said that I saw in the FAQ how to complete this, I 
just couldn't understand the mathematical side of it.    What I want to 
do is understand the basics of the movement so I could modify it.  I'll 
admit that this sort of mathematics was what I hated at school so I 
didn't pay much attention (all those years ago, if I'd only have known 
how useful it would be now!)

>In particular, if you look at "the mathematical way" it goes on to
>explain how to adapt this method to move the camera in an elliptical
>path, which seems to be what you are actually trying to do.

Aye, it's slightly elliptical.

Thanks for the info!
-- 
Manawydan


Post a reply to this message

From: Manawydan
Subject: Re: Moving the camera in a circle
Date: 24 Jun 2004 20:02:12
Message: <dTGyE5Gzt22AFwIG@dont.spam.me>
Hi Warp, you wrote:

>Manawydan <pov### [at] webeyefreeservecouk> wrote:
>> All I want to do is move a camera in a circle, starting at 0, 0, -13, to
>> -12, 0, 0, to 0, 0, 13, to 12, 0, 0 then back to the beginning
>
>  That isn't a circle, is it? ;)

Aye, it's just slightly out. :)

>  I won't try to explain the theoretical background behind the sin() and
>cos() functions, but I'm sure you'll figure out how they work with this
>example:
>
>// This assumes 'clock' gets values between 0 and 1 (as is the default):
>#declare Angle = clock*2*pi;
>#declare CameraLocation = <-12*sin(Angle), 0, -13*cos(Angle)>;

Thanks for the code!
-- 
Manawydan


Post a reply to this message

From: Manawydan
Subject: Re: Moving the camera in a circle
Date: 24 Jun 2004 20:12:13
Message: <LTs3krHbv22AFwL1@dont.spam.me>
Hi Rune, you wrote:

>An alternative method:
>
>#declare CameraLocation = vrotate(-z,360*y*clock)*<12,0,13>;

Thanks for pointing out this method as well!
-- 
Manawydan


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Moving the camera in a circle
Date: 26 Jun 2004 17:29:49
Message: <40ddeacd@news.povray.org>

news:cjV### [at] dontspamme...
> Hi Mike Williams, you wrote:
>
> >There's a section in the documentation called "How do I move the camera
> >in a circular path?. Section 2.4.1.3 in Pov 3.6. Section 9.1.1.3 in POv
> >3.5.
>
> Sorry, I should have said that I saw in the FAQ how to complete this, I
> just couldn't understand the mathematical side of it.    What I want to
> do is understand the basics of the movement so I could modify it.  I'll
> admit that this sort of mathematics was what I hated at school so I
> didn't pay much attention (all those years ago, if I'd only have known
> how useful it would be now!)
>

From the isosurface tutorial:

You know you have been raytracing too long when ...
... You find yourself wishing you'd paid attention in math class to all those
formulae you thought you'd never have any use for in real life.
-- Jeff Lee


Post a reply to this message

From: Manawydan
Subject: Re: Moving the camera in a circle
Date: 27 Jun 2004 15:56:08
Message: <YGQjhIBuUy3AFwh0@dont.spam.me>
Hi Nicolas Alvarez, you wrote:


>news:cjV### [at] dontspamme...

>>I'll
>> admit that this sort of mathematics was what I hated at school so I
>> didn't pay much attention (all those years ago, if I'd only have known
>> how useful it would be now!)
>
>From the isosurface tutorial:
>
>You know you have been raytracing too long when ...
>... You find yourself wishing you'd paid attention in math class to all those
>formulae you thought you'd never have any use for in real life.
>-- Jeff Lee

Ah, so it's not just me then! *grin*
-- 
Manawydan


Post a reply to this message

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