POV-Ray : Newsgroups : povray.general : Positioning a camera : Re: Positioning a camera Server Time
1 Aug 2024 20:07:51 EDT (-0400)
  Re: Positioning a camera  
From: Cesar
Date: 17 Apr 2005 07:45:01
Message: <web.42624bdf1c98b29b6ef2a7230@news.povray.org>
> In POVRay you could use VAngleD(V1,V2)with the up and right vectors that
> your C++ program calculated to compute the angle between the vectors and use
> #debug to output the result to the message window (converted to a string
> with vstr()). If it is just a rounding problem you might want to use
> VPerp_Adjust(V1, Axis) to adjust one of the vectors so they're
> perpendicular. If it's not a rounding problem, fix the bug in your app. :-)
>
> Chris B.

I honestly don't think it's a bug in my app. The vectors are, for example:

direction <0,  1, 0>
up <0.198669, 0, 0.980067>
right <1.30349, 0, -0.26423>

and povray complains about perpendicularity.

direction is obvliously perpendicular to the other two, so the question is
if up and right are perpendicular. I calculated the dot product betweem
them and the result is

1.034100000000106e-07

So that tells me they are perpendicular. But the error is so small! povray
has a problem with it? I guess I could use doubles instead of floats in my
app... could that work?

While I try to figure this out, I guess I'll use those functions you
suggested as they will probably make it work. Thanks.


Post a reply to this message

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