POV-Ray : Newsgroups : povray.binaries.images : "Position Finder" results : Re: "Position Finder" results Server Time
2 May 2024 08:48:16 EDT (-0400)
  Re: "Position Finder" results  
From: Kenneth
Date: 2 Oct 2018 03:45:01
Message: <web.5bb320fd813dde7aa47873e10@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

>
> I must admit that I have major difficulties with vnormalize and vcross.
> Somehow I achieve to understand vaxis_rotate more intuitively :-/ but
> the whole code is bursting my brains.
>
[snip]
> ...but I am confident that Kenneth can.

Uh, don't be so sure  :-P

I'm in the same boat as you-- it's vcross and vaxis_rotate that give me the
chills. *Someday*, with enough concentrated thinking, I'll have one of those
'Eureka' moments. Surely!! (?)

But I just discovered something in Norbert's core math code that is of interest
(in a small way): Until now, I've been thinking that the arrow-offset problem is
*somehow* related to his initial cam_z equation-- specifically the
tan(radians(cam_ang*0.5)  part-- because of the use of  tan  itself. (As an
angle approaches 90, tan(90) approaches infinity, which seems problematic. But
then again, his tan equation is working on only HALF the given angle-- so
tan(90) would never happen anyway.) BTW, it's not clear to me why he specified
radians rather than degrees, as a camera angle is specified in degrees(?), or
something similar.

HOWEVER... I've been experimenting with the cam_z equation itself-- and found
that no matter what I do to it, it has no effect on the arrow position, or on
anything else in the scene(!). I even commented-out the equation, and
substituted some wildly-different integer values just for kicks... again with no
effect. I EVENTUALLY realized that cam_z is actually used only once, in cam_dir.
And cam_dir isn't used at all!

I have no excuse for not seeing this until now. :-(

So, cam_z and cam_dir can be erased from the code, to make it a bit simpler to
examine.


Post a reply to this message

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