ray-optics icon indicating copy to clipboard operation
ray-optics copied to clipboard

Ideal Glass

Open carlabarato opened this issue 2 years ago • 2 comments

Circle Glass (type circlelens) is not fit to practice spherical refractive surface equation: f/s+f'/s'=1 being s and s' the distance from origin for object and image; f the focal length and f' the image focal length, respectively. Distances are measured from origin (positive on the right, negative on the left).

I propose a new type, named Ideal Glass, with 2 parameters: n=refractive index and R=curve radius.

Focal length (f) and image focal length (f') can be calculated internally as: f=-R/(n-1) f'=R*n/(n-1)

Simulation and representation would be the same as ideallens. The only change being to represent 2 different focal points and to ask for 2 parameters input entries (n=refractive index and R=curve radius).

This could be a new menu item at Glasses labeled as: Ideal Glass.

Even better, I would suggest a new menu item header labeled "Ideal Curved", including:

  1. Ideal Curved Glass.
  2. Ideal Curved Mirror (change name from Ideal Curved to Ideal Curved Mirror and move from Mirrors menu item).
  3. Ideal Spherical Lens (move from Glasses menu item, see issue #42).

carlabarato avatar Apr 19 '22 12:04 carlabarato

@carlabarato So you want input boxes for parameters forming formula? or You want to change the formula itself?

cuttingedge1109 avatar Jul 16 '22 15:07 cuttingedge1109

@cuttingedge1109 I mean input boxes for parameters. I think focal distances should remain internally calculated.

Let me clarify with 2 examples:

  1. See this mockup for a convex ideal glass (curve radius=-50; refractive index=1.5; focal length (calculated)=100; image focal length (calculated)=-150): https://screenrec.com/share/WMUh2C6cdL
  • since R<0, I've used the same representation as divergent ideal lens
  • in the example, I represented a point source at 100 pixels left from origin (s=-100) and 100 pixels above origin (y=100)
  • obtained image is virtual, located 75 pixels left from origin (s'=-75) and 50 pixels above origin (y'=50)
  • focal length is calculated as f=-R/(n-1)=-(-50)/(1.5-1)=100; image focal length is calculated as f'=R*n/(n-1)=-50 * 1.5/(1.5-1)=-150
  • users can check Gauss equation is right (f/s+f'/s'=1; 100/-100 + -150/-75 = 1) and image heigth is also right (y'/y=s'/s/n; 50/100=-75/-100/1.5)
  1. See this mockup for a concave ideal glass (curve radius=50; refractive index=1.5; focal length (calculated)=-100; image focal length (calculated)=150): https://screenrec.com/share/F3msbAPz5B
  • since R>0, I've used the same representation as convergent ideal lens
  • in the example, I represented a point source at 150 pixels left from origin (s=-150) and 50 pixels above origin (y=50)
  • obtained image is real, located 450 pixels right from origin (s'=450) and 100 pixels below origin (y'=-100)
  • focal length is calculated as f=-R/(n-1)=-50/(1.5-1)=-100; image focal length is calculated as f'=R*n/(n-1)=50 * 1.5/(1.5-1)=150
  • users can check Gauss equation is right (f/s+f'/s'=1; -100/-150 + 150/450 = 1) and image heigth is also right (y'/y=s'/s/n; -100/50=450/-150/1.5)

carlabarato avatar Aug 09 '22 21:08 carlabarato

I have modified the structure of objs to allow multiple input boxes/slider for parameters. The parameter interface of the mockup of @carlabarato can now be implemented in a straightforward way (see tool_template.js and objTypes['led'] in index.js).

ricktu288 avatar Aug 23 '22 03:08 ricktu288

hi Team, long time no news here! Please let me know how I can help?

If I had to simulate this problem from my textbook: 09 09 2022_12 50 02_REC

I would use the new tool "Ideal Curved > Ideal Curved Glass" to produce this Picture1

I'm using this simulator in my school project. My goal is to propose a new way to learn optics with experiments. I need to tell my teacher if this simulator is able to simulate ideal refrective spherical surfaces. I would like to write this example in my document. You can download the excerpt here: https://drive.google.com/file/d/16ceB_2Q2kyM1CCB0aVXag6Bn7UgjWEPJ/view?usp=sharing

carlabarato avatar Sep 09 '22 10:09 carlabarato

I only have time to solve the issues that have been required by many people, or the things that make progress to several issues at the same time.

If you write JavaScript, you can implement that tool by your own, following the instruction in the README and open a pull request.

ricktu288 avatar Sep 09 '22 13:09 ricktu288

Unfortunately I cannot write code... I understand, no problem thak you!

carlabarato avatar Sep 09 '22 15:09 carlabarato