This question already has an answer here:
I am using an Olympus M. Zuiko 45mm f/1.8 Camera, I have to calculate the distance at which the lens should be present so that it captures the complete object at once.
I know that the field of view of the camera is 27 degrees, and the aspect ratio is 4:3. Assuming that they are talking about the diagonal field of view.
I want to ensure that the camera at least captures the complete width of the object, so suppose if the camera is capturing a width w, it will be capturing the length 4w/3, therefore the diagonal would come out to be 5w/3.
now, I use simple trigonometry to calculate the desired distance
tan(field_of_view/2) = (diagonal_length/2) / (desired_distance)
so, desired_distance = diagonal_length / (2 * tan(field_of_view / 2))
Although the math looks correct to me, somehow the results do no match the actual phenomenon, can someone please go through this and suggest corrections?