POV-Ray : Newsgroups : povray.binaries.images : "Position Finder" results : Re: "Position Finder" results Server Time
2 May 2024 03:30:57 EDT (-0400)
  Re: "Position Finder" results  
From: Thomas de Groot
Date: 2 Oct 2018 07:26:27
Message: <5bb355e3$1@news.povray.org>
On 2-10-2018 9:40, Kenneth wrote:
> 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!! (?)

Yeah... I have not too much problems with vaxis_rotate as I can 
understand and visualise the purpose of that in the macro. However, I 
scratch my head about the others.

> 
> 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.
> 

I have been wondering also about those parameters. I had assumed that 
cam_dir was supposed to be the value for the direction parameter in the 
camera block. Putting cam_dir there does not do anything vital, so maybe 
it is some obsolete leftover from earlier versions? Puzzling, to say the 
least.

I agree with you about the radians. There seems to be no need for them 
but if cam_z is not used, I don't worry :-)

-- 
Thomas


Post a reply to this message

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