+(defun image-distance (focal-length object-distance)
+ "Returns the image distance for a focused object at distance using the Gaussian
+Lens Equation."
+ (if (= focal-length object-distance)
+ 0
+ (float (/ 1 (- (/ 1 focal-length) (/ 1 object-distance))))))
+
+(defun fov (focal-length frame-width frame-height object-distance
+ &key (projection :rectilinear))
+ "Returns the field of view and image magnificaion ratio at a given distance."
+ (let* ((image-distance (image-distance focal-length object-distance))
+ (magnification (/ image-distance object-distance)))
+ (multiple-value-bind (aov-width aov-height aov-diagonal)
+ (aov focal-length frame-width frame-height :projection projection
+ :magnification magnification)
+ (let* ((d-width (* 2 object-distance (tan (degrees->radians (/ aov-width 2)))))
+ (d-height (* 2 object-distance (tan (degrees->radians (/ aov-height 2)))))
+ (d-diagonal (* 2 object-distance (tan (degrees->radians (/ aov-diagonal 2))))))
+ (values d-width d-height d-diagonal magnification)))))
+
+(defun aov-format (focal-length format &key (projection :rectilinear))