POV-Ray : Newsgroups : povray.programming : camera direction vs. angle Server Time
28 Mar 2024 05:26:13 EDT (-0400)
  camera direction vs. angle (Message 1 to 6 of 6)  
From: timer
Subject: camera direction vs. angle
Date: 4 Sep 2013 08:25:01
Message: <web.5227263a4ae9cb80af88e9c60@news.povray.org>
Hi,

I write a code with a camera to simulate a specific camera/objectiv combination.
If I use the angle with the value of the angle of view value of the objectiv the
simulated image looks the same as the real view throuw the objective. But if I
use the direction vector with the focal length ob the objective it absolutely
does not.

Isn't it that the length of the direction vector is the same as the focal length
of the objective?

Greatings,
   Tim


Post a reply to this message

From: Le Forgeron
Subject: Re: camera direction vs. angle
Date: 4 Sep 2013 12:15:22
Message: <52275c9a@news.povray.org>
Le 04/09/2013 14:23, timer nous fit lire :
> 
> Hi,
> 
> I write a code with a camera to simulate a specific camera/objectiv combination.
> If I use the angle with the value of the angle of view value of the objectiv the
> simulated image looks the same as the real view throuw the objective. But if I
> use the direction vector with the focal length ob the objective it absolutely
> does not.
> 
> Isn't it that the length of the direction vector is the same as the focal length
> of the objective?

First, it depends on the type of camera to take into account or not the
length of the direction vector, and usually it's a ratio with the
other(s) vector(s) (up/right)

Second, not at all.


Post a reply to this message

From: timer
Subject: Re: camera direction vs. angle
Date: 5 Sep 2013 05:55:00
Message: <web.522854adfe18e83d87f6e2750@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
>
> First, it depends on the type of camera to take into account or not the
> length of the direction vector, and usually it's a ratio with the
> other(s) vector(s) (up/right)
>
> Second, not at all.


It is an perspective camera an the ratio from it is 4:3 which is also the
standard ratio for povray.


Post a reply to this message

From: Le Forgeron
Subject: Re: camera direction vs. angle
Date: 5 Sep 2013 07:28:42
Message: <52286aea$1@news.povray.org>
Le 05/09/2013 11:53, timer a écrit :
> Le_Forgeron <jgr### [at] freefr> wrote:
>>
>> First, it depends on the type of camera to take into account or not the
>> length of the direction vector, and usually it's a ratio with the
>> other(s) vector(s) (up/right)
>>
>> Second, not at all.
> 
> 
> It is an perspective camera an the ratio from it is 4:3 which is also the
> standard ratio for povray.

Then, the relation between direction, right and angle is as follow:

direction.length := (right.length / 2 )/tan(angle/2)

How you convert a focal length to an angle of view is left as an
exercise for the reader:

The now historical 24mmx36mm film format has a diagonal of 43mm, and a
"normal" lens has a 50mm focal length, for an angle of about 53° on the
diagonal (whereas povray use the angle on the horizontal)

tan(53°/2) = sqrt((right.lentgth/2)²+(up.length/2)²)/(direction.length)

the interesting part is reaching 53° from 43mm of film diagonal and 50mm
objective. (some magic is needed, such as a 43/50 ratio on the objective
length)


Post a reply to this message

From: timer
Subject: Re: camera direction vs. angle
Date: 7 Sep 2013 05:40:01
Message: <web.522af411fe18e83d9b0432910@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
>
> Then, the relation between direction, right and angle is as follow:
>
> direction.length := (right.length / 2 )/tan(angle/2)
>
> How you convert a focal length to an angle of view is left as an
> exercise for the reader:
>
> The now historical 24mmx36mm film format has a diagonal of 43mm, and a
> "normal" lens has a 50mm focal length, for an angle of about 53° on the
> diagonal (whereas povray use the angle on the horizontal)
>
> tan(53°/2) = sqrt((right.lentgth/2)²+(up.length/2)²)/(direction.length)
>
> the interesting part is reaching 53° from 43mm of film diagonal and 50mm
> objective. (some magic is needed, such as a 43/50 ratio on the objective
> length)

Thanks for explaining, you helped me a lot.


Post a reply to this message

From: posfan12
Subject: Re: camera direction vs. angle
Date: 9 Sep 2013 22:20:01
Message: <web.522e80d9fe18e83d41a177270@news.povray.org>
I always use direction, up and right as a rule, partially because I like to
switch back and forth between perspective and orthographic view.


Mike


Post a reply to this message

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