POV-Ray : Newsgroups : povray.general : Rotate on local axis? Server Time
9 Aug 2024 15:25:27 EDT (-0400)
  Rotate on local axis? (Message 1 to 8 of 8)  
From: Jason Miller
Subject: Rotate on local axis?
Date: 18 Jul 2000 01:17:46
Message: <3973e87a@news.povray.org>
Is it possible to rotate the camera around the vector formed by its position
to the point it is looking at?  I ask because a scene I am doing turned out
to be 90 degrees off.

Jason


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 02:43:08
Message: <3973fc7c@news.povray.org>
In article <3973e87a@news.povray.org> , "Jason Miller" 
<jas### [at] pinheirotcimetnet> wrote:

> Is it possible to rotate the camera around the vector formed by its position
> to the point it is looking at?  I ask because a scene I am doing turned out
> to be 90 degrees off.

Read the documentation section "Scene Description Language : Camera :
Placing the Camera".  What you want to learn more about are the "up" and
"right" attributes.


      Thorsten


Post a reply to this message

From: ryan constantine
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 05:00:04
Message: <39741C4F.3B3F90E5@yahoo.com>
also, you could look at moray-generated-pov-code.  moray uses local
coords for just about every object.  pov doesn't directly support local
object coordinates, so moray does a trick.  let's take a unit cube (1
unit from center in all axes) for example.  say you want the local
coords to be  .5 along the x direction.  first, move the model -0.5 in
the x direction.  your local coord point now rests on the origin.  after
this translation so your scale, rotation, and final translation, in that
order.  if you move the local origin in all three axes, simply add them
to your initial translation.  rinse.  repeat as needed.

Thorsten Froehlich wrote:
> 
> In article <3973e87a@news.povray.org> , "Jason Miller"
> <jas### [at] pinheirotcimetnet> wrote:
> 
> > Is it possible to rotate the camera around the vector formed by its position
> > to the point it is looking at?  I ask because a scene I am doing turned out
> > to be 90 degrees off.
> 
> Read the documentation section "Scene Description Language : Camera :
> Placing the Camera".  What you want to learn more about are the "up" and
> "right" attributes.
> 
>       Thorsten


Post a reply to this message

From: Peter Popov
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 05:47:13
Message: <on98nsg6jc005vf5re9tfe9f3r478bjkcr@4ax.com>
On Tue, 18 Jul 2000 08:43:42 +0200, "Thorsten Froehlich"
<tho### [at] trfde> wrote:

>> Is it possible to rotate the camera around the vector formed by its position
>> to the point it is looking at?  I ask because a scene I am doing turned out
>> to be 90 degrees off.
>
>Read the documentation section "Scene Description Language : Camera :
>Placing the Camera".  What you want to learn more about are the "up" and
>"right" attributes.

If Jason hadn't explained what his problem was, I would have voted for
the 'sky' vector in the camera definition instead :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Jason Miller
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 08:40:39
Message: <39745047$1@news.povray.org>
Thorsten,
    I looked that up and played with it.  After having played with it for a
while, it seems that povray only uses the length of these vectors in order
to scale the field of view.  It on the other hand, does not seem to care in
which direction they are facing.

For instance, even when the vectors are on regular axeses like:
camera {
      location <87.45355,-5.39098,49.71675>
      up y
      right x
      look_at <51.52028,-5.39098,13.78348>
}

it looks exactly the same as:

camera {
      location <87.45355,-5.39098,49.71675>
      up x
      right y
      look_at <51.52028,-5.39098,13.78348>
}

Is this because look_at only cares about the lengths of up and right?

Jason


"Thorsten Froehlich" <tho### [at] trfde> wrote in message
news:3973fc7c@news.povray.org...
> In article <3973e87a@news.povray.org> , "Jason Miller"
> <jas### [at] pinheirotcimetnet> wrote:
>
> > Is it possible to rotate the camera around the vector formed by its
position
> > to the point it is looking at?  I ask because a scene I am doing turned
out
> > to be 90 degrees off.
>
> Read the documentation section "Scene Description Language : Camera :
> Placing the Camera".  What you want to learn more about are the "up" and
> "right" attributes.
>
>
>       Thorsten


Post a reply to this message

From: Bob Hughes
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 09:38:54
Message: <39745dee@news.povray.org>
"Jason Miller" <jas### [at] pinheirotcimetnet> wrote in message
news:39745047$1@news.povray.org...
| does not seem to care in which direction they are facing.

I think the 'up' and 'right' see any one number (x,y, or z also mean 1) or vector as a
left-right, up-down only and so are simply image width-height dimension oriented.  The
'direction' keyword gives the camera a view-plane and zoom amount and 'sky' orients to
any
vector for the camera sky-ground (local up-down actually).
This section of the Online POV-Ray Tutorial can probably help:
http://library.thinkquest.org/3285/language/camera.html

Bob


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Rotate on local axis?
Date: 18 Jul 2000 11:16:11
Message: <397474bb$1@news.povray.org>
In article <39745047$1@news.povray.org> , "Jason Miller" 
<jas### [at] pinheirotcimetnet> wrote:

>     I looked that up and played with it.  After having played with it for a
> while, it seems that povray only uses the length of these vectors in order
> to scale the field of view.  It on the other hand, does not seem to care in
> which direction they are facing.

Aha, now I understand what you want to do.  As Bob pointed out, then the
"sky" vector should help.


     Thorsten


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Rotate on local axis?
Date: 19 Jul 2000 10:28:18
Message: <3975B9D7.BE0D0BE1@my-dejanews.com>
If you meant rotate around a fixed position not at the origin:

camera{
    location<0,0,0>
    look_at <10,0,0>
    rotate Whatever
    translate Wherever
    }

If you meant rotate while staying pointed at an object not at the origin:

camera{
    location<10,0,0>
    look_at <0,0,0>
    rotate Whatever
    translate Objectposition
   }


Simple enough?

Jason Miller wrote:

> Is it possible to rotate the camera around the vector formed by its position
> to the point it is looking at?  I ask because a scene I am doing turned out
> to be 90 degrees off.
>
> Jason


Post a reply to this message

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