NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
April 18, 2021, 07:09:48 pm

"If I have a thousand ideas and only one turns out to be good, I am satisfied." ..."Alfred Nobel(1833-1896, Swedish inventor, chemist, philanthropist)"

 Pages: [1]   Go Down
 Author Topic: how simulate a len changing thickness for convex or concave len?  (Read 11240 times) 0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message on: June 22, 2009, 01:00:25 pm »

http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1155msg4448;topicseen#msg4448

Hi prof,

I examine the physlet applet, it seems to have a good example of a thickness of lens changing with focus length f.

I look through many examples of optics here, but i don't see one that has a changing thickness lens.
i notice the lens usually don't change thickness or drawing

any chance of some tips how to make one realistically?

 len01.PNG (5.28 KB, 668x355 - viewed 524 times.)  len02.PNG (6.7 KB, 677x359 - viewed 491 times.)  len03.PNG (5.46 KB, 668x357 - viewed 522 times.)  len04.PNG (6.81 KB, 680x360 - viewed 485 times.) Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3086

 « Embed this message Reply #1 on: June 22, 2009, 01:43:54 pm »

Quote
I examine the physlet applet, it seems to have a good example of a thickness of lens changing with focus length f.
Could you provide the URL of the examples ?

I think if you use thin lens approximation in the simulation, the thickness of the lens is only visual effect.

If you want to simulate effect due to thick lens, you need to use Snell's Law to calculate all the refractions occurs at the boundary of lens. You are welcomed to check out Thick Lens

If you want to show how the thickness of a lens affect the focus, that is another story!

Many drawing in Physlet optical bench is only an approximation.
Please check out the attached image. It assumed thin mirror and thin lens case.
The space in the simulation is not the same as real world.
The mirror and lens will be almost like a thin/short line if you want to draw it according to real dimension.
 physletoptics.png (11.83 KB, 664x497 - viewed 508 times.) Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #2 on: June 22, 2009, 02:03:17 pm »

Could you provide the URL of the examples ?
http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1140.0

I think if you use thin lens approximation in the simulation, the thickness of the lens is only visual effect.

If you want to simulate effect due to thick lens, you need to use Snell's Law to calculate all the refractions occurs at the boundary of lens. You are welcomed to check out Thick Lens

If you want to show how the thickness of a lens affect the focus, that is another story!

Many drawing in Physlet optical bench is only an approximation.
Please check out the attached image. It assumed thin mirror and thin lens case.
The space in the simulation is not the same as real world.
The mirror and lens will be almost like a thin/short line if you want to draw it according to real dimension.

Yes! i only want a visual effect, like physlet ones.

but the function to draw the polygon that represents the lens is complicated. I doubt i can copy it over to make it work.

 Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3086

 « Embed this message Reply #3 on: June 22, 2009, 02:45:34 pm »

If you just need visual effect, you can change the width of shape (the GUI used to draw lens) and let it change with f.

EJS version of thick lens can be found at Lens (thick lens) and Mirror. The snell's law were used to calculate all the refraction to simulate a real thick lens.
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #4 on: June 22, 2009, 09:12:09 pm »

If you just need visual effect, you can change the width of shape (the GUI used to draw lens) and let it change with f.

any tips how i get get a suitable equation?

size X = size*2*(2- Math.sin(f)) doesn't look good
= size*2*(1/f) is the correct relationship but it doesn't look nice.

i am stuck thinking of a eqn
 Logged
lookang
Hero Member

Offline

Posts: 1796

http://weelookang.blogspot.com

 « Embed this message Reply #5 on: June 22, 2009, 09:39:46 pm »

i used a simplified method

fixed relations
if ( f > 1 ) {
fdraw = 1;
}
else {
fdraw = f;
}

Lens X size
= size*2*1/(fdraw+1)

looks better now
 Logged
 Pages: [1]   Go Up
"If I have a thousand ideas and only one turns out to be good, I am satisfied." ..."Alfred Nobel(1833-1896, Swedish inventor, chemist, philanthropist)"