(defun image-distance (focal-length object-distance)
"Returns the image distance for a focused object at distance using the Gaussian
Lens Equation."
- (float (/ 1 (- (/ 1 focal-length) (/ 1 object-distance)))))
+ (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))
(defun aov-format (focal-length format &key (projection :rectilinear))
"Returns the angle of field of view for a focal length and frame size at infinity"
- (let ((dim (format-dimensions format)))
+ (let ((dim (imager-dimensions format)))
(aov focal-length (car dim) (cdr dim) :projection projection)))
(defun magnification (focal-length distance)