NTNUJAVA Virtual Physics LaboratoryEnjoy the fun of physics with simulations! Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
April 26, 2019, 05:52:41 pm

"In theory, theory and practice are the same. In practice, they are not." ..."Albert Einstein (1879~1955, Mathematical physicist, Nobel Prize 1921-Physics)"

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

Offline

Posts: 1792

http://weelookang.blogspot.com

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

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 431 times.)  len02.PNG (6.7 KB, 677x359 - viewed 398 times.)  len03.PNG (5.46 KB, 668x357 - viewed 426 times.)  len04.PNG (6.81 KB, 680x360 - viewed 403 times.) Logged
Fu-Kwun Hwang
Hero Member

Offline

Posts: 3082

 « Embed this message Reply #1 on: June 22, 2009, 01:43:54 pm » posted from:Taipei,T'ai-pei,Taiwan

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 425 times.) Logged
lookang
Hero Member

Offline

Posts: 1792

http://weelookang.blogspot.com

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

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: 3082

 « Embed this message Reply #3 on: June 22, 2009, 02:45:34 pm » posted from:Taipei,T'ai-pei,Taiwan

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: 1792

http://weelookang.blogspot.com

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

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: 1792

http://weelookang.blogspot.com

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

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
"In theory, theory and practice are the same. In practice, they are not." ..."Albert Einstein (1879~1955, Mathematical physicist, Nobel Prize 1921-Physics)"