POV-Ray : Newsgroups : povray.binaries.images : Calculation of camera angle [ illustration ] : Re: Calculation of camera angle [ illustration ] Server Time
25 Apr 2024 16:07:23 EDT (-0400)
  Re: Calculation of camera angle [ illustration ]  
From: Bald Eagle
Date: 1 Oct 2019 15:05:01
Message: <web.5d93a22e873c8c4eec112d0@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> Hi Bill
>
> It might be here:
> https://github.com/POV-Ray/povray/blob/release/v3.8.0/source/parser/parser.cpp#L1784

Ah, in the parser.   3.8 is pretty hard to follow, but this will be a good
start, and at least something to work with.
The idea is to have a scene file where the camera attributes can be modified to
show the effect using the camera diagram, and output some information to the
debug stream, or the screen to show how the camera vectors atrt off, and then
get modified once the "angle" keyword is invoked.

> BTW: I had a vague memory that one of the vector lengths for the default
> perspective camera was changed in v3.8.
>
> So I found this file:
> https://github.com/POV-Ray/povray/blob/release/v3.8.0/changes.txt
> - with this statement:
> "The camera `right` vector length now defaults to the output image aspect ratio
> (presuming square pixels) instead of 1.33."
>
> But line no 222 here:
>
https://github.com/POV-Ray/povray/blob/release/v3.8.0/source/core/scene/camera.cpp#L222
> - says "Right       = Vector3d(1.33, 0.0, 0.0); // TODO FIXME"
>
> Perhaps it has been changed somewhere else.

I found similar things in my own poking around, and there is
aspectRatio = 4.0 / 3.0;

in source/core/render/tracepixel.cpp   line 243

(looking at hgpovray38, and assuming it's similar enough)





Getting rid of the 1.33 approximation aspectRatio = 4.0 / 3.0;has been talked
about for a LONG time, so I was surprised to see it's still in there.


Post a reply to this message

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