nathanm wrote:As a concrete example, take a Canon 100mm macro lens, which will focus from 1X to infinity. Suppose we are shooting an object that has the nearest point at 1X and the furthest point is farther out.
...
each step overlaps the ones in front and behind it by 25%.
...
Going from 0.01x to 1x (that has everything in focus out to 10.6 meters)makes the numbers crazy. The optimal steps including aperture are 832 steps (which seems feasible), with constant aperture it is high but maybe possible at 1470, but constant step size would be an impossible 111,112 steps.
...
I should add that the calculations above are based on Rik's wave optics formula for depth of field, assuming 550 nm light.
You may be using the same formulas that I do, but you're applying them in some completely different way that is yielding a crazy result.
Following is the way I would work this problem, for a lens with fixed focal length 100 mm.
Notice that I'm doing all of my thinking & working in terms of the
image and rear extension. Magnification is involved only as it determines min & max rear extension. I'm not concerned about step size at the subject at all.
Key formula: TDF = lambda/NA^2 = lambda*4*f_eff^2
This is for total depth of focus (TDF) in the image plane, with effective aperture f_eff and wavelength lambda, using the wave optics criterion of quarter-lambda wavefront error.
--- Case 1: constant step size in rear bellows extension, lens set to f/4.5 ---
At 0.01x, an f/4.5 lens has f_eff = 4.5*(1+0.01) = 4.545 .
The corresponding depth of focus at lambda = 550 nm is TDF = 0.00055*4*4.545^2 = 0.045445455 mm.
Then, to get your 25% overlap, we'll multiply by 75% to get step size = 0.75 * 0.045445455 = 0.034084091. (Please excuse the plethora of digits. I'm including so many to make it simpler to confirm the calculation.)
Now, a 100 mm lens focused at m=0.01x has total rear extension = 100*(1+0.01) = 101 mm. When focused at m=1x, total rear extension = 100*(1+1) = 200 mm.
The number of steps will be the total difference of rear extension, divided by the step size,
so (200-101) / 0.034084091 =
2905 steps (rounded up).
--- Case 2: variable step size, still keeping the lens fixed at f/4.5 ---
The first step from 101 mm rear extension will be the same size as for case 1, so 0.034084091 mm.
After that, larger steps can be used, in proportion to f_eff^2, recognizing that f_eff keeps rising in proportion to the total rear extension.
My spreadsheet enumeration based on this principle shows that, starting at 101 mm of total rear extension,
200 mm of total rear extension is reached at
1469 steps.
--- Case 3: constant step size, adjusting lens aperture so as to retain fixed f_eff = f/9.0 ---
This is just like case 1, with the exception that the step size is now increased by roughly a factor of 4, to 0.75*0.00055*4*9^2 = 0.13365 mm.
The total number of steps required is then (200-101)/0.13365 =
741 steps.
By these calculations, using variable steps with fixed lens aperture reduces the number of steps by a factor of 2904 / 1468 = 1.98X, and using variable lens setting to maintain constant f_eff puts us back to constant step size but with larger steps, saving another 1468 / 741 = 1.98X .
I don't know what process you've done to get your numbers.
I suggest seeing if you can understand what I've done, and relate that to whatever you've done. At least one of us -- quite possibly both -- is getting the wrong answer.
I look forward to getting this discrepancy resolved.
--Rik