how to make lenses in matlab?

Dear sir/madam,
I am working on optical lenses. I need to create lenses such as biconvex, biconcave, planoconvex and planoconcave for my project. How could I do this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD

댓글 수: 1

PRAKASH JOSHI
PRAKASH JOSHI 2019년 3월 28일
How do I find the off focus points after the fft

댓글을 달려면 로그인하십시오.

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2011년 8월 30일

0 개 추천

There is at least one tool for calculating ray-paths through optical systems on the file exchange: http://www.mathworks.co.uk/matlabcentral/fileexchange/27412-opticalbench
HTH

댓글 수: 12

bsd
bsd 2011년 8월 31일
Thank for the reply. The above link has good collection of matlab files for my application. But there are no proper examples or demonstrations, for using these files.
BSD
Bjorn Gustavsson
Bjorn Gustavsson 2011년 8월 31일
If you look, there is 10 files with "example" in their names. Those surely should be examples of how to use the functions for this or that purpose.
bsd
bsd 2011년 9월 1일
what are these ".exmpl" files? Why have they been used in the example programs?
BSD
Bjorn Gustavsson
Bjorn Gustavsson 2011년 9월 1일
Take a look in the opt_exempel*.m files. The .exmpl files are setup-files describing optical elements, with curvature of lens surfaces, glass type, lens position, diameter and other parameters.
bsd
bsd 2011년 9월 2일
What are the materials you have used, which contains the mathematics, for these codes. Like the mathematics for drawing lenses, ray tracing etc... Where can I find the mathematics for these codes?
BSD
Bjorn Gustavsson
Bjorn Gustavsson 2011년 9월 3일
The ray tracing is simply Snell's law, calculating the angle to the surface normal at the ray-entrance/exit, refraction for the glass-type at the wavelength of the ray. The plotting is just simple geometry.
bsd
bsd 2011년 9월 6일
As per your guidance, I found the angle of incidence at the ray entrance, and calculated the corresponding angle of refraction on surface 1 of the lens. Now based on this angle of refraction, the ray hits the other opposite, surface 2 of the lens. I know only the angle of refraction at surface 1 of the lens, now I need to draw a line from surface 1 of the lens to surface 2 of the lens based on the angle of refraction at surface 1 of the lens. But I don't know where the line will hit on surface 2 of the lens. How can I draw a line to connect these two points?
Iain Robinson
Iain Robinson 2011년 9월 6일
The transmitted ray will leave surface 1 and travel to surface 2 along a straight line. You know the angle of this line (to the optical axis) from applying Snell's Law at surface 1. You also know the coordinates of one of the points on the line: the point where it was refracted at surface 1. This is enough information to calculate the equation of the straight line (using the angle to determine the gradient).
The spherical surface of the lens, surface 2, is described by the equation of a circle. You'll need to look up or calculate the radius of curvature.
By solving the equations of the ray (straight line) and the lens surface (circle) you can get the coordinates of the point of intersection between the ray and the surface. There will be two solutions, one for concave surfaces, one for convex.
After picking the right solution draw a line connecting the coordinates of transmitted ray leaving surface 1 to the coordinates of the point where the ray is incident on surface 2.
HTH.
bsd
bsd 2011년 9월 6일
The analysis is correct. But, the angle of the line, after refraction at surface 1 of the lens, is with respect to the normal drawn at that point of incidence on the surface 1 of the lens. It is not with respect to the optical axis.
BSD
Iain Robinson
Iain Robinson 2011년 9월 6일
If the lens is plano-convex and surface 1 is flat then the normal will be parellel to the optical axis. This is a special case, but it makes things slightly simpler.
If surface 1 is not flat then you need to convert the angle of refraction relative to the surface normal to an angle relative to the optical axis. The geometry required is given in, among other places, Nussbaum's "Contemporary Optics for Scientists and Engineers".
By the way, if the refraction angles are "small" then using the paraxial approximation could simplify the problem.
bsd
bsd 2011년 9월 13일
I have drawn the rays through the lens, it is working fine. It is also undergoing refraction. Now, after the rays come out of the surface 2 of the lens, they go to infinity. So I need to draw the rays from the surface 2 upto infinity, or my rays should appear something like it is going to infinity after refraction at surface 2. How could I do this in matlab? Looking forward to hearing from you soon.
BSD
bsd
bsd 2011년 9월 23일
You have drawn the lens in matlab in 3D, how is it done? I used the lens equation y=sqrt((n^2-1)*((x-f)^2))+((2)*(f)*(n-1)*(x-f)));
to draw a hyperbolic lens. where n is the refractive index of the lens, f is the focal length of the lens. The above equation was taken from "Antenna handbook, volume II, antenna theory, chapter 16, by Y.T. Lo and S.W. Lee", Please reply....

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Optics에 대해 자세히 알아보기

질문:

bsd
2011년 8월 30일

댓글:

2019년 3월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by