ricktu288 / ray-optics

A web app for creating and simulating 2D geometric optical scenes, with a gallery of (interactive) demos.
https://phydemo.app/ray-optics/
Apache License 2.0
1.31k stars 220 forks source link

Is it possible to use lenses with different focal lengths #110

Closed SaajHosseini closed 1 year ago

SaajHosseini commented 1 year ago

Hello,

I am new to the GitHub, so I hope I am putting my question in a right spot.

From my recent approaches to the software I understood I can easily use typical concave and convex lenses. However, I was wondering if it be possible to have an Ideal leans with different focal points such as plano-concave lens etc. Or if it be possible to import the geometry of lens as an .stl file to the simulation.

Regards,

ricktu288 commented 1 year ago

The "ideal lens" tool is an ideal object that obeys the thin lens equation exactly and, so it does not corresponds to a specific shape, and whether it is plano-concave or double concave is irrelevant. The focal length can be set directly with the slider when the lens is selected

If you want to create a plano-concave lens where the concave surface is spherical (circular), you can use the "spherical lens" tool with a grid and adjust the points: 圖片 Or you can use the "Custom shape" tool.

There is currently no way to directly enter the front and back focal length directly to a spherical lens. See #75.

As for file import, since this is a 2D optics simulator, so a 3D .stl file is irrelevant to the goal of this simulator. Importing 2d CAD file is desirable but not currently possible. However, you may model the curve with a mathematical equation and use the "Custom equation" tool.

SaajHosseini commented 1 year ago

Thank you so much for your response.