Finding an algorithm to mark a lens barrel

71 Views Asked by At

I have a zoom lens that only has a handful of focal lengths marked on the zoom ring. I want to make some intermediate marks, but I don't know the math required. I do have the approximate angles of the factory-marked focal lengths. The lens zooms from 70mm to 180mm over 110 degrees of rotation. If 70mm sits at 0 degrees, 90mm is 40 degrees, 110mm is 70 degrees, 135mm is 88.75 degrees, and 180mm is 110 degrees. How can I calculate the angle for, say, 85mm or 150mm?

2

There are 2 best solutions below

0
On BEST ANSWER

You can put the values into Excel and ask for a polynomial fit. A cubic works well. If $x$ is the focal length divided by $10$ and $y$ is the angle, it gives $y=0.0784x^3-3.853x^2+67.258x-309.19$ The large constant makes me worry that there is some delicate cancellation going on. You may do as well linearly interpolating between neighboring points. So to find the angle for $150$, it is $15/45$ of the way from $135$ to $180$, so it would be at $88.75+(110-88.75)\cdot 15/45 \approx 95.83$ degrees.

0
On

The best solution isn't really a mathematical one, but an empirical one. What you want to do is the following:

  1. Focus the lens at infinity. This is important.
  2. Take photos of a suitable scene containing distant objects (so that they will be in reasonable focus), stopped down to f/8, on a tripod, for each focal length marked on the barrel.
  3. The magnification of the image is directly proportional to the focal length at infinity focus, so for example, if you take the image at 180 mm and scale it down in an image editing program so that it overlays the central portion of the 70 mm image, the scaling factor should be $70/180 \approx 38.89\%$.
  4. If you want to make a marking at 150 mm, for example, you would turn the zoom barrel until the image you see in the Live View preview encompasses $135/150 = 90\%$ of the image at 135 mm, which you can eyeball and then refine with successive shots. Although this is a trial-and-error process, it is going to be much more accurate than any mathematical interpolation, because you will have a marking that represents the true focal length at infinity relative to the actual lens markings. You could even discover that the markings themselves may not be accurate (which depends on the manufacturer).