2
$\begingroup$

Camera has two properties:

bpy.data.objects['Camera'].data.angle
bpy.data.objects['Camera'].data.lens

If change one value, the other one will be changed automatically. I am curious about the math logic.

From the table below:

$$ \begin{array}{c|c} \text{angle }(\theta)&\text{lens}\\ \hline 30^\circ&-18.691732\\ 45^\circ&28.681456\\ 60^\circ&2.497919 \end{array} $$

Sounds like the formula is: $\text{lens}=\tan{\frac{\theta}{2}}$, but what's the theory come from. I found a diagram about camera as below but not figure out how to match this formula with this diagram:

Is this logic specific to blender or it's generic for all camera's?

enter image description here

$\endgroup$
2
$\begingroup$

The angle of view for a rectilinear projection camera is calculated by:

$$a=2\arctan{\frac{d}{2f}}$$

$a$: angle of view
$d$: dimension of the sensor (horizontal or vertical)
$f$: effective focal length

horizontal and vertical angle of view differ if your camera sensor is not a perfect square.

$\endgroup$
  • $\begingroup$ Thanks, so d should equal to 32mm, then half d is 16mm always. $\endgroup$ – beetlej Nov 23 '17 at 18:50
  • $\begingroup$ @J.Doe is there math I could use to change from a rectilinear view to an Equirectangular view or the other way around? trying to morph the camera from one type to another. $\endgroup$ – Nick Sieben Jul 25 at 21:34
  • $\begingroup$ hmm ther shour is... But sry i have no idea. Maybe search for Little Planet? Let me know here if you find sth! i would be very interested. $\endgroup$ – J.Doe Jul 26 at 10:48
0
$\begingroup$

the relationship as below diagram:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.