POV-Ray : Newsgroups : povray.newusers : rotating the camera : Re: rotating the camera Server Time
29 Jul 2024 04:24:56 EDT (-0400)
  Re: rotating the camera  
From: Warp
Date: 2 Aug 2006 04:44:11
Message: <44d065db@news.povray.org>
shimon_a10 <shi### [at] wallacoil> wrote:
> 1. I want to know how to rotate the camera around the vector (which is the
>    origin to the placement point of the camera).

  I didn't completely understand what is it exactly that you want to
rotate the camera around, but here's a generic answer:

  If you want to rotate the camera around the origin (ie. the <0, 0, 0>
coordinate of space) then just add a 'rotate <something, something, something>'
to the end of your camera definition.

  If you want to rotate the camera around a given point, add these statements
at the end of your camera definition:

translate -ThePoint
rotate <whatever, whatever, whatever>
translate ThePoint

  Note that rotating the camera is the same as rotating an object. The
look_at coordinate will be rotated too, not just the location of the camera.

  If the point around which you want to rotate the camera is not the same
as the look_at coordinate and what you want is to only rotate the location
of the camera around a certain point while keeping look_at fixed, you need
to resort to some vector math. If you want to rotate the location of the
camera around the origin you can do it like this:

location vrotate(CameraOriginalLocation, <whatever, whatever, whatever>)

  If you want to rotate it around a certain point, it can be done like this:

location vrotate(CameraOriginalLocation-ThePoint,
                 <whatever, whatever, whatever>) + ThePoint

-- 
                                                          - Warp


Post a reply to this message

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