POV-Ray : Newsgroups : povray.advanced-users : Find exact position of a rotated camera : Re: Find exact position of a rotated camera Server Time
28 Sep 2024 06:13:56 EDT (-0400)
  Re: Find exact position of a rotated camera  
From: Roman Reiner
Date: 5 Jan 2011 08:00:00
Message: <web.4d246a3c780a807ec9c2a02e0@news.povray.org>
vrotate() should do the trick:

vrotate(A,B)
Rotate A about origin by B. Given the x,y,z coordinates of a point in space
designated by the vector A, rotate that point about the origin by an amount
specified by the vector B. Rotate it about the x-axis by an angle specified in
degrees by the float value B.x. Similarly B.y and B.z specify the amount to
rotate in degrees about the y-axis and z-axis. The result is a vector containing
the new x,y,z coordinates of the point.

In your example, the new location can be found by calling vrotate(<0,0,-15000>,
<60,0,0>).

Regards Roman


"CVADRAT" <lud### [at] cvadratcom> wrote:
> Hi all!
>
> I need to find the exact position of a translated and rotated camera. Imagine a
> sphere and a camera that points to it (with look_at to <0,0,0>, the center of
> the sphere) with camera location at <0,0,-15000> and that then has been rotated
> by +60 degrees in the x axis. What I need to find is the location vector of the
> camera.
> In fact I need the location vector of the camera to make a trace() on the

>
> Any ideas will be welcome.
>
> Please try to send me an email.
>
> Thanks in advance!
> CVADRAT


Post a reply to this message

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