





 
 




 
 


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


 
 




 
 


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


 
 




 
 


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


 
 




 
 


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


 
 




 
 


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


 
 




 
 


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


 
 




 