+ (values (mm->length d-width units)
+ (mm->length d-height units)
+ (mm->length d-diagonal units)
+ mag
+ object-distance
+ image-distance)))))
+
+(defun fov (focal-length frame-width frame-height
+ &key object-distance image-distance magnification
+ (units :feet)
+ (projection :rectilinear))
+ (cond
+ ((and object-distance (not image-distance) (not magnification))
+ (setq image-distance (gaussian-lens
+ :focal-length focal-length
+ :object-distance (length->mm object-distance units))))
+ ((and (not object-distance) image-distance (not magnification))
+ (setq object-distance (mm->length (gaussian-lens
+ :focal-length focal-length
+ :image-distance image-distance)
+ units)))
+ ((and (not object-distance) (not image-distance) magnification)
+ (setf image-distance (image-distance-magnification focal-length magnification)
+ object-distance (when (numberp image-distance)
+ (mm->length (/ image-distance magnification) units))))
+ (t
+ (error "Must set one, and only one, of the parameters: image-distance, object-distance, or magnification.")))
+
+ (%fov focal-length frame-width frame-height object-distance image-distance units
+ projection))