(eval-when (:compile-toplevel :load-toplevel :execute)
(defun make-output-format (w h &key (units :inches))
- (let ((name (format nil "~Dx~Din" w h)))
+ (let ((name (format nil "~Dx~D~A" w h
+ (ecase units
+ (:inches "in")
+ (:mm "mm")
+ (:cm "cm")
+ (:m "m")
+ (:feet "ft")))))
(list :format (kmrcl:ensure-keyword name)
- :output (cons (inches->mm w) (inches->mm h))
+ :output (cons (length->mm w units) (length->mm h units))
:name name
:nicks (list (kmrcl:ensure-keyword (format nil "~Dx~D" w h)))))))
(t
(error "Must set two, and only two, of the parameters: image-distance, object-distance, and focal-length."))))
-(defun close-up (&key focal-length object-distance image-distance magnification (units :feet) &aux bellows-factor)
+(defun close-up (&key focal-length object-distance image-distance magnification (units :feet))
"Computes the parameters for focusing closer than infinity.
Requires two, and only two, of the input parameters.
Returns: focal-length object-distance image-distance magnification bellows-factor."
(dolist (distance distances)
(multiple-value-bind (near far dof mag blur) (dof focal-length f-stop distance coc
:units units)
+ (declare (ignorable dof mag blur))
(when (minusp far) (setq far "Inf "))
(format output "~5F/~5F " near far)))
(format output "~%")))