# Calculating lens parameters

I have a very bright LED light and I'd like to make this light focus so it forms around 5mm thick strong line (height can be arbitrary) on on an object about 150 mm away.

I used a cylindrical lens for this purpose which has a focal length of 150mm and it seemed to achieve what I want, but it had to be held away from the light at about a distance of about 150 mm, which does not work for my experiment.

I'm trying to understand how I can calculate the lens parameters needed so that I can get a front focal length of about 150mm but a back focal length of around 20mm or less. I'm not sure whether I'm using the terminology right, but I want the lens to be 20mm (or less) from the light and the focus distance to be 150mm away from the light.

Suppose the object (the LED) is distance o from the lens and we want the image to be distance i from the lens:
To get that to work, the focal length f of the lens must satisfy: $$\frac{1}{f} = \frac{1}{o} + \frac{1}{i}$$
In your case, you want $o=20$ and $i=150-o=130 \text{ mm}$. To achieve that, you need a lens with focal length: $$f = \frac{1}{\frac{1}{o} + \frac{1}{i}}$$ Substituting in the numbers: $$f = \frac{1}{\frac{1}{20} + \frac{1}{130}}$$ which yields: $$f = 17.3 \text{ mm}$$