(aov-one-dim focal-length (diagonal frame-width frame-height)
:projection projection :magnification magnification)))
-(defun gaussian-lens (focal-length object-distance)
- "Returns the image distance for a focused object at distance."
+(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)))))
(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 (gaussian-lens focal-length object-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
"Returns the angle of field of view for a focal length and frame size at infinity"
(let ((dim (format-dimensions format)))
(aov focal-length (car dim) (cdr dim) :projection projection)))
+
+(defun magnification (focal-length distance)
+ "Returns the image magnification: the ratio of image size to objecct size."
+ (float (/ focal-length (- distance focal-length))))
+
+(defun bellows-factor (focal-length distance)
+ "Returns the bellows factor, the ratio of effective aperature to actual aperture."
+ (1+ (magnification focal-length distance)))
+