Lens questions from a software engineer

Author: Evelyn y

Sep. 09, 2024

Lens questions from a software engineer

Lens questions from a software engineer

For more information, please visit our website.

  • Thread starter

    tappo

  • Start date

    Jun 18,
  • Tags

    Engineer Lens Software Software engineer

In summary: A convex-convex lens has a curved surface on two axes, and is more complex to make and use, but it offers better image quality. The focal length and curvature of the lens can be determined using the thin-lens formula, but the cost of the lens is also higher. The real world applications of lenses are much more complicated than this, but the concepts you have covered here are the basics. Thanks for asking!In summary, lenses are used to magnify an object on a camera sensor. There are two types of lenses- a plano-convex lens and a convex-convex lens. A cylindrical lens can be either type. The focal length

  • Jun 18,
  • #1

tappo

2
0

Hello everyone,

I am a software engineer and know very little about lenses but am trying to learn. I am confused about the differences between convex-convex and plano-convex and how to decide how to design an actual plastic lens for a real world application.

Here is an example (not real world, but bar codes seem easy to understand since 1D):
Lets say I want to make something like a bar code scanner for simple bar codes. The bar code is 40mm wide. And I have a 1D camera sensor, which is only 10mm wide. And then let's say the sensor is 10mm away from the bar code. So somehow I need to scale the bigger barcode to the smaller area of the sensor.

Here are some questions:
1) Since everything is 1D, it seems like a cylindrical lens should/could be used, is that true?
2) What kind of lens should be used? (plano-convex or convex-convex, or something else?), this part is very unclear to me.
3) How can I compute the curvature of the lens to get the desired distance between sensor and bar code?


Many thanks for any hints and ideas,
Tappo

 

  • Research team improves fuel cell durability with fatigue-resistant membranes
  • Apex predators not a quick fix for restoring ecosystems, 20-year study finds
  • Building images photon-by-photon to increase the information content provided by microscopes
Science news on Phys.org

  • Jun 18,
  • #2

Andy Resnick

Science Advisor

Education Advisor

Insights Author

7,493
3,274

Bar code scanners don't use imaging- they use what's called an f-theta lens to convert the angular motion of the scanning laser to linear motion at the (linear) detector.

But- you want to image the bar code. All you want to do is *demagnify* the object. You must first specify some properties about the system: distance from the bar code to the lens, distance from the lens to the detector, size of the bar code, size of the detector.

Then, for the most simple type of model (a single lens), you can use the thin-lens formula to calculate the focal length (and curvature) of the lens. Whether to use a planoconvex or biconvex is dependent on the aberrations present, but at this introductory level I would recommend not worrying about it.

You could use a cylindrical lens, but those are more expensive than plano-convex lenses. Plus, the alignment is more difficult.

In the real world, this is a solved problem- what are you doing differently?

 

  • Jun 18,
  • #3

tappo

Link to Hongsheng

2
0

Hi,
thanks for the answer.

I am not trying to do anything new,but I try to understand how lenses work using some examples I can think off.

Cylindrical lenses:
I might be using the wrong word. I thought a cylindrical lens can ALSO be plano-convex or anything else, and cylindrical just means that the lens is only curved along one axis rather than along two axis, which I thought would make it cheaper.
The main reason why I thought about cylindrical lenses is because it seemed to me that since the camera is 1D only, a cylindrical lens would take up much less space, since it can be a thin slice of the cylinder, while a round lens would take up more space.
Pleae tell me if I am misunderstanding things or use the wrong terms.

I made a sketch on how the setup I amthingking about would look like, please excuse my bad artwork.

http://randomimages.host-ed.net/index.html

Many thanks again,
Tappo

 

Last edited by a moderator: May 4,

  • Jun 20,
  • #4

reasonableman

107
8

Lenses are not that complicated or at least they are not complicated until you get to a level that only computer modelling is useful. So what you've said is correct.

A plano-convex lens simply has a flat side and a curved side. A cylindrical lens can be plano-convex.

As to cost for lenses, like many things, it is not easy to derive cost from complexity. Some lenses are cheaper just because they are more common.

I recommend looking at some optics catalogues (Thor Labs, Edmund Optics). They often have small technical notes and you can see prices etc.

 

  • Jun 20,
  • #5

Andy Resnick

Science Advisor

Education Advisor

Insights Author

7,493
3,274

tappo said:

I made a sketch on how the setup I amthingking about would look like, please excuse my bad artwork.

http://randomimages.host-ed.net/index.html

Many thanks again,
Tappo


Your drawing is fine, but cylindrical lenses are rarely used in practice. Your system (as drawn) requires very tight tolerances on the alignment of the barcode to the lens and detector. Slight rotations of any of those elements will kill the system.

But for what you are thinking about, you are on the right track.

Your drawing is fine, but cylindrical lenses are rarely used in practice. Your system (as drawn) requires very tight tolerances on the alignment of the barcode to the lens and detector. Slight rotations of any of those elements will kill the system.But for what you are thinking about, you are on the right track.

 

Last edited by a moderator: May 4,

FAQ: Lens questions from a software engineer

1. What is the purpose of lens questions in software engineering?

Lens questions are used to help software engineers think critically about their code and identify potential issues or improvements. They can also help with debugging and problem-solving.

2. How are lens questions different from regular code review questions?

Lens questions are more focused and specific, often targeting a particular aspect of the code or design. They also encourage the engineer to think beyond their own perspective and consider alternative approaches.

3. Can lens questions be used for both individual and team code reviews?

Yes, lens questions can be used for both individual and team code reviews. They can be helpful for individual engineers to reflect on their own work, and for teams to discuss and improve their code together.

4. Are there any specific techniques or strategies for asking effective lens questions?

Some common strategies for asking effective lens questions include using open-ended questions, using specific examples, and avoiding leading or biased language. It can also be helpful to focus on one specific aspect of the code at a time.

5. Can lens questions be used in other areas of software development besides code reviews?

Yes, lens questions can be helpful in other areas of software development, such as during the planning and design stages, or for evaluating the effectiveness of testing and deployment processes. They can also be useful for analyzing and improving overall project management and team collaboration.

Want more information on Double concave Cylindrical Lens? Feel free to contact us.

26

0

Comments

Please Join Us to post.

0/2000

All Comments ( 0 )

Previous: None

Next: Optical Prism

Guest Posts

If you are interested in sending in a Guest Blogger Submission,welcome to write for us!

Your Name: (required)

Your Email: (required)

Subject:

Your Message: (required)