POV-Ray : Newsgroups : povray.advanced-users : Vector to Angle : Re: Vector to Angle Server Time
10 May 2024 22:24:43 EDT (-0400)
  Re: Vector to Angle  
From: Bald Eagle
Date: 31 May 2017 07:55:01
Message: <web.592eae6e3905ed8fc437ac910@news.povray.org>
dick balaska <dic### [at] buckosoftcom> wrote:
> Am 2017-05-29 15:42, also sprach dick balaska:
> > I'm trying to master converting a vector to an angle in 3D with no luck
>
> Help, Math wizards, you're my only hope.
>
> Ok. I'm stuck. I'm missing something.
>
> My goal is to position an object in a fixed position on the screen, like
> carrying a flashlight. Or a gun, like in a video game.
>
> So I need to calculate the angle of Lookat-Camera and act on that.

I was looking through the docs, and there really is SO MUCH in the include files
and macros and functions, that I can hardly keep track of where I started once I
reach the end.

I'd say start by looking over the vector functions like VAngleD(),
VProject_Axis(), VProject_Plane()etc and see if you can maybe blindly plug in
vectors and get it to work.  There might be some scenes in the distribution that
have some good code snippets.
There might also be some good code snippets from things like sunpos.inc and
scenes like my watch animation that handle data like you're talking about.

> argh. I keep trying to work it out on paper, but I'm not feeling it.

I have been there SO many times.

I will try to draw it out on paper and see what I can tell you - unless someone
else jumps on this before then.


Post a reply to this message

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