POV-Ray : Newsgroups : povray.general : Moving a camera in a circle Server Time
4 Nov 2024 23:21:12 EST (-0500)
  Moving a camera in a circle (Message 1 to 7 of 7)  
From: Mike Varley
Subject: Moving a camera in a circle
Date: 13 Jan 1999 12:36:36
Message: <369CD9A3.59518EBF@void.nacstock.ac.uk>
Hi Folks

I'm doing some basic animation with povray (3.1) and I want to move the
camera in a circle. Any ideas on the best way to do this using the clock
variable. Can you use trig functions in Povray? I'm sure there's a
better way to do it.

Mike Varley
mik### [at] nacstockacuk


Post a reply to this message

From: Ken
Subject: Re: Moving a camera in a circle
Date: 13 Jan 1999 12:53:26
Message: <369CDD1B.4F18B380@pacbell.net>
Mike Varley wrote:

> Hi Folks
>
> I'm doing some basic animation with povray (3.1) and I want to move the
> camera in a circle. Any ideas on the best way to do this using the clock
> variable. Can you use trig functions in Povray? I'm sure there's a
> better way to do it.
>
> Mike Varley
> mik### [at] nacstockacuk

The simplest method of animating a clock in a circle is by first
positioning it in a place away from the origin and then applying
a rotation command to it.

example:
camera{
 location <0,0,-10>
  look_at 0
   rotate 360*y*clock
}

This will rotate the camera around the y axis keeping the camera pointed at xyz = 0

If you wanted to have your camera to stay located at -z but rotate in
a circle about the z axis still looking at xyz = 0 (point your arm straight
out and inscribe a circle in the air) you could try something like this:

camera{
 location <-10,0,0>
  look_at 0
   rotate 360*z*clock
translate z*-10
}

Might look a little dizzying but it show the possibilities.

These are the simple methods to achieve what you asked. But since
you are also interested in possible trig functions I will bow out at this
point and let some of the math heads that frequent this group have
their say.

My approach may be simple but it does work.
Theirs will be complicated but will achieve the same results.

Its' your choice.

--
Ken Tyler

tyl### [at] pacbellnet


Post a reply to this message

From: Nieminen Mika
Subject: Re: Moving a camera in a circle
Date: 13 Jan 1999 14:25:51
Message: <369cf33f.0@news.povray.org>
Mike Varley <mik### [at] voidnacstockacuk> wrote:
: I'm doing some basic animation with povray (3.1) and I want to move the
: camera in a circle. Any ideas on the best way to do this using the clock
: variable. Can you use trig functions in Povray? I'm sure there's a
: better way to do it.

  The answer is (surprise!) in the povray VFAQ:

http://www.cs.tut.fi/~warp/povVFAQ.html#camerarotation

  (I still wonder why nobody uses the VFAQ but answer the same questions
again and again instead. Perhaps I'll just delete it...)

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

From: David Etter Perere
Subject: Re: Moving a camera in a circle
Date: 13 Jan 1999 18:11:03
Message: <01be3f49$fb0abce0$de0e8dc3@default>
The 12.11.97 on  comp.graphics.rendering.raytracing,Bird Cameron did answer
that to a question on "Circular camera path"


<01bd0610$25f68c00$5b033bcb@2>...
> If you assume that the position that you want to orbit is <x,y,z> and the
> radius at which you wish to orbit is r and you use the z-axis as up, The
> following camera statement will do the trick.
> 
> camera{ position <x+(cos(clock*pi*2)*r),y+(sin(clock*pi*2)*r),0>
> 	 right <1,0,0>
>              up <0,0,1>
>              look_at <x,y,z>
> }
> 
> Hope that helps.
> 
> Gordon
> <gbe### [at] birdcameroncomau>
> 

Hoping that too,

David Etter Perere
per### [at] bofinfomaniakch
Remove the "bof." to answer


<369CD9A3.59518EBF@void.nacstock.ac.uk>...
> Hi Folks
> ...
> Can you use trig functions in Povray? I'm sure there's a
> better way to do it.
> 
> Mike Varley
> mik### [at] nacstockacuk
> 
>


Post a reply to this message

From: Nathan Kopp
Subject: Re: Moving a camera in a circle
Date: 15 Jan 1999 00:43:39
Message: <369ED527.B16EC2C9@Kopp.com>
Nieminen Mika wrote:
> 
>   (I still wonder why nobody uses the VFAQ but answer the same questions
> again and again instead. Perhaps I'll just delete it...)

I think it's because not all of us (myself, for example) know exactly what
is and is not on the VFAQ.  I, however, am now going to go look at the VFAQ
and see what is there, so I can save some time answering these questions. :)

-Nathan


Post a reply to this message

From: Mike Varley
Subject: Re: Moving a camera in a circle
Date: 21 Jan 1999 07:21:47
Message: <36A71BD8.30CA770@void.nacstock.ac.uk>
Nathan Kopp wrote:

> Nieminen Mika wrote:
> >
> >   (I still wonder why nobody uses the VFAQ but answer the same questions
> > again and again instead. Perhaps I'll just delete it...)
>
> I think it's because not all of us (myself, for example) know exactly what
> is and is not on the VFAQ.  I, however, am now going to go look at the VFAQ
> and see what is there, so I can save some time answering these questions. :)
>
> -Nathan

Ahh! Yes! I didn't know there were any VFAQ. Sorry. :-(   I'll give them a
thorough going
over when I've got a mo'

Cheers

Mike Varley


Post a reply to this message

From: Stephen Lavedas
Subject: Re: Moving a camera in a circle
Date: 21 Jan 1999 12:10:09
Message: <36A75F81.BA390650@virginia.edu>
Up until a week ago, I didn't know the VFaq existed.  I think we should
make sure Twyst adds a link from the povray.org page.  Also it probably
wouldn't hurt if every so often, someone posted a general.  "Have a
question about POVRay?  Have you checked the VFaq at ..."  That way
newcomers might end up going there first.  Just a few thoughts.

Steve


Nieminen Mika wrote:
> 
> Mike Varley <mik### [at] voidnacstockacuk> wrote:
> : I'm doing some basic animation with povray (3.1) and I want to move the
> : camera in a circle. Any ideas on the best way to do this using the clock
> : variable. Can you use trig functions in Povray? I'm sure there's a
> : better way to do it.
> 
>   The answer is (surprise!) in the povray VFAQ:
> 
> http://www.cs.tut.fi/~warp/povVFAQ.html#camerarotation
> 
>   (I still wonder why nobody uses the VFAQ but answer the same questions
> again and again instead. Perhaps I'll just delete it...)
> 
> --
> main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
> *_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

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