FOV angle conversion – horizontal to vertical
The following equation is related to the field of view (FOV) in computer graphics, particularly in 3D rendering. The field of view is the extent of the observable world that is seen at any given moment by the camera. This equation is used to convert the vertical field of view (FOVᵧ) to the horizontal field of view (FOVₓ) based on the aspect ratio of the display.
Step‑by‑step explanation
-
Vertical Field of View ($\text{fov}_y$)
The angle (in degrees or radians) that describes how much of the scene can be seen vertically. It is given or defined for the camera or perspective. -
Aspect Ratio ($\text{aspect}_x$)
The ratio of the width to the height of the display or viewport:
- Conversion to Tangent
Halve the vertical field of view and take its tangent. This gives a ratio representing the visible extent in the vertical direction at a distance of 1 unit:
- Scaling by Aspect Ratio
Multiply the tangent value by the aspect ratio to scale it to the horizontal direction:
- Conversion Back to Angle
Apply the arctangent (inverse tangent) to convert the scaled ratio back into an angle (radians):
- Doubling the Angle
Double the result because the initial tangent calculation used half of the field of view, yielding the full horizontal field of view:
This equation is crucial in 3D graphics to keep perspective projection proportional and visually consistent, especially when the aspect ratio changes.